[program-l] Re: AutoHotKey and File Explorer

  • From: Mike Fox <mfox32322@xxxxxxxxx>
  • To: program-l@xxxxxxxxxxxxx
  • Date: Thu, 6 Jun 2019 21:37:39 -0400

Hey Travis,

What version of AutoHotKey are you using, and what version of Windows?
I have Windows 10 64-bit, and AHK version 1.1.25.01 Unicode 32-bit, and
this code worked for me:

#ifWinActive ahk_class CabinetWClass`
^p::
MsgBox Yup, it works!
return

If I hit Control P in Notepad, I got a print dialog.  If I hit it in File
Explorer, no matter what directory it was on, I got my message box and no
print dialog.

So without seeing any of your code, I don't see a reason why the
#ifWinActive directive wouldn't work.  Could it be that the hotkey is
working, but the code it calls is going wrong?  Hard to tell with no code,
but hopefully my little test script will help you debug it. :)


On Thu, Jun 6, 2019 at 8:56 AM Travis Roth <travis@xxxxxxxxxxxxxx> wrote:

Hi,
Any AutoHotKey experts here?
I am trying to make a hot key that is only active in File Explorer.
According to Stack Overflow this directive should work:
#IfWinActive ahk_class CabinetWClass

I also confirmed that the CabinetWClass window class still does exist as
the
top window in File Explorer.
However, this is not working for me and my hot key never becomes active.
Anyone know the solution?
Thanks.
Travis


** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: