Jump to content
Sign in to follow this  
DeathRow

PixelSearch for masked or HIDDEN windows ? Possible ?

Recommended Posts

DeathRow

How can I search for a certain color in a background or masked window by other windows( no minimized ), and get the color's relative window's coordinates ;) ??

Is it possible ? I appreciate any help....

Edited by DeathRow

Share this post


Link to post
Share on other sites
DeathRow

It is better to simply look at the controls of the application.

You better didn't answer...

I don't want to click anything ! I want to know the position of a certain image while the window is masked by other windows or minimized.

Thanks for your high quality post

Share this post


Link to post
Share on other sites
somdcomputerguy

PixelSearch will not work on a program that is minimized or not visible.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
DeathRow

PixelSearch will not work on a program that is minimized or not visible.

Yes,I observed, and even if is masked by other window it won't work.Pretty bad ;)

But is there any UDF for AutoIt that could do this ?

Or the API from MSDN ? I don't know how to search there...

Share this post


Link to post
Share on other sites
Bert

If it is a simple static window then are there controls on the window? Second, is it a standard window or a custom type such as a java window?

what happens when you use the AutoIt Window info tool on the window in question?

Edited by Bellicus

Share this post


Link to post
Share on other sites
DeathRow

Well I need to find certain colors in an image and to get the coordinates of them. I don't need any controls or buttons... and is a standard image.

And when I use AWindow Tool its finding the color

Thankyou for replies ... and I was looking towards the method of capturing a bitmap of the window in memory and to search invisible on that bitmap the position of the pixel I want to find = > finding the pixel on a hidden window ;)

Edited by DeathRow

Share this post


Link to post
Share on other sites
Bert

Your not making sense. You say "I need to find certain colors in an image and to get the coordinates of them" and say at the same time it is a static window. If it is static then why do you need to search for certain colors? Static means the image doesn't change. You imply the image changes. Does the image change? Either way would you care to share a screenshot of the image you are dealing with? That would make it much easier to see what we are dealing with.

Share this post


Link to post
Share on other sites
DeathRow

Your not making sense. You say "I need to find certain colors in an image and to get the coordinates of them" and say at the same time it is a static window. If it is static then why do you need to search for certain colors? Static means the image doesn't change. You imply the image changes. Does the image change? Either way would you care to share a screenshot of the image you are dealing with? That would make it much easier to see what we are dealing with.

O sorry I didn't know the real difference ;) Its a webbrowser window and I want to download many photos while hidden to not interference with my usual activity like playing a game. But the images aren't moving, the browser's window is sometimes increasing or decreasing in dimention. So everytime I need to ckeck for a certain color and get the coordinates while hidden or minimized

Edited by DeathRow

Share this post


Link to post
Share on other sites
Bert

That makes more sense. There is a different approach that would work much better for you seeing how you are downloading pictires. If you look at IE.au3 you can get all the pictures using

_IEImgGetCollection

look in the help file and you can see an example of how to get a collection. It would be a simple matter of downloading the images once you get the collection. That way you don't need to worry about the IE window interfering with anything else you are doing.

Share this post


Link to post
Share on other sites
DeathRow

That makes more sense. There is a different approach that would work much better for you seeing how you are downloading pictires. If you look at IE.au3 you can get all the pictures using

_IEImgGetCollection

look in the help file and you can see an example of how to get a collection. It would be a simple matter of downloading the images once you get the collection. That way you don't need to worry about the IE window interfering with anything else you are doing.

I forgot to mention that I can't use IE or Google Chrome and can't install that plug-in for FireFox to work with the UDF because of good reasons ;) ( long story....but trust me I can't )

I can use only Firefox lol, so I need to adapt for it ...

Share this post


Link to post
Share on other sites
DeathRow

Why can't you use IE? It is built into windows. Does your location or who owns the machine block you?

Unfortunetly...yes..;)( Thats why I cant use it

But please I don't want to deviate from the subject, How can I search for a specific pixel color in a background hidden window ??

Share this post


Link to post
Share on other sites
DeathRow

Then we can't help you for we will not be a part of you trying to evade or bypass security. Either use it for legit reasons with the owner's blessing or don't do it at all. Your choice.

What do you mean by bypass security ? What security ??

You didn't understand what Im asking for, I want to know how can I find a pixel color in a background window, the same subject was posted in other threads too but I don't know how to apply it, I appreciate if anyone could help me.

Share this post


Link to post
Share on other sites
MrMitchell

You didn't understand what Im asking for, I want to know how can I find a pixel color in a background window, the same subject was posted in other threads too but I don't know how to apply it, I appreciate if anyone could help me.

Manadar's (and Greenseed's) example.au3 and _PixelGetColor.au3 provide working example of how to basically take a screenshot to memory then pixelsearch it. You've previously linked to it, here it is again. After reading about it then running it, seems to work fine for me. You need to temporarily bring up the window to search so you can get a screenshot, then hide the window, then you can search the screenshot later on in your script. For me I brought Firefox to the foreground-maximized, took the "screenshot", then hid the Firefox window again. I then searched the 10x10 pixel box in the top left corner (starting at 0,0) for the color 0xDCCEBF and found it at several locations: 0,3; 1,3; and 2,3.

Edited by MrMitchell

Share this post


Link to post
Share on other sites
Bert

What do you mean by bypass security ? What security ??

You didn't understand what Im asking for, I want to know how can I find a pixel color in a background window, the same subject was posted in other threads too but I don't know how to apply it, I appreciate if anyone could help me.

You said yes to this question: "Does your location or who owns the machine block you?"

That means you are trying to get past a security measure.

Understand now?

Share this post


Link to post
Share on other sites
DeathRow

You said yes to this question: "Does your location or who owns the machine block you?"

That means you are trying to get past a security measure.

Understand now?

Yes I said that, and its true, but you understand me wrong, its my computer and my parents blocked my computer with limited user account( they are paranoid ) and they say to not use IE and uninstalled it ;) and with limited access I cant install it :) so I really need to do it on the default browser ff

Edited by DeathRow

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  

  • Similar Content

    • bbProg
      By bbProg
      Hi,
       
      how can I wait activate for windows with information as in the photos attached?
      Class is not being recognized by the script.
       
      thanks in advanced.



    • AndyS19
      By AndyS19
      I'm trying to implement a Ctl-F popup box that looks something like the one that Notepad uses, but I'm not havine much luck.  I intend to get it working, then beef up the popup's contents to add several checkboxes, buttons and radio boxes.
      What my example code does is to use InputBox(), but that's not what I want.
      Here is my test code:
      #include <Array.au3> #include <GUIConstantsEx.au3> #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 Opt("GUICloseOnESC", 1) Opt("GUIOnEventMode", 1) Opt('MustDeclareVars', 1) OnAutoItExitRegister("ExitStageLeft") Opt("WinTitleMatchMode", -2) Global $hGUI _Main() Func _Main() $hGUI = GUICreate("Test ^F", 300, 200) setupSpecialKeysHandlers() GUISetOnEvent($GUI_EVENT_CLOSE, "Event_GUIClose") GUISetState() While (1) Sleep(157) WEnd EndFunc ;==>_Main Func handle_CTRL_F_key() Local $str $str = InputBox("Search", "Enter the string to search for:") ConsoleWrite("+++: $str ==>" & $str & "<==" & @CRLF) EndFunc ;==>handle_CTRL_F_key Func ExitStageLeft() Exit (99) EndFunc ;==>ExitStageLeft Func Event_GUIClose() Exit (1) EndFunc ;==>Event_GUIClose Func setupSpecialKeysHandlers() Local $ar, $parts, $key, $handler, $id Local $aAccelKeys[1][2] ; Create a table of Special keys and their handlers $ar = StringSplit("", "") _ArrayAdd($ar, "^f - handle_CTRL_F_key ") ReDim $aAccelKeys[UBound($ar) - 1][2] ; Now, create $aAccelKeys array with the table data. ; For each entry, create a Dummy GUI and associate its ; ID with the special key. For $ndx = 1 To UBound($ar) - 1 $parts = StringSplit($ar[$ndx], "-", 2) $key = StringStripWS($parts[0], 8) $handler = StringStripWS($parts[1], 8) $id = GUICtrlCreateDummy() $aAccelKeys[$ndx - 1][0] = $key $aAccelKeys[$ndx - 1][1] = $id GUICtrlSetOnEvent($id, $handler) Next GUISetAccelerators($aAccelKeys) ; Setup the Special keys hooks EndFunc ;==>setupSpecialKeysHandlers  
    • nacerbaaziz
      By nacerbaaziz
      Hello
      i have searched a lot about how to run external programs with the administrator privileges without the script running with administrator privileges using autoit
      But all my attempts failed
      Finally, today I found the VBS function doing this task
      I immediately transferred it to our beloved language (autoit) and i decided to share it with you
      i hope you like it
      This is a simple example about how to use the function

      runAsAdmin("cmd.exe", "/c @echo off & cls & echo test & pause", "c:\", @sw_show)
      this is the function

      func runAsAdmin($program, $parameters = "", $workingDir = @workingDir, $show = "") local $oShell = OBJCreate("Shell.Application") if isOBJ($oShell) then local $result = $oShell.ShellExecute($program, $parameters, $workingDir, "runas", $show) else $result = false endIf return $result endFunc
       
    • Atoxis
      By Atoxis
      Howdy, I've gone through a lot of au3 forums, and I once had a working Imagesearch script that I got from here.  However, and i'm just totally not sure how but my imagesearch scripts aren't working anymore.
      I'm not new to au3 but i'm not the most experienced with it's syntax/commands.

      Anyways, I've looked over the big threads involving imagesearch.

      Does anyone have a working Imagesearch x64 for win10 that is currently working as of the date with the post.

      Dll's and what not is fine, just when I tell the script to run, I want to be able to find the image on the screen!
      Can't find a working copy so if anyone has one please send it my way lol.

      I've taken all the imagesearch downloads and what not and have played with them but I can't get any of them working on my end, despite others saying they're working.
      Thanks.
    • rcmaehl
      By rcmaehl
      A UDF with Extended Functions for Window Management
       
      Notes:
      Fixes WinGetClassList's barbaric returning of a @LF separated string instead of an array.
       
      Potential Uses:
      Automating applications that change their controls' handles/classes on each launch (e.g. half of Cisco's programs)
       
      Functions:
      _WinGetClassList
      _WinGetClassNNList
      _WindowGetHandleList
      _WindowGetHandleListFromPos
       
      Download: 
      WindowEx.zip  (v0.4)
       
      Changelog:
      10/04/2016 (v0.4): _WinGetClassNNList Fixed : Not Returning an Index when using $2D_ARRAY _WinGetClassNNList Fixed : Not Properly returning $aArray[x][1] on Classes with instances > 9 when using $2D_ARRAY 10/03/2016 (v0.3): _WinGetClassList Added : Exactly the same as WinGetClassList but returns a more civilized Array _WinGetClassNNList Added : Returns Classes and their instances in either a 1D or 2D array depending on Flags _WindowGetHandleList Renamed: _WinGetHandleList SCRIPT BREAKING! _WindowGetHandleListFromPos Renamed: _WinGetHandleListFromPos SCRIPT BREAKING! 10/01/2016 (v0.2): WindowsExConstants.au3 Added : Flags in _WindowGetHandleListFromPos _WindowGetHandleListFromPos Removed: ConsoleWrite left in during debug _WindowGetHandleListFromPos Added : Flag for if part of a Control is at $X, $Y return it as well. 10/01/2016 (v0.1): _WindowGetHandleList Added : Retrieves the handles of classes from a window. _WindowGetHandleListFromPos Added : Retrieves the handles of classes at a specific position from a window. Known and Reported Bugs:
      None reported To Do:
      To Be Decided. Opinions welcome! Upcoming Changes:
      To Be Decided.
×