I found a problem where I can't get a MsgBox (or any code) working after a defined hotstring or after a #IfWinActive closing statement. Is this normal behavior?
I intended to run multiple macros from a single one, it works, but when I try the MsgBox after all the #Include, it doesn't run, because somewhere inside the #Include Hotstring.ahk or WinActive.ahk there are the hotstrings definition or the #ifWinActive, that blocks my code to execute said scripts.
Hotstring example:
Code: Select all
MsgBox, Test ; this does run
:*:...::
LTrim(A_ThisHotkey,":oc?*")
SendInput,{raw}…
Return
MsgBox, Test ; this does not run
:*:>email::
LTrim(A_ThisHotkey,":oc?*")
SendInput,{raw}%email%
Return
MsgBox, Test ; this also does not run
Code: Select all
MsgBox, Test ; this does run
#IfWinActive ahk_exe Illustrator.exe
$XButton1::
Send, {F3}
Return
#IfWinActive
MsgBox, Test ; this does not run
#IfWinActive ahk_exe inDesign.exe
$WheelUp::
BlockInput, On
SendInput !{PGUP}
BlockInput, Off
Return
MsgBox, Test ; this also does not run
$!+WheelUp::AutoLeftClicks()
#IfWinActive
MsgBox, Test ; this also does not run
Code: Select all
If WinActive("ahk.exe Illustrator.exe"){
Code
}
MsgBox, Test ; this runs
IfGreater, A_TimeIdle, 6000, Send, {!F1} ; this too