Jump to content
Sign in to follow this  
innggo

if clock time is __ then

Recommended Posts

innggo

Hello,

I'm new to AutoIt and I am excited by the possibilities of this great tool ! I've searched the help and the forum (up to the 8th result page) and I have not found an answer. I would like to know how to code this rule : if clock time is 1500 then ______

I have not found a way to access my windows clock time to automate some processes. I could use windows planner to run the exe file but if there is a way to code it I would be more pleased.

Thanks for your help !

Share this post


Link to post
Share on other sites
somdcomputerguy

The macros @HOUR and @MIN could be used.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
EndFunc

use the time and date macros

@Hour & ":" & @Min

Edit: Dang I got beat buy two. LOL

Edited by EndFunc

EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites
somdcomputerguy

And the _NowTime() function for 'clock time'


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
innggo

Wow ! Quick answer ! Thanks a lot guys !

Share this post


Link to post
Share on other sites
innggo

Maybe it would be helpful to say a bit more about what I am trying to do as I am stuck.

I would like to automate certain tasks on a webpage at a certain time (let's say from 1 to 2 pm). Here I would like to open the brower and the page first.

But how can I leave the program running till it has performed its tasks ?

While _NowTime() = 13/35/00
    RunWait( "C:\Program Files\Opera\opera.exe")
        Send(" ^n http://www.autoitscript.com/forum/index.php {ENTER}" )
WEnd

Thanks

Share this post


Link to post
Share on other sites
innggo

Well maybe I should use the Windows Task Scheduler after all... May be simpler.

Maybe it would be helpful to say a bit more about what I am trying to do as I am stuck.

I would like to automate certain tasks on a webpage at a certain time (let's say from 1 to 2 pm). Here I would like to open the brower and the page first.

But how can I leave the program running till it has performed its tasks ?

While _NowTime() = 13/35/00
    RunWait( "C:\Program Files\Opera\opera.exe")
        Send(" ^n http://www.autoitscript.com/forum/index.php {ENTER}" )
WEnd

Thanks

Share this post


Link to post
Share on other sites
innggo

Fantastic ! Thanks a lot Snowmaker.

I've got a lot to learn.

Share this post


Link to post
Share on other sites
innggo

That's great and all, but then it will only execute once ;)

Actually my dream would be to have a random time within a certain time of the day, eg. anytime from 1 pm to 5 pm, when my tasks are performed everyday...

Share this post


Link to post
Share on other sites
James

Actually my dream would be to have a random time within a certain time of the day, eg. anytime from 1 pm to 5 pm, when my tasks are performed everyday...

Does that mean I'm like a witch doctor? Check out the Random() function.

Share this post


Link to post
Share on other sites
innggo

Thanks everybody ! I hope to come back here with a pseudo random time code in a few weeks.

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  

×