If WinActive("ahk_exe ") only processes lines after it if they match the app.
Am I duplicating effort here?
I am unclear on the best way to approach this, could someone explain best practice for this to me please?
Code: Select all
Explorer_JumpTo(expl_path)
{
#IfWinActive ahk_class CabinetWClass ; Only process lines below here if CabinetWClass is in focus
if WinActive("ahk_exe explorer.exe")
{
Send, !d ; move to the address bar
Sleep, 100
Send, %expl_path%
Sleep, 100
Send, {Enter}
}
#IfWinActive ; End context sensitivity for CabinetWClass
return
}