Jump to content

PixelSearch for masked or HIDDEN windows ? Possible ?


Recommended Posts

@DeathRow: Just curious (and it helps better understand your needs), what is your overall goal or purpose with this project? I am not looking for you want to PixelSearch a hidden, masked, or background window or whatever, but why you need to do this? Are you trying to monitor a specific point on the screen for when it changes so you can take some sort of action when it does change?

Link to comment
Share on other sites

@DeathRow: Just curious (and it helps better understand your needs), what is your overall goal or purpose with this project? I am not looking for you want to PixelSearch a hidden, masked, or background window or whatever, but why you need to do this? Are you trying to monitor a specific point on the screen for when it changes so you can take some sort of action when it does change?

I explained why I need in the previous page, I want to automatize downloading and selecting many images from a webpage while hidden or minimized or even masked by a window.

Link to comment
Share on other sites

I explained why I need in the previous page, I want to automatize downloading and selecting many images from a webpage while hidden or minimized or even masked by a window.

Thank you. Now for method of action... How do you want to make use of PixelSearch()? With PixelSearch you provide coordinates of an area to search and a color to search for then if that color is found it returns the coordinates of where it was found. Do you know the area you want to search? Do you know what color to look for? What happens when you find it? What happens if you don't find it? The more info you can provide the better help you'll get - if any more at all...

Link to comment
Share on other sites

Thank you. Now for method of action... How do you want to make use of PixelSearch()? With PixelSearch you provide coordinates of an area to search and a color to search for then if that color is found it returns the coordinates of where it was found. Do you know the area you want to search? Do you know what color to look for? What happens when you find it? What happens if you don't find it? The more info you can provide the better help you'll get - if any more at all...

Ok first thankyou that you want to help me ;)

Second, its not complicated:

1. search in a window for a certain color( or pixel ) while the window is minimized or hidden or masked by other windows( because in those situations, searchpixel() doesn't work :)

2.if finded ,I want to return that pixel's coordinates( the x and y coordinates)

3. if it doesn't find it, then create a text file in C: with the text: "Not finded"

But he hard part are the first 2 steps :|

Edited by DeathRow
Link to comment
Share on other sites

Ok here's what you can do...

  • Use the various Window functions to find the window's handle because you can use it to minimize, maximize, restore, hide, show, and get all kinds of information from the window.
  • Use them to show the window/bring window to foreground so you can actually see it.
  • Take a screenshot to memory using _PixelGetColor_CaptureRegion()
  • Hide or minimize the window so you can get your desktop back to the way it was
  • Use _PixelGetColor_GetPixelRaw() to search the screenshot in memory taken on step 3 for the color you are looking for.
  • If function in step 5 finds the color it will return the coordinates.
  • If function in step 5 doesn't find the color you will write to the file that says "not found".
Make sense?

P.S. - Please don't PM and ask for code, you need to come up with some yourself and understand what you're doing. Post what you come up with and you might get some help. Take it one step at a time and take the time to learn. I would recommend start with step 1 above ;)

Link to comment
Share on other sites

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

OK, I get that to a point. I have a standing rule - I never cross parents. However, it is your rig. Edited by Bellicus
Link to comment
Share on other sites

Ok here's what you can do...

  • Use the various Window functions to find the window's handle because you can use it to minimize, maximize, restore, hide, show, and get all kinds of information from the window.
  • Use them to show the window/bring window to foreground so you can actually see it.
  • Take a screenshot to memory using _PixelGetColor_CaptureRegion()
  • Hide or minimize the window so you can get your desktop back to the way it was
  • Use _PixelGetColor_GetPixelRaw() to search the screenshot in memory taken on step 3 for the color you are looking for.
  • If function in step 5 finds the color it will return the coordinates.
  • If function in step 5 doesn't find the color you will write to the file that says "not found".
Make sense?

P.S. - Please don't PM and ask for code, you need to come up with some yourself and understand what you're doing. Post what you come up with and you might get some help. Take it one step at a time and take the time to learn. I would recommend start with step 1 above :)

Thankyou for replying, but its not what I want.... ;)

Because you need to maximize the window to the foreground, iit needs to stay minimized or masked by something while taking the shoot.

Its really disturbing to foreground it everytime, its useless:(

Its really really IMPOSSIBLE to search for a certain color in a minimized window ?? Even in C++ ?

Edited by DeathRow
Link to comment
Share on other sites

sure it is possible. Ask your parents if you can do it first.

;))Yea, but my parents are impossible :|

But is it impossible to search for a certaing color in a FF window masked by other windows ?! :)( Why only the Desktop can retrieve the colors :D( ?

Link to comment
Share on other sites

So, lets recap:

You want to download pictures from the internet.

Your parents don't want you on the internet. They disabled things on your PC to keep you from doing it even.

You want us to get around this problem.

You have made NO attempt to post what you have tried to do. (There are 31 post in this thread alone and no code from you.)

You posted a second thread to basically talk about the same issue -

How can pictures be so attractive that you have resorted to this? Are you trying to download porn pictures?

You are not doing well here. Not well at all.

Edited by Bellicus
Link to comment
Share on other sites

So, lets recap:

You want to download pictures from the internet.

Your parents don't want you on the internet. They disabled things on your PC to keep you from doing it even.

You want us to get around this problem.

You have made NO attempt to post what you have tried to do. (There are 31 post in this thread alone and no code from you.)

You posted a second thread to basically talk about the same issue -

How can pictures be so attractive that you have resorted to this? Are you trying to download porn pictures?

You are not doing well here. Not well at all.

You sound funny...porn..no

My problem is how can I search a color in a window masked by other windows, and there are 30+ posts because of what comments are you putting here: about my parents ,porn pictures, and so on... if you could respond to me if its possible or not or how ,then maybe would be a high quality thread...its not my fault

Edited by DeathRow
Link to comment
Share on other sites

....and yet you make no attempt to post your attempt yourself on solving your problem

....and ask for a "high quality thread"..(which means for us to do the work for you)

We teach people to fish, to give them fish. We know what you want to do. You don't need to explain that again.

Your solution is to do as follows:

1. Use ff.au3. Do what is says to do to interact with Firefox. If you can't install the required addon then ask your parents to do it for you.

2. Use IE. Seeing how you don't have IE then get your parents to reinstall it.

If you can't do that, then you are out of luck.

Link to comment
Share on other sites

....and yet you make no attempt to post your attempt yourself on solving your problem

....and ask for a "high quality thread"..(which means for us to do the work for you)

We teach people to fish, to give them fish. We know what you want to do. You don't need to explain that again.

Your solution is to do as follows:

1. Use ff.au3. Do what is says to do to interact with Firefox. If you can't install the required addon then ask your parents to do it for you.

2. Use IE. Seeing how you don't have IE then get your parents to reinstall it.

If you can't do that, then you are out of luck.

Ok I'll try with the FF plugin...

But I think I managed to take the screenshot of the window while minimized ;):) now I need to edit the script to make to search for a pixel in memory and voila...!

When I finish it,Ill post the script here :D)

Link to comment
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
 Share

×
×
  • Create New...