|
Using VBScript to get Idle Time
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Rune
(1 post) bio
|
| Date |
Thu 08 Feb 2007 06:16 PM (UTC) [ quote
] |
| Message |
I'm attempting to run a VBScript on machines on our network to lock computers that are idle for a certain amount of time. I've heard one idea stating that it would be possible to check if the position of the cursor has changed every so often and if it has, the computer isn't idle.
Sadly, I can't seem to find any functions that return cursor positions. Does anyone know how to do this, or perhaps have a different idea about how to lock the computer after a certain idle time using scripting?
Thanks.
I apologize if this isn't MUSHclient related but I didn't really know where else to go. | top |
|
| Posted by |
Nick Gammon
Australia (18,772 posts) bio
Forum Administrator |
| Date |
Reply #1 on Thu 08 Feb 2007 07:40 PM (UTC) [ quote
] |
| Message |
I'm not sure if even this will work. Do you mean the mouse cursor (ie. the mouse position, which you can probably get in VBscript), or the text cursor (the flashing thing)?
If you check the text cursor, it is possible the PC is active, but the user is only moving the mouse. If you check the mouse position, it is possible the user is typing, and not moving the mouse.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Nick Gammon
Australia (18,772 posts) bio
Forum Administrator |
| Date |
Reply #2 on Thu 08 Feb 2007 07:41 PM (UTC) [ quote
] |
| Message |
| In any case, screen savers will do that, why not just use a screen saver that is configured to lock the PC when it activates? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Meerclar
USA (554 posts) bio
|
| Date |
Reply #3 on Thu 08 Feb 2007 11:05 PM (UTC) [ quote
] |
| Message |
| If you have a network, and presumably a domain, why not just use the GPO to log machines out after whatever is deemed an excessive time inactive? Otherwise, Nick's suggestion of passwording the screensaver would work just fine - given the removal of user ability to turn off their screensavers. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
5,023 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )