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)
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"
|
|
|
|
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)
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").
|
|
|
|
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)
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.
|
|
|
|