Syntax:
CODE:
int Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds;
getlocaltime (Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
messagebox (Minute);
getlocaltime (Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
messagebox (Minute);
Displays the minutes.
Example of a clock in a corner
CODE:
int Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds;
textbkcolor (255, 65535);
a: getlocaltime (Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
textout (0, 10, 10, "Time:" + format (Hour) + "hours," + format (Minute) + "minutes," + format (Second) + "seconds", 1);
sleep (100);
goto a;
textbkcolor (255, 65535);
a: getlocaltime (Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
textout (0, 10, 10, "Time:" + format (Hour) + "hours," + format (Minute) + "minutes," + format (Second) + "seconds", 1);
sleep (100);
goto a;
or more optimal
CODE:
int Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds;
string time="", t_time="";
textbkcolor (255, 65535);
a: getlocaltime (Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
time="Time:" + format (Hour) + "hours," + format (Minute) + "minutes," + format (Second) + "seconds";
if (time!=t_time)
{
textout (0, 10, 10, time, 1);
t_time=time;
}
sleep (100);
goto a;
string time="", t_time="";
textbkcolor (255, 65535);
a: getlocaltime (Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
time="Time:" + format (Hour) + "hours," + format (Minute) + "minutes," + format (Second) + "seconds";
if (time!=t_time)
{
textout (0, 10, 10, time, 1);
t_time=time;
}
sleep (100);
goto a;