Jump to content

PixelSearch in minimized window.


Recommended Posts

Hello, I wrote a script for a game that functions perfectly with mouse clicks. I now changed everything to function with control click so I can minimize the window while the script runs. The clicking and functionality remained except for finding pixels on the game. In the original, I used Pixel Search to search coordinates on the screen for certain colors, but now that the screen is not exactly visible, it isn't detecting the colors at all. I would like to know if its possible to use pixel search on a minimized window or is there another way to search a specific coordinate on minimized window for specific pixels?

Edited by Garicup
Link to comment
Share on other sites

I see the pixel search takes an extended parameter that allows you to specify the window you want the search conducted on. Could that be used in anyway? Or is there anything at all I can do about this? other than the pixelsearch?

Link to comment
Share on other sites

Example of what I have -- No idea why it doesnt work.

$test = WinGetHandle ("Google - Mozilla Firefox")
ConsoleWrite($test & @CRLF);this was just to test that it actually got the handle


PixelSearch(200, 400, 400, 600, 0xA0C0C0, 0, 1, $test)
    If Not @error Then
        ControlClick("Google - Mozilla Firefox", "", "[CLASS:MozillaWindowClass; INSTANCE:5]", "left", 1, 300, 500)
        Sleep(2000)
    EndIf

I figured this should still search the coordinates on the given screen even if it was minimized because of the specification of the window to search. I know it might be a false assumption, can someone help?

Also I know the problem isnt in the control click, it clicks when ran by itself with no preceding search.

Edited by Garicup
Link to comment
Share on other sites

  • Moderators

1. Your example above, be sure when using the window handle that you are using Client Coordinates and not window or screen coordinates.

You also may want to take a look at this:

http://www.autoitscript.com/forum/index.ph...mp;hl=minimized

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • 9 years later...
On 3/4/2009 at 8:13 PM, Garicup said:

Thanks Smoke. I was using client coordinates. To Firefox, I actually did search and for a bit too...I gave up and got tired of reading irrelevant post. Thanks anyways, and sorry for re-asking an already answered question.

Did you actually found a solution? I am struggling with the exact same. It works perfectly by itself when window is on top, but if I put something on top or minimize it it will "pause" the script until the window is back up.

Link to comment
Share on other sites

  • Moderators

LePucco,

I told you yesterday what to do rather than necro-post - and yet here you are doing it again. And as the person you quote has not been active for the past 9 years I doubt you will get a reply anyway.

Consider yourself on a final warning - another transgression will see you sanctioned.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...