Вот так
LCLICK(541,512) //
WAITMS(RND(2000,5000)) // 0
KEYPRESS(#PAGEDOWN)
WAITMS(RND(3000,5000))
LCLICK(788,858) //
WAITMS(RND(2000,5000)) // 0
LCLICK(732,924) //
WAITMS(RND(2000,5000))
KEYPRESS(#PAGEUP)
WAITMS(RND(3000,5000)) // 0
LCLICK(757,127) //
$time = $_time_t + RND(1400,2000) // 23-33 минут
WHILE($time > $_time_t)
WAIT(1)
$ts = $time-$_time_t
$th = 0
$tm = 0
while($ts > 3599)
INC($ts,-3600)
INC($th, 1)
end_cyc
while($ts > 59)
INC($ts,-60)
INC($tm, 1)
end_cyc
IF(STRLEN($th)<2)
$th = STRCONCAT ("0", $th)
END_IF
IF(STRLEN($tm)<2)
$tm = STRCONCAT ("0", $tm)
END_IF
IF(STRLEN($ts)<2)
$ts = STRCONCAT ("0", $ts)
END_IF
LOGCLEAR
LOGWRITE ("Осталось: ",$th,":",$tm,":",$ts)
END_CYC