Jump to content
Garicup

PixelSearch in minimized window.

Recommended Posts

Garicup

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
  • Like 1
  • Sad 1

Share this post


Link to post
Share on other sites
Garicup

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?

Share this post


Link to post
Share on other sites
Garicup

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

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
FireFox

@SmOke_N

you should add that he has to search on forum before post anytopic, in the way it has been asked many, many times... :P

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Garicup

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.

  • Like 1

Share this post


Link to post
Share on other sites
LePucco
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.

Share this post


Link to post
Share on other sites
Melba23

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×