I have this code where I want to disable certain gui buttons if certain script(s) is / are not running.
It works like intended, but I have a feeling there must be a better way of doing it.
I feel like repeating the same code for every button is a bit inefficient.
Code: Select all
SetTimer, CheckScript, 5000
SetTimer, CheckScript2, 5000
CheckScript:
IfWinNotExist, SRT Cloud afmelden.ahk
{
GuiControl, disable, Script5
}
Else
{
GuiControl, enable, Script5
}
CheckScript2:
IfWinNotExist, TSI Cloud afmelden.ahk
{
GuiControl, disable, Script6
}
Else
{
GuiControl, enable, Script6
}
return