kamppapya Posted July 15, 2012 Share Posted July 15, 2012 (edited) I'm making this bot to analyze a square on the screen on a loop with a sleep timer of 50 It's supposed to continue as long as the PixelCheckSum DOES NOT equal either...2792087096, 3685233020, or 992816331, and when it does equal one of those it should click the screen at 729, 251 and make a Send( response based on the specific checksum that it was. This response is text with a number in the middle of it, randomly generated each loop The problem is though it doesn't work, it only works if the screen is already showing something with one of the checksums when I run the script, but then it doesn't continue to work for other instances of that checksum appearing Any reason anyone can see why this shouldn't continue indefinitely on a loop? Opt("SendKeyDelay",0) Opt("SendKeyDownDelay",0) While 1 Local $checksum = PixelCheckSum(659, 441, 765, 449) While $checksum <> 992816331 AND $checksum <> 3685233020 AND $checksum <> 2792087096 Sleep(50) WEnd Local $rand = Random(1,100,1) MouseClick("left", 729, 251, 1, 0) If $checksum = 992816331 Then Send(Text") Send($rand) Send("{enter}") ElseIf $checksum = 3685233020 Then Send("Text") Send($rand) Send("{enter}") ElseIf $checksum = 2792087096 Then Send("Text") Send($rand) Send("{enter}") EndIf Sleep(100) WEnd Edited July 15, 2012 by kamppapya Link to comment Share on other sites More sharing options...
kamppapya Posted July 15, 2012 Author Share Posted July 15, 2012 (edited) Problem fixed, needed an additional checksum checker within the loop Opt("SendKeyDelay",0) Opt("SendKeyDownDelay",0) While 1 $checksum = PixelCheckSum(659, 441, 765, 449) While $checksum <> 992816331 AND $checksum <> 3685233020 AND $checksum <> 2792087096 AND $checksum <> 3424698734 AND $checksum <> 2814325116 Local $checksum = PixelCheckSum(659, 441, 765, 449) Sleep(50) WEnd Local $rand = Random(1,100,1) $time = @hour & ":" & @MIN & ":" & @SEC If $checksum = 992816331 Then Edited July 15, 2012 by kamppapya Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 15, 2012 Moderators Share Posted July 15, 2012 kamppapya,A word of warning: Using the word "bot" when posting a script using PixelSearch tends to raise suspicions around here. Please read the Forum Rules before posting again to make sure that you understand what is and is not allowed on the forum. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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