Jump to content

Recommended Posts

Posted

Hi Huserx,

Please create descriptive topics.

Using one word topics makes it really difficult to use the search feature, and those that could probably answer your question will probably not even read your thread.

Doing it enough could cause your posting privileges to be taken away all together, and we don't want that :) .

Thanks.

Posted

. . . I could copy the whole scripy make it 5 times as long with each option different but I am hoping theres a way to make it run the preceeding script choose between the 5 locations and run the following script

MouseMove(1070,284)

MouseDown("right")

MouseUp("right")

If you know the 5 x,y coord, you can put them into an array and loop through the array. Also you can use MouseClick("right", 1070,284) in place of the MouseMove(), MouseDown(), MouseUp() lines. Other things to look up in the Help file would be Ubound.
Posted

I had a hard time starting with arrays myself so I know it can be a bit...well it makes your brain turn to mush :) . You can store the values in an array by dimming it then assigning an index a value. Like this:

Dim $x[5], $y[5], $i = 1
$x[1] = *your 1st x value*
$x[2] = *your 2nd x value*
...
$y[1] = *your 1st y value*
$y[2] = *your 2nd y value*

For $i = 1 To UBound($x); count the number of indexes so you don't exceed it and cause an error
MouseClick("left",$x[$i],$y[$i]); move the mouse to the coordinates
Next
Posted (edited)

. . . You can store the values in an array by dimming it then assigning an index a value. . .

1d array like dbzfanatic will work just fine or you can use a 2d array. You'll note the loop is virtually the same.

Dim $aClicks[10][3] = [["right",1074,266],["left",1109,276],["right",1074,284],["left",1103,294] _
,["right",1074,304],["left",1109,313],["right",1074,323],["left",1109,333],["right",1074,346],["left", 1109,351]]

$j = 0
For $i = 0 to UBound($aClicks, 1) -1
    MouseClick($aClicks[$i][$j], $aClicks[$i][$j+1], $aClicks[$i][$j+2])
    Sleep(5000)
Next
Edited by ssubirias3
Posted

Here is an example based on post #6

Dim $X = 0, $MouseClick[5][4]=[[1074, 264, 1103, 274], [1074, 284, 1103, 294], [1074, 304, 1103, 314], [1074, 324, 1103, 334], [1074, 344, 1103, 354]]

While 1
    If $X = 5 Then $X = 0
    Sleep(5000)
    MouseClick("left", 15, 1016)
    Sleep(1000)
    Sleep(30000)
    MouseClick("right", $MouseClick[$X][0], $MouseClick[$X][1])
    Sleep(1000)
    MouseClick("left", $MouseClick[$X][2], $MouseClick[$X][3])
    Sleep(1000)
    Sleep(60000)
    MouseClick("right", 1074, 360)
    Sleep(1000)
    MouseClick("left", 1100, 400)
    Sleep(1000)
    Sleep(60000)
    $X += 1
Wend

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
×
×
  • Create New...