Hi
How do I get it so ifwinActive, ahk_exe notpad.exe for example runs only once, I don't ant it to keep checking if notepad is active once it finds it once
ifwinActive to run only once
Re: ifwinActive to run only once
Depends on your code.
If you put it in the auto-execute section, it runs only once.
If you put it inside a hotkey, it'll be executed every time the hotkey is pressed. Similarly, if it is inside a timer, it'll be executed everytime the timer runs (per SetTimer).
If you put it inside a loop (whether inside the auto-execute section or a hotkey or a timer), it'll run as many times as the loop runs.
If you put it in the auto-execute section, it runs only once.
If you put it inside a hotkey, it'll be executed every time the hotkey is pressed. Similarly, if it is inside a timer, it'll be executed everytime the timer runs (per SetTimer).
If you put it inside a loop (whether inside the auto-execute section or a hotkey or a timer), it'll run as many times as the loop runs.