Jump to content
Sign in to follow this  
ozzymandius

Newbie Q - How to retrieve and use PC System Time?

Recommended Posts

ozzymandius

Hello, hoping someone can point me in the right direction.

I've just started to learn AutoIt, and went through the documentation and tutorials. But I don't see a way to retrieve the PC's system time. I know I can get file creation times and what not, but how do I just get system time?

What I basically want to do is launch an app, then at specific times (say 9am and 9pm) I want to automatically click on some windows and enter some data.

The part I am stuck on is retrieving System Time from the PC and using that to mark the start of an action. Any help much appreciated.

Share this post


Link to post
Share on other sites
darkmaster071

Before you go posting on the forums: search the helpfile, search google, search forums. I just copied that code from searching 2mins, didnt even enter autoit. Otherwise good luck :)

$Time = @HOUR & ":" & @MIN & ":" & @SEC
$Date = @MON & "/" & @MDAY & "/" & @YEAR 
MsgBox(0, "", $Time & "  " & $Date)
Edited by darkmaster071

Share this post


Link to post
Share on other sites
ozzymandius

Thanks a bunch!

I did do some searchs, but obviously I didn't search extensively enough. Will do better next time.

Before you go posting on the forums: search the helpfile, search google, search forums. I just copied that code from searching 2mins, didnt even enter autoit. Otherwise good luck :)

$Time = @HOUR & ":" & @MIN & ":" & @SEC
$Date = @MON & "/" & @MDAY & "/" & @YEAR 
MsgBox(0, "", $Time & "  " & $Date)

Share this post


Link to post
Share on other sites
herewasplato

... What I basically want to do is launch an app, then at specific times (say 9am and 9pm) I want to automatically click on some windows and enter some data. ...

Welcome to the forum.

You might want to just use the operating system's Task Scheduler to handle launching things at certain times.

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.