I'd like to convert the following code in a function:
Code: Select all
If !WinExist("ahk_class AutoHotkeyGUI")
Gui Show
else
Gui hide
GuiVisibility(){
If !WinExist("ahk_class AutoHotkeyGUI")
Gui show
else
Gui hide
}
This works perfectly of course
F1::
GuiVisibility()
Code: Select all
GuiVisibility2(){
If !WinExist("ahk_class AutoHotkeyGUI")
return show
else
return hide
}
Gui % GuiVisibility2()