VB Script to keep pc from locking...(For the corp PC users)

Author Message
Izzy

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 2/1/2012
  • Status: offline
VB Script to keep pc from locking...(For the corp PC users) Wednesday, February 01, 2012 5:15 AM (permalink)
0
Here is a quick script that I wrote to keep from  Office Communicator from setting me to the away status while I am sitting at my desk doing other things. It will pop a box and if you hit the OK button it will terminate the script. If not after 4 minutes it will hit alt,tab to switch the screens...
 
 
Here is the code:
 
Option Explicit
Dim objShell
Set objShell = CreateObject("WScript.Shell")
Dim counter
Dim returnvalue

Do
   returnvalue = objShell.Popup ("Click OK to Canel Script",240, "Screen")
   If returnvalue = 1 then
   Set objShell = Nothing
   wscript.Quit
   End If
   If returnvalue <> 1 then
   objShell.SendKeys "%+{TAB}"
   End If

Loop
 
 
<message edited by Izzy on Wednesday, February 01, 2012 5:18 AM>
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9