Jump to content
Sign in to follow this  
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

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×