akroon Posted January 8, 2014 Share Posted January 8, 2014 i have this code for example: ; $a and $b is the color to search $xy=PixelSearch($xy1[1],$xy1[2],$xy2[1],$xy2[2],$a) ;if don't find the pixell then if @error=1 then ;code ......... EndIf $xy=PixelSearch($xy1[1],$xy1[2],$xy2[1],$xy2[2],$b) ;if don't find the pixell then if @error=1 then ;code ......... EndIf the code into the if is the same so if i can search 2 pixel at once the code will be shorter thanx =) Link to comment Share on other sites More sharing options...
Bert Posted January 8, 2014 Share Posted January 8, 2014 Why do you need to do pixel search? Can you hook directly into the control you want to work with? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 8, 2014 Share Posted January 8, 2014 you may use array for colors.. and search one by one.. but why is good for you? Link to comment Share on other sites More sharing options...
akroon Posted January 8, 2014 Author Share Posted January 8, 2014 My project is a bot for a game so i have to check if there are a monster with pixelsearch. I have try with array but is too slow. Maybe the code can be like this? $xy=PixelSearch($xy1[1],$xy1[2],$xy2[1],$xy2[2],$a or $b) i have try but it don't work Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 8, 2014 Moderators Share Posted January 8, 2014 akroon,Unfortunately you appear not to have read the Forum rules since you have been here. Please read them now (there is also a link at bottom right of each page) - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be 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