One example:
If I use the new format of
Code: Select all
if WinExist("ahk_class Notepad")
If I use the depreciated
Code: Select all
IfWinExit, ahk_class Notepad
Any ideas what I'm doing wrong? I'm on AHK version 1.1.30.00
Thanks.
Code: Select all
if WinExist("ahk_class Notepad")
Code: Select all
IfWinExit, ahk_class Notepad
Yea,Scr1pter wrote:How about
#if WinActive("ahk_class Notepad")
?
Regards
Sorry I'm confused doesn't the hatch make it a hot key/string. I don't want a hotkey.FanaticGuru wrote:Yea,Scr1pter wrote:How about
#if WinActive("ahk_class Notepad")
?
Regards
There is a big difference between:
if and #if
and between
ifWinExist and #ifWinExist
FG
When you use the # it is then a script directive that effects all hotkeys below it in the script.radadar wrote:Sorry I'm confused doesn't the hatch make it a hot key/string. I don't want a hotkey.FanaticGuru wrote:Yea,Scr1pter wrote:How about
#if WinActive("ahk_class Notepad")
?
Regards
There is a big difference between:
if and #if
and between
ifWinExist and #ifWinExist
FG
Code: Select all
F12::
if WinExist("ahk_class Notepad")
MsgBox NOTEPAD EXIST
else
MsgBox NOPE
return
F11::
IfWinExist, ahk_class Notepad
MsgBox NOTEPAD EXIST
else
MsgBox NOPE
return
Code: Select all
#if WinExist("ahk_exe Excel.exe")
F12::
if WinExist("ahk_class Notepad")
MsgBox NOTEPAD EXIST
else
MsgBox NOPE
return
F11::
IfWinExist, ahk_class Notepad
MsgBox NOTEPAD EXIST
else
MsgBox NOPE
return
Users browsing this forum: Billykid and 177 guests