12am Posted August 7, 2012 Share Posted August 7, 2012 I am attempting to find a specific object within a client and so far I have been using PixelSearch, but every once in awhile there are more objects within the client with the same type of pixel coloration... so my script sometimes messes up, adding a tolerance just makes it worse. Anyone have an idea on what would be more accurate for finding the coordinates? -Control ID's are not available for the objects I am trying to select as it is all within the same window -Objects are never in the same location Any suggestions would be greatly appreciated! Thank you for your time. Link to comment Share on other sites More sharing options...
Bert Posted August 7, 2012 Share Posted August 7, 2012 (edited) What is the name of your application you are working with? Working with controls is much better than pixel searching. Edited August 7, 2012 by scullion The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
12am Posted August 7, 2012 Author Share Posted August 7, 2012 What is the name of your application you are working with? Working with controls is much better than pixel searching.-Not able to identify any controls from this.Just curious with Controls out of the question and pixelsearching being "flakey" to say the least - what other suggestions would you have for finding coordinates of a specific object? Link to comment Share on other sites More sharing options...
ileandros Posted August 7, 2012 Share Posted August 7, 2012 You could use _ImageSearch I feel nothing.It feels great. Link to comment Share on other sites More sharing options...
12am Posted August 7, 2012 Author Share Posted August 7, 2012 You could use _ImageSearchI'm not seeing this in the helpfile- is this natively supported by AutoIt?or somewhat of a user extension. Link to comment Share on other sites More sharing options...
nullschritt Posted August 7, 2012 Share Posted August 7, 2012 This sounds a lot like a game bot. Link to comment Share on other sites More sharing options...
trancexx Posted August 7, 2012 Share Posted August 7, 2012 This sounds a lot like a game bot.Troll. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
blckpythn Posted August 7, 2012 Share Posted August 7, 2012 To be honest trancexx, I was thinking the same thing as nullschritt. Link to comment Share on other sites More sharing options...
nullschritt Posted August 7, 2012 Share Posted August 7, 2012 Yeah not trolling, this person has been very careful to mention what he wants to do, while omitting any details about what he wants it to do it for. Most interfaces that don't use controls, are games, video, etc, where multiple items are shown inside one control. Also he says he wants to focus on an object which moves around the screen. But won't say what object. I think you would have to be blind to not see the high possibility that this help request is for nothing other than a game bot, used to find certain objects in game and click them automatically. Link to comment Share on other sites More sharing options...
trancexx Posted August 7, 2012 Share Posted August 7, 2012 (edited) Your initial post was trolling. Then I trolled to make you see you are trolling (it's the best way), then blckpythn trolled to make me see that you weren't trolling. Then you did it again and now I'm doing it. Do you see how wrong that is? Don't answer please. Use your head, 12am seems to be. OP is perfectly valid and does not break any rules we have here. If I'm 12am I would be very much offended by your insinuations. Only ileandros's post is on topic, everything else is bullshit. Edited August 7, 2012 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
jdelaney Posted August 7, 2012 Share Posted August 7, 2012 Since a dev cleared the post: You'll need to find a different color, or range of colors, and/or narrow down your search area within the client. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
nullschritt Posted August 7, 2012 Share Posted August 7, 2012 (edited) Your initial post was trolling. Then I trolled to make you see you are trolling (it's the best way), then blckpythn trolled to make me see that you weren't trolling. Then you did it again and now I'm doing it.Do you see how wrong that is? Don't answer please. Use your head, 12am seems to be.OP is perfectly valid and does not break any rules we have here. If I'm 12am I would be very much offended by your insinuations. Only ileandros's post is on topic, everything else is bullshit.Well played. Sir <links removed> Edited August 7, 2012 by Melba23 Links removed Link to comment Share on other sites More sharing options...
JohnOne Posted August 7, 2012 Share Posted August 7, 2012 Search with pixelsearch, and check with pixelchecksum rinse and repeat AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 7, 2012 Moderators Share Posted August 7, 2012 nullschritt, While I agree with trancexx that the thread is entirely legal, your post linking to threads which are in contravention of the current rules is not. If the OP is not clever enough to find these threads themselves they should not be pointed to them. This is not open to discussion so do not try. M23 nullschritt 1 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...
12am Posted August 8, 2012 Author Share Posted August 8, 2012 I appreciate the information - I will try playing around with pixelchecksum some more then, but it wasn't producing the results as accurate as I wanted.I was not sure if there were any other options that I was completely oblivious to or not, which is why I made this thread- but this should clear things up then.Thank you. If the OP is not clever enough to find these threads themselves they should not be pointed to them.M23Your mindset is very narrow and condescending toward others.I am sure you already know this though. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 8, 2012 Moderators Share Posted August 8, 2012 12am,Please lose the attitude - belittling those who try to enforce the Forum Rules is not a great way begin your stay here. You might like to note that even with the dubious nature of the question you asked, we have allowed the thread to to run as there is no "prima facie" evidence of it breaking those rules - so we cannot be that narrow-minded. 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...
12am Posted August 8, 2012 Author Share Posted August 8, 2012 (edited) 12am,Please lose the attitude - belittling those who try to enforce the Forum Rules is not a great way begin your stay here. You might like to note that even with the dubious nature of the question you asked, we have allowed the thread to to run as there is no "prima facie" evidence of it breaking those rules - so we cannot be that narrow-minded. M23touché - I guess I have just been taking offense reading this entire thread.but I understand your frustration as a community in regards to this as well.No hard feelings and thank you for the replies I have an idea on how to handle this task now - (potentially) Edited August 8, 2012 by 12am Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 8, 2012 Moderators Share Posted August 8, 2012 12am, And none on this side either. 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...
ileandros Posted August 9, 2012 Share Posted August 9, 2012 (edited) It is not in the help files or included. You could find enough information on how to use it in the thread.Here is an exampleexpandcollapse popup#include <ImageSearch.au3> Opt('PixelCoordMode', 2) HotKeySet("s", "Start") HotKeySet("x", "_Exit") Global $size = WinGetClientSize("[CLASS:Your Client class here]"), $gX = 0, $gY = 0 $pngLoc = "@ScriptDir" $x_ratio = $size[0] / 1440 ; This is my screen resolution you can change these in ur screen resolution $y_ratio = $size[1] / 900 $pngLoc = @ScriptDir Func Start() If Search("Image", 0, Round(0 * $x_ratio), Round(0 * $y_ratio), Round(1440 * $x_ratio), Round(900 * $y_ratio), 0.5, 140) Then MouseClick("left", $gX, $gY) EndIf EndFunc Func Search($img, $type = "", $startX = 0, $startY = 0, $endX = @DesktopWidth, $endY = @DesktopHeight, $seconds = 6, $tolerance = 140) $startX = 0 * $x_ratio $startY = 0 * $y_ratio $endX = 1440 * $x_ratio $endY = 900 * $y_ratio $seconds = 1 $c = 0 $string = $pngLoc & $img & ".bmp" ; Here you can manually change it so it reads the type of image you want it to Do $c += 1 Sleep(100) If $c > ($seconds * 1) Then If $type = "Area" Then EndIf Return False EndIf Until _ImageSearchArea($string, 1, $startX, $startY, $endX, $endY, $gX, $gY, $tolerance) Return True EndFunc While 1 WEnd Func _Exit() Exit EndFunc; I don't care if its a game im just giving this code for people in future who will need itPlay a little bit arround with it. Edited August 9, 2012 by ileandros I feel nothing.It feels great. Link to comment Share on other sites More sharing options...
JohnOne Posted August 9, 2012 Share Posted August 9, 2012 I will try playing around with pixelchecksum some more then, but it wasn't producing the results as accurate as I wanted.If a screen area remains the same, then pixelchecksum should identify it. if it does not then AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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