molo69 Posted February 17, 2008 Share Posted February 17, 2008 hello, I want that when a color appears 0xff910b mouse click them what code should I save? (sorry i'm french ) Link to comment Share on other sites More sharing options...
jokke Posted February 17, 2008 Share Posted February 17, 2008 (edited) Something like this ? While 1 $mpos = MouseGetPos() $color = PixelGetColor ( $mpos[0] , $mpos[1] ) TrayTip("Mouse Pointer","Color under Mouse Pointer: "&hex($color)&@CRLF&" Mouse pos X: "&$mpos[0]&" Y: "&$mpos[1],5) Sleep(200) WEnd Edited February 17, 2008 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
molo69 Posted February 17, 2008 Author Share Posted February 17, 2008 (edited) no it's not that i like to when the color appears the mouse click on this color. the color is 00febc6c Edited February 17, 2008 by molo69 Link to comment Share on other sites More sharing options...
jokke Posted February 17, 2008 Share Posted February 17, 2008 (edited) Then you need to use PixelSearch. Then use it like this: While 1 $search = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,"00febc6c",20) If UBound($search) > 0 Then ;Found color. ConsoleWrite("Found color at pos X:" &$search[0]&" Y:"&$search[1]& @CRLF) MouseClick("left",$search[0],$search[1],"1","1") Exit ;Remove this if everything works as it should. EndIf Sleep(25) ;removing some cpu usage. WEnd Edit, typo. Edited February 17, 2008 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
molo69 Posted February 17, 2008 Author Share Posted February 17, 2008 i have a problem when i use this script this close the windows Link to comment Share on other sites More sharing options...
jokke Posted February 17, 2008 Share Posted February 17, 2008 The code itself is correct, how its used i dont know, it might be the search paramerters that need's tweaking. UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
molo69 Posted February 17, 2008 Author Share Posted February 17, 2008 the mouse is teleport on the top right of the screen when i use the script. Link to comment Share on other sites More sharing options...
jokke Posted February 17, 2008 Share Posted February 17, 2008 You need to edit this line of code: $search = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,"00febc6c",20) UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
James Posted February 17, 2008 Share Posted February 17, 2008 Welcome to the forums, as your new a bit of friendly advice. Please don't post with "Help, I need help" in your title. This gives most people who help here no reason to help you. You need to look at PixelSearch. Try this: Opt("PixelCoordMode", 1) Opt("ColorMode", 0) $Color = Hex(0xff910b) ConsoleWrite($Color & @CRLF) $Search = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $Color,0) If Not @error Then MsgBox(0, @ScriptName, "Found color!") EndIf Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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