Kibor Bot Autoclicker » Kibor - Integrated development environment for bots » About Kibor » Version 2.16 Getting the local date and time on the computer

Страниц (1): [1]
 

1. Kibor - 24 Июля, 2018 - 05:21:22 - перейти к сообщению
The function getlocaltime allows you to get the local date and time on the computer.

Syntax:

CODE:
int Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds;
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;


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;

Powered by ExBB FM 1.0 Final