IdiotProgrammer Posted December 22, 2008 Share Posted December 22, 2008 Hey all, I am having a little trouble getting my script to work. Basically I want the camera to be rotated using the key C, then while it is rotating to search for a certain colour and if found click it repeatedly. So far I have this code, but I doubt I have it correctly done. MsgBox(0, "3d Engine Scanner", "Active.") WinWaitActive("3dproen") Send("{c down}");Holds the C key down, rotating the camera to find the object. $coord = PixelSearch( 0, 0, 20, 300, 0x1b1b26 ) If Not @error Then MouseClick("left", $coord[0], $coord[1]);Scans for the blue color that is over the majority of the object. EndIf While 1 $mouse = MouseGetPos() $pix = PixelGetColor($mouse[0], $mouse[1]) If $pix = 0x1b1b26 Then;Clicks on the Object. MouseClick("left") EndIf WEnd Help is greatly appreciated! Link to comment Share on other sites More sharing options...
Developers Jos Posted December 22, 2008 Developers Share Posted December 22, 2008 You are now checking for the color at the mouse pointer. is that what you want? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
IdiotProgrammer Posted December 22, 2008 Author Share Posted December 22, 2008 (edited) You are now checking for the color at the mouse pointer. is that what you want?Ah, I am trying to get the script to find the color from somewhere on the screen (never the same exact location), then if found to click it repeatedly.Thanks for the quick reply. Edited December 22, 2008 by IdiotProgrammer Link to comment Share on other sites More sharing options...
Developers Jos Posted December 22, 2008 Developers Share Posted December 22, 2008 (edited) something like this? MsgBox(0, "3d Engine Scanner", "Active.") WinWaitActive("3dproen") Send("{c down}");Holds the C key down, rotating the camera to find the object. While 1 $coord = PixelSearch(0, 0, 20, 300, 0x1b1b26) If Not @error Then MouseClick("left", $coord[0], $coord[1]) Sleep(10) WEnd You need to specify the area in Pixelsearch you want to scan. Edited December 22, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
IdiotProgrammer Posted December 22, 2008 Author Share Posted December 22, 2008 something like this? MsgBox(0, "3d Engine Scanner", "Active.") WinWaitActive("3dproen") Send("{c down}");Holds the C key down, rotating the camera to find the object. While 1 $coord = PixelSearch(0, 0, 20, 300, 0x1b1b26) If Not @error Then MouseClick("left", $coord[0], $coord[1]) Sleep(10) WEnd You need to specify the area in Pixelsearch you want to scan. So would this scan the enitre window? Again, thankyou. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 22, 2008 Developers Share Posted December 22, 2008 So would this scan the enitre window?Did you read the last line in my post? Open the helpfile and read up on the specified function. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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