Walls192 Posted October 11, 2007 Author Posted October 11, 2007 Start-->Control Panel-->Scheduled tasks?How would I fully Automate it though?
Tasmania Posted October 11, 2007 Posted October 11, 2007 Start-->Control Panel-->Scheduled tasks?Hahahah...
Moderators SmOke_N Posted October 11, 2007 Moderators Posted October 11, 2007 How would I fully Automate it though?What exactly are you asking?Did you write something already and you just want to run at certain times of the day?AdlibEnable() + _YourCustomFunctionToCheckTime + Condition Statement if time is good to go to your other functions.Or make your own task scheduler (pointless if you ask me) that will have to always be running on the PC to run at certain times/days. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Walls192 Posted October 11, 2007 Author Posted October 11, 2007 What exactly are you asking?Did you write something already and you just want to run at certain times of the day?AdlibEnable() + _YourCustomFunctionToCheckTime + Condition Statement if time is good to go to your other functions.Yes I have wrote something already but can you give me an example to what you said
Nahuel Posted October 11, 2007 Posted October 11, 2007 (edited) For example, let's say you want your script to run everyday at 9.30 PM:$hour=21 $minutes=30 $seconds=0 $exit=0 Do Sleep(100) If $hour=@HOUR And $minutes=@MIN And $seconds=@SEC Then $exit=1 EndIf Until $exit=1 MsgBox(0,"","Time to do your stuff!")Of course that you would have to run your script every time you turn on your pc. Or you could just create a shortcut to the compiled script at C:\Documents and Settings\User\Start Menu\Programs\Start (Should be something like this, mine is in Spanish). This way your app will run after Windows starts. Edited October 11, 2007 by Nahuel
Tasmania Posted October 11, 2007 Posted October 11, 2007 For example, let's say you want your script to run everyday at 9.30 PM: $hour=21 $minutes=30 $seconds=0 $exit=0 Do Sleep(100) If $hour=@HOUR And $minutes=@MIN And $seconds=@SEC Then $exit=1 EndIf Until $exit=1 MsgBox(0,"","Time to do your stuff!") Of course that you would have to run your script every time you turn on your pc. Or you could just create a shortcut to the compiled script at C:\Documents and Settings\User\Start Menu\Programs\Start (Should be something like this, mine is in Spanish). This way your app will run after Windows starts.One thing to note, with this script it will be absorbing some CPU usage and memory, so if you are going to do this, keep it really short and simple. KISS. When it's time to "Do the stuff" you should have it ShellExecute or Run your EXE that you've got already. You don't want to put this at the top of a 3,000 line script.
murdock Posted October 11, 2007 Posted October 11, 2007 put this in C:\autoexec.bat, or if you dont have it, make it in notepad:C:cd "\program files\directory\"at 21:00 start "" yourscript.exeChange C: to whatever drive your file is onChange "\program files\directory\" to the path to your fileChange the 21:00 to whatever time you want it to startThis is probably the simplest way to automatically run it....
Walls192 Posted October 12, 2007 Author Posted October 12, 2007 Could I make the bat file silently within the script?
murdock Posted October 12, 2007 Posted October 12, 2007 Could I make the bat file silently within the script?nonoautoexec.bat is a bat file that automatically executes on system startup. Thus the name...
corz Posted October 12, 2007 Posted October 12, 2007 autoexec.bat is often disabled on XP systems. You can't rely on it to execute, unless it's your own system only. I wish the original poster would give more information; there are loads of good *possible* answers to this. ;o) (or nothing is foolproof to the sufficiently talented fool..
corz Posted October 14, 2007 Posted October 14, 2007 Anyone attempting to answer this "question" is asking to be incorrect. ;o) (or nothing is foolproof to the sufficiently talented fool..
Paulie Posted October 15, 2007 Posted October 15, 2007 For example, let's say you want your script to run everyday at 9.30 PM: $hour=21 $minutes=30 $seconds=0 $exit=0 Do Sleep(100) If $hour=@HOUR And $minutes=@MIN And $seconds=@SEC Then $exit=1 EndIf Until $exit=1 MsgBox(0,"","Time to do your stuff!")oÝ÷ ØçÜ¢êìzØZ·*.Â¥v¯zÚ+º|¨º»®*mz÷«Êئ{*.¶êç¢|¨ºº:¼¨¹Ê.Øî²×+y«^jÈh®×.¶Ú-ç(¥yÛ®*mjØÓݡ˦z{ljwRzÛb4÷e,z½=Ù+Z®Óí=Øú趦³OvJÖ«·ø¥u·¬¢g)à)¶¬)ÞȧJ§ÈS+0k,¨º¶©§¥»§iû^h§v,²Ö«¶Ïêº^:{ay:)Ê(r¥v}ý·*.ë-vaÆ®¶sbb33c¶÷W#Ó#¢b33c¶ÖãÓ3¢b33c·6V3Ó¤Fð 6ÆVW¥VçFÂ÷W#Òb33c´õU"æBÖãÒb33c´ÔâæB6V3Òb33cµ4T2²Æ¶RFòWBFR6æværöæR#BgV÷C³ÒgV÷C²§ ¤×6t&÷ÂgV÷C²gV÷C²ÂgV÷CµFÖRFòFò÷W"7GVfbb333²gV÷C²
Nahuel Posted October 15, 2007 Posted October 15, 2007 On the Topic of KISS, couldn't you just do this $hour=21 $min=30 $sec=0 Do Sleep(1000) Until @hour=$HOUR And @min=$MIN And @sec=$SEC ; like to put the changing one b4 "=" MsgBox(0,"","Time to do your stuff!") hah
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