Jump to content
Sign in to follow this  
Muchuchu

Global Arrays

Recommended Posts

I want me script to do function firstround, then take the arrays/variables from there and use them in function secondround which comes after a loop of firstround. I want it to do a pixelsearch, get the coordinates, then do a getmouseposition, take those coordinates, then use them in the second function, but it is saying my arrays are not written correctly, but i really don't know why.

func firstround()
    do
        do
    $i = 0
       global $arr1[2][1000]
       sleep("1000")
       global $coord1 = PixelSearch(0, 0, 1279, 1023, $vary4)
              If @error Then
                  PixelSearch(0, 0, 1279, 1023, $vary4)
              EndIf
          until not @error
     global $arr1[0][$i] = $coord1[0]
     global $arr1[1][$i] = $coord1[1]
        Sleep("70")
           MouseMove($coord1[0], $coord1[1])
          Sleep("70")
          MouseDown("right")
          Sleep("100")
          MouseUp("right")
          
    
   
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Goes down 40 pixels

    
 
     global $a = mousegetpos()

    sleep("1000")
    global $right = mousemove($a[0], $a[1] + 40)
    sleep("600")
          MouseDown("right")
          Sleep("100")
          MouseUp("right")


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 sleep("600")
          MouseDown("left")
          Sleep("200")
          MouseUp("left")
          
          $i = $i + 1
      until $i = 1
      endfunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


func secondround()
    do
    sleep("1000")
    MouseMove($coord1[0], $coord1[1])
    sleep("600")
    MouseDown("right")
          Sleep("100")
          MouseUp("right")
          sleep("600")
          MouseMove($coord1[0], $coord1[1] + 40)
          sleep("400")
          MouseDown("left")
          Sleep("200")
          MouseUp("left")
          
          $i = $i + 1
      until $i = 1
    
    endfunc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...