Gursky Posted July 5, 2006 Share Posted July 5, 2006 I have my AutoIt Script made. I could have just been happy with that accomplishment. But nope. lol I would like to add into my script a way to have my Script check what time it is and if it is like 7 am then have it end the script. Since i couldnt figure that out i wrote another very simple program to disconnect me from the internet since i have dial up until the 11th and the parents get mad if i am on when they need the phone. Anyway so i have two separate programs. One my AutoIt for the web and the other my "disconnect" autoit. So finally my questions are... 1.What would the statement look like to end the script at 7? 2. Where would I put this statement (inside my loop, at end of script, beginning)? 3. Shoule i make a 3rd program to join both scripts or what? (i.e. Run("Webscript") TIME IF STATEMENT IF time is >=7 then end webscript If time is >= 7 then Run ("disconnect") Link to comment Share on other sites More sharing options...
Briegel Posted July 5, 2006 Share Posted July 5, 2006 Try this: AdlibEnable('_CheckTime') Func _CheckTime() If @HOUR >= 7 Then Exit ; or do anything EndIf EndFunc good luck Link to comment Share on other sites More sharing options...
Gursky Posted July 5, 2006 Author Share Posted July 5, 2006 when i do this and try to run it i get an error that says "while statement with no match wend statement" Link to comment Share on other sites More sharing options...
marfdaman Posted July 5, 2006 Share Posted July 5, 2006 That must have something to do with the rest of your script. Could you post that? Alzo Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link to comment Share on other sites More sharing options...
Briegel Posted July 5, 2006 Share Posted July 5, 2006 This code works fine at my system. Please use SciTE for trying and then post the error. Do you use AutoIt v3.1.1 or Beta? 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