Auto Save

Author Message
Fredledingue

  • Total Posts : 572
  • Scores: 2
  • Reward points : 0
  • Joined: 5/9/2005
  • Location: Europe
  • Status: offline
Auto Save Tuesday, October 13, 2009 10:34 AM (permalink)
0
Since there are fans of the sendkey methods here...
This assume you work with programs which use Ctr + S to save.
 
     MyTitle="AutoSave 0.2"
      If (MsgBox("Start AutoSave?" & VbCrlf & "(Ctrl+S every 45 seconds)", vbOk, MyTitle) = vbCancel) Then
      WScript.Quit
      End if
     Set WshShell = WScript.CreateObject("WScript.Shell")
     WshShell.RegWrite "HKCU\SOFTWARE\DingueVBS\AutoSave",1,"REG_SZ"
     WScript.Sleep 45000
      Do Until WshShell.RegRead("HKCU\SOFTWARE\DingueVBS\AutoSave") = 0
      WshShell.SendKeys "^s"
      WScript.Sleep 45000
      Loop
     MsgBox "AutoSave ""Ctrl + S"" desactivated!",,MyTitle     

 
to desactivate, a second script is necessary:
      If (MsgBox("Stop AutoSave?", vbOk, "AutoSave") = vbCancel) Then
      WScript.Quit
      End If
     WScript.CreateObject("WScript.Shell").RegWrite "HKCU\SOFTWARE\DingueVBS\AutoSave",0,"REG_SZ"     

 
Fred
 
#1
    ehvbs

    • Total Posts : 3320
    • Scores: 112
    • Reward points : 0
    • Joined: 6/22/2005
    • Location: Germany
    • Status: offline
    Re:Auto Save Wednesday, October 14, 2009 10:34 PM (permalink)
    0
    This is either dangerous (your email client may send a message to your boss
    before you delete the parts that a second reading will reveal as insolent) or
    naive (there is no banking software that pops up a message like "Press
    ^S to send all your money to Fred").
     
    #2
      Fredledingue

      • Total Posts : 572
      • Scores: 2
      • Reward points : 0
      • Joined: 5/9/2005
      • Location: Europe
      • Status: offline
      Re:Auto Save Friday, October 16, 2009 9:58 AM (permalink)
      0
      LOL.

      Seriousely, the only danger is when you delete everything on your work by mistake (sellect all + Delete is easy to do) and the script send the Ctrl+S stroke just before you were about to press the "undo" button.
      Fred
       
      #3

        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