0
votes

In FreeCommander, the shortcut for Select group ... is Num +, that is, the + key near the numbers keys (right side) on a standard keyboard. I'm running on a laptop, there's no number key, so I would like to map it to another key, say F8:

; set Matching Mode to use Regular Expression
SetTitleMatchMode, RegEx


;#IfWinActive ahk_class FM
;  F8::SendInput {NumpadAdd}
; return

#IfWinActive ahk_class .*FreeCommander
  F8::SendInput {NumpadAdd}
return

However, it doesn't work. You may notice that previously I map the same function for the 7-zip file manager, it works well.

Is there anything wrong with my script?

AutoHotKey v1.0.48.05
FreeCommander XE 2014 Build 605

Update

I found that there's no need to use AutoHotKey to rebind FreeCommander's key:

FreeCommander already has a built-in menu for this:

Tools -> Define keyboard shortcuts ...

FreeCommander is a great tool!

1

1 Answers

0
votes

The ahk_class of the FreeCommander doesn't contain "FreeCommander" anywhere inside it. Use Window Spy to find this out.

; set Matching Mode to use Regular Expression
SetTitleMatchMode, RegEx

;#IfWinActive ahk_class FM
;  F8::SendInput {NumpadAdd}  

#IfWinActive .*FreeCommander ;  applies to the title

  F8::SendInput {NumpadAdd}

#IfWinActive

By the way, I recommend using the newest AHK version from http://ahkscript.org/