ifwinActive to run only once

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
BScripting

ifwinActive to run only once

20 Oct 2017, 19:34

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
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: ifwinActive to run only once

21 Oct 2017, 00:47

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.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, mikeyww and 370 guests