[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Using VBScript to get Idle Time
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Using VBScript to get Idle Time

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Rune   (1 post)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (19,470 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (19,470 posts)  [Biography] 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
[Go to top] top

Posted by Meerclar   USA  (586 posts)  [Biography] 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
[Go to top] 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.


6,058 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]