Jump to content

Pixelsearch


Amh.p
 Share

Recommended Posts

I am tryng to move my mouse to a colour i am not sure if this is right the mousemove works but it ceep moving to the most left side of my screen wile this test colour issend there,

Enyone got enysugestions ?

$coord = PixelSearch( 0, 0, 20, 300, 0xD4D0C8 )

If Not @error Then

mousemove ( "X and Y are:", $coord[0] & "," & $coord[1])

Endif

Link to comment
Share on other sites

I am tryng to move my mouse to a colour i am not sure if this is right the mousemove works but it ceep moving to the most left side of my screen wile this test colour issend there,

Enyone got enysugestions ?

$coord = PixelSearch( 0, 0, 20, 300, 0xD4D0C8 )

If Not @error Then

mousemove ( "X and Y are:", $coord[0] & "," & $coord[1])

Endif

What are the values in $coord[0] and $coord[1]?
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

I am sorry if i am confusing sometimes

I'm trying to learn autoit scripting, slowly i wil get it

What i try to do is get the coords of a colour of pixelsearch the string of pixelsearch wil tel movemouse where to go

so what the value is of them i dont know it depents on where the colour is right ?

Lets say i take the colour white and there is a white dot in my window at "455, 605"

if i run this code

$coord = PixelSearch( 0, 0, 1000, 800, 0x000000 ) //Looks up where the white pixel is and fills the coords in the string $coord.

If Not @error Then

mousemove ( "X and Y are:", $coord[0] & "," & $coord[1]) //$coord wil tel the coords of the white pixel to mousemove.

Endif

but it dusent work right it ceep going to the left side of my screen

MouseMove(x, y) there you need to fill the coords but i want the script to find me where to move my mouse

maybe i dont understand i have tried mousemove(x == $coord[0], y == $coord[1])

but it gives me a error message "mousemove (X == $coord[0], Y == $coord[1])"

"mousemove (ÊRROR"

I also tried

mousemove ( "X, Y ", $coord[0], $coord[1])

but it gives the same effect as the old code

i had also a other code to detect colours in a window but its ferry confusing for me i wil post it also but in a other topic

I like mousemove tougt since you can clearly see whats going on i hope we can get this fixed,

Link to comment
Share on other sites

  • Moderators

Your going to be hell bent if you don't understand how to read the parameters of standard functions to get anything done.

If IsArray($Coord) Then MouseMove($coord[0], $coord[1], 1)oÝ÷ Ú«¨µ

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...