Sign in to follow this  
Followers 0
Gursky

Shut off my Autoit At a specific time

5 posts in this topic

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")

Share this post


Link to post
Share on other sites



Try this:

AdlibEnable('_CheckTime')

Func _CheckTime()
    If @HOUR >= 7 Then
        Exit ; or do anything
    EndIf
EndFunc

good luck

Share this post


Link to post
Share on other sites

when i do this and try to run it i get an error that says "while statement with no match wend statement"

Share this post


Link to post
Share on other sites

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!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0