MaCgyver Posted February 16, 2006 Share Posted February 16, 2006 I want a particular script to run at a certain time? Can autoit do this? Link to comment Share on other sites More sharing options...
rudika Posted February 16, 2006 Share Posted February 16, 2006 I want a particular script to run at a certain time? Can autoit do this?moin, moin...! try something like this: If @WDay = 1 Then Sleep(90000) RunFunction() Else Exit EndIf [font="Comic Sans Ms"][center]Powered by AutoIt3http://www.wik-eric.de/zips/Synchro2.2.2-4free.zip[/center][/font] Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted February 16, 2006 Moderators Share Posted February 16, 2006 (edited) This should work: #Include <Date.au3> While 1 $Time = _NowTime(4) If $Time == "hh:mm" Then;change hh:mm to whatever time you want it to run ExitLoop Else Sleep(500);you can make this longer if you don't need it to be exact EndIf WEnd ;Whatever function you want to run here Edit: I had the variable outside the while statement Edit: And an EndIf Edited February 16, 2006 by big_daddy Link to comment Share on other sites More sharing options...
flaxcrack Posted February 16, 2006 Share Posted February 16, 2006 moin, moin...! try something like this: If @WDay = 1 Then Sleep(90000) RunFunction() Else Exit EndIf moin? [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD() Link to comment Share on other sites More sharing options...
rudika Posted February 16, 2006 Share Posted February 16, 2006 (edited) moin?yah... it´s a north german greet at every time the day Edited February 16, 2006 by rudika [font="Comic Sans Ms"][center]Powered by AutoIt3http://www.wik-eric.de/zips/Synchro2.2.2-4free.zip[/center][/font] Link to comment Share on other sites More sharing options...
MaCgyver Posted February 16, 2006 Author Share Posted February 16, 2006 moin? Thanks guys. I was trying to work out something along the lines of what Big Daddy wrote.Thanks! Link to comment Share on other sites More sharing options...
flaxcrack Posted February 16, 2006 Share Posted February 16, 2006 yah... it´s a north german greet at every time the dayNice! I'll have to remember that... [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD() Link to comment Share on other sites More sharing options...
MaCgyver Posted February 16, 2006 Author Share Posted February 16, 2006 I tried the sample script in the helpfile but that gives me an error. I will further research, but thanks anyway! Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted February 16, 2006 Moderators Share Posted February 16, 2006 I tried the sample script in the helpfile but that gives me an error. I will further research, but thanks anyway!Are you saying you tried my code along with a script from the help file and it didn't work? I just tested it with a few of my scripts and it worked fine. Link to comment Share on other sites More sharing options...
milkman Posted February 17, 2006 Share Posted February 17, 2006 #Include <Date.au3>While 1$Time = _NowTime(4) If $Time == "hh:mm" Then;change hh:mm to whatever time you want it to run ExitLoop Else Sleep(500);you can make this longer if you don't need it to be exact EndIfWEnd;Whatever function you want to run hereAre 2 equal signs there on purpose? Maybe thats the error Link to comment Share on other sites More sharing options...
PartyPooper Posted February 17, 2006 Share Posted February 17, 2006 Several ways to accomplish this... - Use one of the inbuilt macros to ascertain the time and go from there (@Hour etc). This requires script to be running all the time. - Use Windows Scheduler to launch a script at a predetermined time. Link to comment Share on other sites More sharing options...
herewasplato Posted February 17, 2006 Share Posted February 17, 2006 (edited) Are 2 equal signs there on purpose? Maybe thats the errorfrom the help file under Operators:== Tests if two values are equal (case sensitive if used with strings)edit:= Tests if two values are equal (case insensitive if used with strings). Edited February 17, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
MaCgyver Posted February 17, 2006 Author Share Posted February 17, 2006 Several ways to accomplish this...- Use one of the inbuilt macros to ascertain the time and go from there (@Hour etc). This requires script to be running all the time.- Use Windows Scheduler to launch a script at a predetermined time.Sometimes I get a one track mind. Plus I haven't used Windows Scheduler in a few years, so I totally forgot it.Thanks Link to comment Share on other sites More sharing options...
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