Help with Persistent IfWinActive Loop

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
lleecpht
Posts: 4
Joined: 29 Apr 2017, 01:53

Help with Persistent IfWinActive Loop

29 Apr 2017, 02:29

I got to a variation such as this that works for me to build from, but it seems to process "Send, {RIGHT}{ENTER}" 2x

#Persistent

WinWait, Options,
IfWinNotActive, Options, , WinActivate, Options,

Loop,

{
WinWaitActive, Options,
SetTimer, repeat, 1
WinWaitNotActive, Options,
SetTimer, repeat, off
}

repeat:
Send, {RIGHT}{ENTER}

sleep 100
return

***********************************************************
At the end, once I get this right, i'll be incorporating it into

;Pop up window from Main Window
WinWait, Event Details - \\Remote,
IfWinNotActive, Event Details - \\Remote, , WinActivate, Event Details - \\Remote,
WinWaitActive, Event Details - \\Remote,
MouseClick, left, 743, 536
Sleep, 100

;Main Window
WinWait, PharmNet: Workflow Monitor - \\Remote,
IfWinNotActive, PharmNet: Workflow Monitor - \\Remote, , WinActivate, PharmNet: Workflow Monitor - \\Remote,
WinWaitActive, PharmNet: Workflow Monitor - \\Remote,
MouseClick, left, 1631, 1012
Sleep, 100
MouseClick, left, 320, 114
Sleep, 100
return

***********************************************************
Any help would be much appreciated
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Help with Persistent IfWinActive Loop

29 Apr 2017, 07:17

Hallo,
SetTimer, repeat, 1
You tried to make a Timer with a peroid of only 1ms !
Try: SetTimer, repeat, 1000
lleecpht
Posts: 4
Joined: 29 Apr 2017, 01:53

Re: Help with Persistent IfWinActive Loop

29 Apr 2017, 19:10

Oh wow, I totally missed that one. Thank you so much Rohwedder. I may have additional questions after I play around with it some more :-)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], just me and 61 guests