AutoHotKey script not recognizing Windows Explorer

Posted by SaintWacko on Super User See other posts from Super User or by SaintWacko
Published on 2012-03-21T18:21:09Z Indexed on 2012/03/21 23:33 UTC
Read the original article Hit count: 218

I've made a script that will set an environment variable to the path in the current Explorer windows when its hotkey is pressed. However, I want this to only trigger if the active window is an Explorer window. This should do it:

  #IfWinActive ahk_class ExploreWClass|CabinetWClass
     #p::
        SetPath()
     return
  #IfWinActive

But for some reason it isn't. Is there something I'm doing wrong?

© Super User or respective owner

Related posts about windows-explorer

Related posts about autohotkey