Jump to content

Recommended Posts

Posted

Hi, I need help creating a script in autoit which will display the local time in a message box and will say "The times is:"

 

All I have is:

 

; Script Name : Change Background
; Author : Daniel Lambert
; Created : 2008

$time = ""




MsgBox (0, "Time Is", "The time is:" $time)

 

I am really stuck on the function to show local time.

Posted

Use the time macros:

 

@SEC Seconds value of clock. Range is 00 to 59

@MIN Minutes value of clock. Range is 00 to 59

@HOUR Hours value of clock in 24-hour format. Range is 00 to 23

@MDAY Current day of month. Range is 01 to 31

@MON Current month. Range is 01 to 12

@YEAR Current four-digit year

@WDAY Numeric day of week. Range is 1 to 7 which corresponds to Sunday through Saturday.

@YDAY Current day of year. Range is 1 to 366 (or 365 if not a leap year)

 

Use your time variable:

 

$time = @hour & ":" & @MIN
MsgBox(4096, "time", $time)

Posted

All I have is:

 


MsgBox (0, "Time Is", "The time is:" $time)

 

 

Also, IIRC, this should be:

 MsgBox (0, "Time Is", "The time is: " [b]&[/b] $time)

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



×
×
  • Create New...