1hit Posted January 3, 2006 Share Posted January 3, 2006 ok im making a bot that searches for the colors that i put in and it moves the mouse to it and clicks on it but now i want to add something where it finds it and moves the mouse over it and then checks to see if the mouse cursor changed(when you put the mouse cursor over a monster it changes into a sword) so is there a way to do this? this is my script if it helps: expandcollapse popup; Script Start - Add your code below here Dim $Color_One = 0xE1B196;monster color Dim $Color_Two = 0x98512D;monster color Dim $Color1_tolerance = 12 Dim $Color2_tolerance = 14 Opt("MouseCoordMode", 0); Read the help file for "Opt" to see if you need to keep the '2' a '2', '1', or '0' Opt("PixelCoordMode", 0); Read the help file for "Opt" to see if you need to keep the '2' a '2', '1', or '0' Hotkeyset("{HOME}","start") Hotkeyset("{END}","stop") Global $stop Func start() WinActivate ( 'SRO_Client' ) Sleep ( 300 ) $stop = NOT $stop While $stop ; Script Start - Add your code below here $PxSrch_One = PixelSearch(288,281,669,553, $Color_One, $Color1_tolerance, 2) $PxSrch_Three = PixelSearch(288,281,669,553, $Color_Two, $Color2_tolerance, 2) If Not @error And IsArray($PxSrch_One) Then Sleep(100) MouseClick("left", $coord[0],$coord[1],1, 0) Sleep(75) Send("1") Sleep(75) Send("1") Sleep(400) EndIf WEnd EndFunc Func stop() Exit EndFunc While 1 Sleep(50) WEnd Link to comment Share on other sites More sharing options...
nfwu Posted January 3, 2006 Share Posted January 3, 2006 Try using "MouseGetCursor ( )", or if that does not work[very likely], try testing out whether the mouse is a bitmap. If it is, use "PixelGetColor ( x , y )" to get the color of the pixel. If the mouse is not a bitmap, i can't think of anything to help. TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
1hit Posted January 3, 2006 Author Share Posted January 3, 2006 ya i tried mousegetcursor but both of them are unknown cursors is tehre any way i can add or something them so it knows wat cursors they are 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