 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Leon
Joined: 27 Aug 2007 Posts: 179
|
Posted: Thu Apr 24, 2008 6:26 pm Post subject: A_TimeIdlePhysical reset by script despite installing hook |
|
|
Hi,
I can't figure out why this isn't working.
Neither can jaco0646 - for whom it works.
I get the message "TimeIdlePhysical WAS reset by script" every time.
How can that be?
| Code: | #InstallKeybdHook
#InstallMouseHook
q::
SetTimer, Check, -3000
Loop
{
Click down
Sleep, 500
}
return
Check:
If A_TimeIdlePhysical < 3000
MsgBox, TimeIdlePhysical WAS reset by script
Else
MsgBox, TimeIdlePhysical NOT reset by script
ExitApp |
|
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Thu Apr 24, 2008 6:35 pm Post subject: |
|
|
how far off is it?
| Code: |
#InstallKeybdHook
#InstallMouseHook
q::
SetTimer, Check, -3000
Loop
{
Click down
Sleep, 500
}
return
Check:
If A_TimeIdlePhysical < 3000
MsgBox, TimeIdlePhysical WAS reset by script`n%A_TimeIdlePhysical%
Else
MsgBox, TimeIdlePhysical NOT reset by script`n%A_TimeIdlePhysical%
ExitApp
|
I think you are making a race condition between the A_TimeIdlePhysical and the SetTimer. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|