guackyxxx Posted January 27, 2005 Posted January 27, 2005 I am new to AutoIt3, and so please bear with me. I have been trying to run a script unattended overnight, using the Windows Scheduler tool. When I run the script to test it it works fine. But when I leave it unattended it doesn't work. I believe the issue could be the screensaver that kicks in. How do I turn off the screensaver as the first task of the script?
falconv Posted January 27, 2005 Posted January 27, 2005 If the script is running, (please correct me if I'm wrong if anyone knows different) then the screensaver shouldn't activate because the script is sending actions, so the computer isn't idle. If needed though, you could add this to the beginning: Run( "rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1" ) WinWaitActive( "Display Properties" ) Send("(" & "!a" & "{Enter}")then place this in the quit function so when you press the Exit hotkey it turns the screensaver back on (if you want)Run( "rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1" ) WinWaitActive( "Display Properties" ) Send("w" & "!a" & "{Enter}");replace the w with whatever letter(s) it takes to get your original screensaver back hope it helps.
tazdev Posted January 28, 2005 Posted January 28, 2005 (edited) If nothing else use the program Wizmo. You can run it in the script to turn off the screensaver until done then turn it back to default.http://grc.com/wizmo/wizmo.htmblank activate the system's screen saverThis simply trips the system's currently chosen screen saver exactly as if the screen saver's automatic timeout had been reached. Since this is not a Wizmo hosted screen saver, the command merely triggers one of Windows' built-in savers. Wizmo command scripting will therefore not "pause" at the screen saver command as they do for the Wizmo hosted commands. This limits the usefulness of Wizmo's command scripting for this command.Example: wizmo blank autoblank={0|1} disables/enables timed blankingIf, unlike me, you prefer timed blanking or your screens, there may be times like when you're on the phone, or watching the system perform a lengthy defragmentation when you don't want a short screen blanker timeout. This command, given a "0" argument (to disable autoblanking) or a "1" (to enable autoblanking), will disable or enable the system's automatic screen saving timeout.Example: wizmo autoblank=0 (disable timed blanking) Edited January 28, 2005 by tazdev
Valik Posted January 28, 2005 Posted January 28, 2005 MouseMove() (And possibly Send()) simulates input which resets the system idle timer, meaning a screen-saver won't kick on (Or I would assume, once it is on, will kick it back off). Thats unless the screen-saver has a password on it, of course.
CyberSlug Posted January 28, 2005 Posted January 28, 2005 MouseMove() (And possibly Send()) simulates input which resets the system idle timer, meaning a screen-saver won't kick on (Or I would assume, once it is on, will kick it back off). Thats unless the screen-saver has a password on it, of course.<{POST_SNAPBACK}>One thought for password-enabled screensavers is to increase the grace period:http://www.winguides.com/registry/display.php/1191/ Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
guackyxxx Posted January 28, 2005 Author Posted January 28, 2005 Everyone: Thank you so much. These are all fantastic suggestions. Help is much appreciated. Your suggestions caused me to go back and revisit the problem, and I think I have foudn the solution, unrelated (sorry!) to the screensaver. Will be runnign tonight so we'll see. Thanks again for your help. I do need help with something: I'll post it on a new thread, but simply, here it is. If I want to run three scripts in succession, but do not want to consolidate them into one script, I assume the best way is to write a script that "calls" the other three scripts . . . ?
this-is-me Posted January 28, 2005 Posted January 28, 2005 There's really no "best" way, but if all three are compiled, then you can use fileinstall and run to do them each. Who else would I be?
Josbe Posted January 28, 2005 Posted January 28, 2005 Everyone:Thank you so much. These are all fantastic suggestions. Help is much appreciated.Your suggestions caused me to go back and revisit the problem, and I think I have foudn the solution, unrelated (sorry!) to the screensaver. Will be runnign tonight so we'll see. Thanks again for your help.I do need help with something: I'll post it on a new thread, but simply, here it is. If I want to run three scripts in succession, but do not want to consolidate them into one script, I assume the best way is to write a script that "calls" the other three scripts . . . ?<{POST_SNAPBACK}>I think that, depending to the necessity and objective of each script. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
CyberSlug Posted January 28, 2005 Posted January 28, 2005 If I want to run three scripts in succession, but do not want to consolidate them into one script, I assume the best way is to write a script that "calls" the other three scripts . . . ?<{POST_SNAPBACK}>Here's a trick that might come in handy depending if you compile scripts:; Probably requires the latest AutoIt Beta If @Compiled Then Run("nameOfOtherScript.exe") Else Run(@AutoItExe & " " & "nameOfOtherScript.au3") EndIf Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
guackyxxx Posted January 28, 2005 Author Posted January 28, 2005 Mmmm. Lots of suggestions. More info: 1. They are not compiled 2. The scripts essentially open up Excel files, and then download a bunch of security pricign data, do a bunch of calculations, and then close and save the updated Excel file. 3. I need to do this for three different excel files. 4. Each download, calculation, and save can take up to an hour. These are big files with tons of data and some fairly complex calcs. That is why I want to run this in the middle of the night when I am sound asleep! 5. Each script works fine. I have set up a "master script" that will invoke the other three in succession. I am now wondering if there should be some logic "between" each script that verifies whether the previous one had finished. My guess is that I do need that. But how? Do I test for the Microsoft Excel Window NOT to be active? Or should I look for the desktop? So many questions. So few answers.
souldjer777 Posted May 27, 2011 Posted May 27, 2011 (edited) This is a great way to disable the screen saver - total hands free app the I've been using "Caffeine.exe"$scriptlocation = @ScriptDirRun($scriptlocation &"\Caffeine\Caffeine.exe")Sleep(5000)It will run in the taskbar until you reboot - Just go download it and put it in your Script Location - sweet! Caffeine.exe:http://download.cnet.com/Caffeine/3000-2094_4-10914397.html?tag=mncol;1 Edited May 27, 2011 by souldjer777 "Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"Song Title: I guess you could sayArtist: Middle Class Rut
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now