Eragon Posted October 3, 2016 Share Posted October 3, 2016 Hello, At the momento i'm using autoit and the function PixelSearch with Visual Basic 6. I know that the function PixelSearch returns error = 1 if no pixel was found. Is there a way to retrieve the coord where there is no such pixel? I'm trying to search for a pixel colour (Ex: Red) and then looping through the X axis, until no pixel of that colour is found, and i want to know that coordinate (the coordinate adjacent to the pixel colour, where there is no colour) Link to comment Share on other sites More sharing options...
Bert Posted October 3, 2016 Share Posted October 3, 2016 (edited) Edit - I had to remove my post once I looked at the OPs other post... sigh.....What is it with people who think they can just repost and think they will get away with ignoring the forum rules? Edited October 3, 2016 by Bert The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Eragon Posted October 3, 2016 Author Share Posted October 3, 2016 This is a valid question. In addittion, i noticed that using for instance: Dim C() as variant C()=pixelsearch( parameters) msgbox C(0) & C(1) throws an error of type mismatch. Any way to fix it in Vb? Link to comment Share on other sites More sharing options...
232showtime Posted October 3, 2016 Share Posted October 3, 2016 (edited) indeed... Quote I'm making an autoaim Bot for a 2d mmorpg game. PixelSearch is very popular for game automation. go find some forums that will help you solve your problem. Edited October 3, 2016 by 232showtime ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
AutoBert Posted October 3, 2016 Share Posted October 3, 2016 (edited) 3 hours ago, Eragon said: Any way to fix it in Vb? Did you realized that you are not posting in a VB-Froum? If you want to realize it with AutoIt, have a look in the helpfile and notice mousecoords are only returned if a pixel with searched colour is found. So what to do? Juast memory in which area you searched, in all of these mousecoords is in that moment no pixel with searched colour, what's in the next moment nobody knows. So your problem isn't solveable with pixelsearch. Have a look at: Edited October 3, 2016 by AutoBert Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 3, 2016 Moderators Share Posted October 3, 2016 Eragon, We know you want to use this for a game, so stop pretending otherwise. This is your final warning - thread locked. 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