AzKay Posted July 14, 2006 Share Posted July 14, 2006 Ive been having a couple of trys with pixel search, but I still dont understand it... For example, How can I make it, search the screen, for a red dot, then click the red dot? Maybe an example? The helpfile example didnt help me... # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 14, 2006 Share Posted July 14, 2006 Hi, $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0xFF0000 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) MouseMove($coord[0], $coord[1]) EndIf So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
AzKay Posted July 14, 2006 Author Share Posted July 14, 2006 Doesnt want to work. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
UnknownWarrior Posted July 14, 2006 Share Posted July 14, 2006 Doesnt want to work.What type of a game or what is this for? Because i found out that virtual keystrokes dont work (or mouseclicks in this case) dont work on some games. Link to comment Share on other sites More sharing options...
Paulie Posted July 14, 2006 Share Posted July 14, 2006 I doubt it will work if keystrokes are blocked in game, but there is another way $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0xFF0000 ) If IsArray($coord) Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) MouseMove($coord[0], $coord[1]) EndIf Link to comment Share on other sites More sharing options...
AzKay Posted July 14, 2006 Author Share Posted July 14, 2006 The only thing I want it to do, is click on the pixel # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 14, 2006 Share Posted July 14, 2006 Damn, please give a little bit more detail. What application or is it a game? What game? What sort of game(Browser or stand alone exe)? Can you just test it with MouseClick(...) without PixelSearch() maybe even this won't work. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
AzKay Posted July 14, 2006 Author Share Posted July 14, 2006 Nothing specific, just in general, how would you click a moving pixel on the screen, Im just wanting to know, on a normal application, no gamegaurd, no browser, Just, a moving pixel on the screen, how would I click it # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 14, 2006 Share Posted July 14, 2006 Okay, one step further. You have to have a specific color in a specific area I guess, otherwise you cannot indentify the spot. Something like everything is white, just one spot is red. Then my code above should work. Where did you test it? Cause you saif it doesn't work. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
AzKay Posted July 14, 2006 Author Share Posted July 14, 2006 Okay, one step further. You have to have a specific color in a specific area I guess, otherwise you cannot indentify the spot. Something like everything is white, just one spot is red. Then my code above should work.Where did you test it? Cause you saif it doesn't work. So long,MegaWell, I tryed it on that, clown game, in scripts and scarps, using the red on the tip of the nose, It was the only red of that red, and it didnt work # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Paulie Posted July 14, 2006 Share Posted July 14, 2006 Well, I tryed it on that, clown game, in scripts and scarps, using the red on the tip of the nose, It was the only red of that red, and it didnt workWell, did it not click because maybe both scripts have mousemove instead of mouseclick? Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 14, 2006 Share Posted July 14, 2006 Hi, try this: HotKeySet("{esc}", "end") HotKeySet("1", "start") While 1 Sleep(100) WEnd Func start() While 1 $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0xBE0E0E) If IsArray($coord) Then MouseClick("left", $coord[0], $coord[1], 1, 1) EndIf Sleep(100) WEnd EndFunc ;==>start Func end() Exit (0) EndFunc ;==>end So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times 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