05-21-2023, 10:54 PM
(This post was last modified: 05-21-2023, 10:58 PM by badrobotic.)
Hello.
I'm trying to create a method to perform a certain action when a variable fulfills a certain condition.
But it is not working, the program accuses duplicity in the variable "i".
It would be better for me if I could start a timer, when starting the script and doing a certain action after 30 seconds for example, restarting the timer.
Thanks
For example:
I'm trying to create a method to perform a certain action when a variable fulfills a certain condition.
But it is not working, the program accuses duplicity in the variable "i".
It would be better for me if I could start a timer, when starting the script and doing a certain action after 30 seconds for example, restarting the timer.
Thanks
For example:
int i=1
;; start stopwatch
Loop
wait 0.1
RECT r;
SetRect &r 650 284 859 400 ;
if(scan("color:0x55AAFF" w r 16 4))
mou r.left+r.right/2 r.bottom+50
key+ F2 ;; F3
wait 0.1
key- F2 ;; F3
;; if (stopwatch = 30 seconds)
key V ;; Space
restart stopwatch
int i+
if (i=15)
key V ;; Space
int i=1
goto Loop ;;
SetRect &r 12 77 1414 649 ;
if(scan("color:0x55AAFF" w r 16 4))
mou r.left+r.right/2 r.bottom+50
key+ F2 ;; F3
wait 0.1
key- F2 ;; F3
goto Loop ;;
else
key V ;; Space
wait 0.5
goto Loop ;;