Sign in to follow this  
Followers 0
DeathRow

PixelSearch for masked or HIDDEN windows ? Possible ?

34 posts in this topic

#1 ·  Posted (edited)

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



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

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

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

#8 ·  Posted (edited)

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

#9 ·  Posted (edited)

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

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

#11 ·  Posted (edited)

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

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

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

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

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

#18 ·  Posted (edited)

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

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

#20 ·  Posted (edited)

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  
Followers 0

  • Similar Content

    • MrMajorThorburn
      By MrMajorThorburn
      Using sample code:
      #include <MsgBoxConstants.au3> ; Find a pure red pixel in the range 0,0-20,300
      Local $aCoord = PixelSearch(0, 0, 20, 300, 0xFF0000)
      If Not @error Then
          MsgBox($MB_SYSTEMMODAL, "", "X and Y are: " & $aCoord[0] & "," & $aCoord[1])
      Else
          MsgBox($MB_SYSTEMMODAL, "", "Pure Not Found")
      EndIf ; Find a pure red pixel or a red pixel within 10 shades variations of pure red
      $aCoord = PixelSearch(0, 0, 20, 300, 0xFF0000, 10)
      If Not @error Then
          MsgBox($MB_SYSTEMMODAL, "", "X and Y are: " & $aCoord[0] & "," & $aCoord[1])
      Else
          MsgBox($MB_SYSTEMMODAL, "", "Variant Not Found")
      EndIf   and the attached screenshot which has Pure Red (FF0000) in one icon in the area being searched. Would someone please check this out for me?
    • ur
      By ur
      When we run our exe from any service or through any background process, it won't interact with the applications running in the foreground, I mean launched when the user is logged in or in GUI mode.
       
      Let's say, the onedrive sync app can't be detected from the exe we created and running it in background.

      I tried both options below.

       
      Any Idea how to interact with foreground processes using AuotIT code.

      Other than telling to launch the exe also in foreground.
    • Fuzy
      By Fuzy
      #include<img/img.au3>
      #include <AutoItConstants.au3>
      Func Skype()
      $coords = imageSearch(0,0,-1,-1,"Skype.PNG")
      MouseMove($coords[0],$coords[1])
      [when it find the skype icon i want it to move from these coordinates, but of insted of moving to an expecific coordinate i want it to move down from these coordinates, (there is multiple images so i cant move to an specific image)] -- Kinda having trouble telling what i want cuz english isnt my first language, sorry about that. ;X
      MouseClick($MOUSE_CLICK_LEFT)
    • Shirdish_chakravarthi
      By Shirdish_chakravarthi
      Hello Friends i am new to autoit and i am stuck in middle of automation of flashing tool..
      my requirement is i have a window and i have to get the value present in that window (below is the picture)

      in the above window i need to get the value of the highlighted field.the value of this filed keeps on changing...ii need to get the current value present in the field..below are the details of the window and field..

       
      CAN it be done?
       
      thanks

    • Shirdish_chakravarthi
      By Shirdish_chakravarthi
      Hello Guys i am working on automating a flashing tool..When flashing is started if there is any error in connection it pops's up a error window...(as shown below)

       whenever this popup appears i need a msgbox to appear saying "error occured" how can i do this?
      Thanks