Lamron
Benevolent Dictator
Posts: 5,225
|
Post by Lamron on Sept 4, 2008 2:57:41 GMT -5
Its probably happened to everyone. You lean back and get comfortable watching a long video on your computer and then your screen saver kicks in, or your power management settings shut off your monitor. So I decided to make a VBScript to make it quicker and easier to temporarily disable those functions. This will switch both your screen saver and power management settings. Download this and put it anywhere. Then shortcut it back to your desktop, taskbar, start menu, etc. so you can find it easily. www.lamronsplayground.com/Toggle_SS.vbs
|
|
Death's Shadow
LPmember
I have become Death. The destroyer of worlds.
Posts: 3,184
|
Post by Death's Shadow on Sept 4, 2008 11:17:58 GMT -5
very cool Lam.. TY
|
|
RedRock
LPmember
Never ask what kind of computer a person uses--if it's a Mac, he'll say; if not, why embarrass him?
Posts: 4,972
|
Post by RedRock on Sept 6, 2008 19:54:53 GMT -5
The Mac OS has customizable corner settings for the mouse, and I have one set to sleep now, one for never sleep, one for show desktop, and one for show all open windows at once. So, during a video, I just move the mouse all the way to the correct corner, to disable the screen-saver. While the computer is in use playing a video, it won't go into hard disk shut off.
|
|
Lamron
Benevolent Dictator
Posts: 5,225
|
Post by Lamron on Sept 6, 2008 23:06:25 GMT -5
|
|
Lamron
Benevolent Dictator
Posts: 5,225
|
Post by Lamron on Sept 7, 2008 2:30:38 GMT -5
Here is an experimental upgrade. I noticed that with no visual indicator, I would forget to turn the screensaver back on. This version turns off your wallpaper when you turn off the screensaver and power management. I say "experimental" because the tricky part was making it remember what background you had previously so it can be restored. I think I have it working, but test it and let me know if you have any problems with it (or just let me know if you find it useful). www.lamronsplayground.com/Toggle_SS_2.vbs============================================ VBS scripting is pretty flexible for automating functions and since it can simulate keypresses, can be used to control other programs. If anyone has any ideas/request for custom scripts, just ask and I'll give it a shot. For example, I've written a script that is started by Scheduler every morning at 5am. First it turns the monitor off, then runs a program that converts all my Favorites to a single HTML page. Then it opens a FTP connection to the website and uploads that page so that I can access my Favorites from any computer. Next, my disk backup runs (True Image). After that, it puts the computer back into standby mode, but gives an abort pop-up box just in case I happen to be using the computer at the time.
|
|
RedRock
LPmember
Never ask what kind of computer a person uses--if it's a Mac, he'll say; if not, why embarrass him?
Posts: 4,972
|
Post by RedRock on Sept 8, 2008 18:01:35 GMT -5
Aren't the VBS scripts dangerous? Isn't it true that many virus and trojans enter via downloaded VBS scripts during emails and web page visits/downloads? Just asking.
|
|
|
Post by Urumii-Previously ThePresident on Sept 8, 2008 19:25:40 GMT -5
I don't think Lamron is gonna create a VBS script with a virus in it. There would be a bunch of pissed off lamronians.
|
|
Lamron
Benevolent Dictator
Posts: 5,225
|
Post by Lamron on Sept 9, 2008 0:50:34 GMT -5
Aren't the VBS scripts dangerous? Isn't it true that many virus and trojans enter via downloaded VBS scripts during emails and web page visits/downloads? Just asking. Yes, .vbs and .bat files have pretty much unrestricted access to your entire computer. You should only run either if you trust the author, or check (and understand) the source code yourself. Here's the source code for this .vbs script. You can also open .vbs and .bat files with a text editor to check them out. Set WSHShell = WScript.CreateObject("WScript.Shell")
Current_Key = "HKCU\Control Panel\Desktop\Wallpaper" Old_Key = "HKCU\Control Panel\Desktop\Wallpaper_Old"
Current_Paper = WSHShell.RegRead (Current_Key)
If Current_Paper <> "" Then WshShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper_Old", Current_Paper End If
MyVar = MsgBox ("Enable Screen Saver and Power Management?",4) If MyVar = 6 Then WSHShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive", "1", "REG_SZ" switch = "POWERCFG /SETACTIVE " & chr(34) & "Home/Office Desk" & chr(34)
Old_Paper = WSHShell.RegRead (Old_Key) WshShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", Old_Paper WshShell.Run "rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0" Wscript.Sleep 0.7*1000 WshShell.SendKeys "{up}{down}%a%{F4}"
Else WSHShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive", "0", "REG_SZ" switch = "POWERCFG /SETACTIVE " & chr(34) & "Presentation" & chr(34)
WshShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", blank WshShell.Run "rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0" Wscript.Sleep 0.5*1000 WshShell.SendKeys "{down}{up}%a%{F4}"
End If
WSHShell.run switch
|
|
RedRock
LPmember
Never ask what kind of computer a person uses--if it's a Mac, he'll say; if not, why embarrass him?
Posts: 4,972
|
Post by RedRock on Sept 10, 2008 8:50:26 GMT -5
The Mac OS has an OS app called "Automator" which, I gather, creates and runs these kind of recurring simple tasks computer-wide (rather than being macros limited to a given program, such as word and excel or, perhaps, MS Office) such as you've outlined (wake up the pc, launch email, download emails, walk the dog, make the coffee, etc.), but I've never tried to learn to use it. That's a nice Windows functionality to know about.
|
|
Lamron
Benevolent Dictator
Posts: 5,225
|
Post by Lamron on Sept 16, 2008 16:02:21 GMT -5
Bug fix in V2. Changing the desktop was undoing the screensaver settings when switched.
I don't know if anyone is even using this, but you can redownload V2 for the fixed version.
|
|
Death's Shadow
LPmember
I have become Death. The destroyer of worlds.
Posts: 3,184
|
Post by Death's Shadow on Sept 16, 2008 17:54:45 GMT -5
I would like to use it Lam but I can not DL it. I click the link and just a new page opens displaying the vbs coding.
|
|
Lamron
Benevolent Dictator
Posts: 5,225
|
Post by Lamron on Sept 17, 2008 1:06:58 GMT -5
Try right-click and "Save Target As".
|
|
Death's Shadow
LPmember
I have become Death. The destroyer of worlds.
Posts: 3,184
|
Post by Death's Shadow on Sept 17, 2008 16:47:33 GMT -5
got it thanks
It appears to be working as intended, I will let ya know how it goes. thanks again ;D
|
|