Amh.p Posted November 15, 2006 Share Posted November 15, 2006 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 Thenmousemove ( "X and Y are:", $coord[0] & "," & $coord[1])Endif Link to comment Share on other sites More sharing options...
PaulIA Posted November 15, 2006 Share Posted November 15, 2006 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]) EndifWhat 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 More sharing options...
herewasplato Posted November 15, 2006 Share Posted November 15, 2006 (edited) You might want to use the correct syntax for MouseMove:MouseMove(x, y)...instead of what you used:mousemove("X and Y are:", $coord[0] & "," & $coord[1]) Edited November 15, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Amh.p Posted November 16, 2006 Author Share Posted November 16, 2006 I am sorry if i am confusing sometimes I'm trying to learn autoit scripting, slowly i wil get itWhat 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 Thenmousemove ( "X and Y are:", $coord[0] & "," & $coord[1]) //$coord wil tel the coords of the white pixel to mousemove.Endifbut it dusent work right it ceep going to the left side of my screenMouseMove(x, y) there you need to fill the coords but i want the script to find me where to move my mousemaybe 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 triedmousemove ( "X, Y ", $coord[0], $coord[1]) but it gives the same effect as the old codei 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 More sharing options...
Moderators SmOke_N Posted November 16, 2006 Moderators Share Posted November 16, 2006 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 More sharing options...
Amh.p Posted November 16, 2006 Author Share Posted November 16, 2006 Yes i am new to this all but i learn fast I got the pixel search working Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now