Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using sum to do certain action
#1
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:
Code:
Copy      Help
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 ;;


Messages In This Thread
Using sum to do certain action - by badrobotic - 05-21-2023, 10:54 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)