Stop a loop with A_TimeIdlePhysical

Get help with using AutoHotkey and its commands and hotkeys
Melancoholic
Posts: 2
Joined: 17 May 2018, 14:57

Stop a loop with A_TimeIdlePhysical

17 May 2018, 15:22

Hello guys!
I want to script a loop which starts with user input and ends with a keystroke/moving the mouse.
Looking at other posts I found "A_TimeIdlePhysical" which could help but in every instance I saw the code it was always used to start something not to end it.
And the line I was using to break the loop didn't seemed to work
The code I'm using is
Spoiler

Can anybody help me?
I'm also fine to end the loop with a specific keystroke like ctrl+l.
swagfag
Posts: 480
Joined: 11 Jan 2017, 17:59

Re: Stop a loop with A_TimeIdlePhysical

17 May 2018, 15:39

dont use deprecated commands(IfLess, etc) in new scripts

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Melancoholic
Posts: 2
Joined: 17 May 2018, 14:57

Re: Stop a loop with A_TimeIdlePhysical

17 May 2018, 16:04

swagfag wrote:dont use deprecated commands(IfLess, etc) in new scripts

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Thank you, but pressing a key or moving a mouse didn't break the loop
However Esc::ExitApp did.
FYI I started using AHK today
swagfag
Posts: 480
Joined: 11 Jan 2017, 17:59

Re: Stop a loop with A_TimeIdlePhysical

17 May 2018, 16:54

yeah, i noticed now too that theres the issue that when the script is sleeping, naturally, no checks are being done, so moving the mouse or pressing a key wont break it
User avatar
Xtra
Posts: 1063
Joined: 02 Oct 2015, 12:15

Re: Stop a loop with A_TimeIdlePhysical

17 May 2018, 20:48

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: ouboss, Xtra and 30 guests