Jump to content

Recommended Posts

Posted (edited)

say i have

$Fighter = PixelSearch( 6, 28, 619, 408, $Color, 1, 0)
If Not @error Then MouseClick("left", $Fighter[0], $Fighter[1], 1, 0)

and i want my mouse to follow along the x axis but after it gets there i want it to quickly move up the y axis a couple pixels how would i do that ?

Edited by nowayhome2
Posted

I really don't get what you're trying to say.

Could you provide us more information?

$Pixel = PixelSearch(0,0,100,100,0xffffff) ;Will look for the white color from coords 0,0 to coords 100,100.
MouseMove($Pixel[0],$Pixel[1],3) ;Will move the cursor to there.
MsgBox(64,"Found it!","X: "&$Pixel[0]&@CRLF&"Y: "&$Pixel[1])
Posted (edited)

i want it to find the pixel color im looking for on the x axis get there then mouseclick at 5 pixels down directly from the found pixel if that makes any sense ?

Posted Image

where the pink color is where i want the mouse to move the line represents i want it to go directly down from that and click on the orange circle.

or not even move there just find that pixel color and move directly down from that point

Edited by nowayhome2
Posted (edited)

i want it to find the pixel color im looking for on the x axis get there then mouseclick at 5 pixels down directly from the found pixel if that makes any sense ?

where the pink color is where i want the mouse to move the line represents i want it to go directly down from that and click on the orange circle.

or not even move there just find that pixel color and move directly down from that point

Something like this? It will first move to the found pixel, then click 5 pixels lower.

$Fighter = PixelSearch( 6, 28, 619, 408, $Color, 1, 0)
If Not @error Then
    MouseMove($Fighter[0],$Fighter[1])
    MouseClick("left", $Fighter[0], $Fighter[1]+5, 1, 0)
EndFunc

Edit: removed the image

Edited by Tvern
Posted (edited)

Something like this? It will first move to the found pixel, then click 5 pixels lower.

$Fighter = PixelSearch( 6, 28, 619, 408, $Color, 1, 0)
If Not @error Then
    MouseMove($Fighter[0],$Fighter[1])
    MouseClick("left", $Fighter[0], $Fighter[1]+5, 1, 0)
EndFunc

Edit: removed the image

thank you so much >_<

now how would i move it up instead of down?

i assume

$Fighter = PixelSearch( 6, 28, 619, 408, $Color, 1, 0)
If Not @error Then
    MouseMove($Fighter[0],$Fighter[1])
    MouseClick("left", $Fighter[0], $Fighter[1]-5, 1, 0)
EndFunc

but then i get an error either way up or down

Subscript used with non-array variable
Edited by nowayhome2
Posted

Sorry auto complete made me write "EndFunc" It should be "EndIf"

And yes Changing "$Fighter[1]+5" to "$Fighter[1]-5" will move the mouse up, instead if down.

In the same way ""$Fighter[1]+50" will move 50 pixels down instead of 5.

  • 1 month later...
Posted

i have a similar type of request but do not really understand the commands that well yet, this is what i tried to do:

$color=PixelSearch(1,400,400,1,0xFFBA4A)

mousemove($color)

mouseclick("left")

$color=PixelSearch(1,400,400,1,0x94BE42)

mousemove($color)

mouseclick("left")

its supposed to search a rectangle of 400 length and width (im assuming left = 0, right = max, down = 0 and up = max) ?

for color 1, 0xFFBA4A, move to that color, click it,

then search for color 2, 0x94BE41

move to that color and then click it.

thanks in advance to all who help =)

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...