to use the GetTickCount you can just copy the whole code (provided in that link) and paste it at the end of your file, and then use it like this:
Code:
0AB1: call_scm_func @GetTickCount 0 _returnedTickCount 0@
0@ += 360000
while true
wait 0
0AB1: call_scm_func @GetTickCount 0 _returnedTickCount 1@
if 001D: 1@ > 0@
then
0085: 0@ = 1@
0@ += 360000
// 6 seconds passed
end
end
you could use 'GetLocalTime' like this:
Code:
{$CLEO}
0000:
0AB1: call_scm_func @Get_Second 0 0@
while true
wait 0
0AB1: call_scm_func @Get_Second 0 1@
0062: 1@ -= 0@
if 1@ < 0
then 1@ += 60
end
if 1@ >= 6
then
0AB1: call_scm_func @Get_Second 0 0@
// 6 seconds passed
0AD1: show_formatted_text_highpriority "6 sec passed. (0@ = %d)" 3000 0@
end
end
:Get_Second
0AC8: 30@ = allocate_memory_size 30
0AA2: 29@ = load_library "kernel32.dll" // IF and SET
if 0AA4: 28@ = get_proc_address "GetLocalTime" library 29@
then
0A8C: write_memory 30@ size 2 value 1 virtual_protect 1
0AA5: call_function 28@ num_params 1 pop 0 30@
0085: 31@ = 30@ // (int)
31@ += 12
26@ = 0
0A8D: 26@ = read_memory 31@ size 2 virtual_protect 1
end
0AA3: free_library 29@
0AC9: free_allocated_memory 30@
0AB2: ret 1 26@