AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Windows Idle

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Sun Mar 07, 2004 6:30 pm    Post subject: Windows Idle Reply with quote

Quote:
I know the new idle time feature isn't as good as you had proposed. It was a very easy change which is why I did it in such a basic way for now.

I plan to add something like the following in the future:

OnIdle, 60000, Label1 ; 10 minutes.
OnIdleReturn, Label2

What the above will do is gosub Label1 when the user becomes "away" and later (when the user has returned), gosub Label2.

Any suggestions or improvements to this idea are welcome.

Chris


Actually it works great for what I wanted to use it for but I like you ideas above. I thought about posting a message on the forum because at first when I tried to use it I couldn't get it to work. I tried something like this:

Code:
Loop
{
   if A_TimeIdle = 5000
   {
      MsgBox, 0, Testing, Idle time = %A_TimeIdle%.
   }
}


And it wouldn't work, but after a little testing I figured out that the script had one small chance (1 millisecond) to be exactly 5000, so I just switched to using if A_TimeIdle was greater than 5000 it would do what I want.

I haven't got a chance to test some of the other added features, but thanks for all your work, and acceptance to suggestions.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Sun Mar 07, 2004 7:22 pm    Post subject: Reply with quote

I've just added a new variable, A_TimeIdlePhysical. It's even better because it ignores simulated input, such as that generated by any script that happens to be running. The only drawback is that it requires one or both of the hooks to be installed, which might be undesirable in some cases.
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Tue Mar 09, 2004 12:29 am    Post subject: Reply with quote

I added this to the documentation to clarify:

A_TimeIdle:
...
Since this value tends to increase by increments of 10, do not check whether it is equal to another value. Instead, check whether it is greater or less than another value. For example: IfGreater, A_TimeIdle, 600000, MsgBox, The last keyboard or mouse activity was at least 10 minutes ago.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group