| View previous topic :: View next topic |
| Author |
Message |
Precise
Joined: 30 Dec 2007 Posts: 18 Location: East Coast
|
Posted: Tue Feb 26, 2008 4:22 am Post subject: Working With Minimized Windows |
|
|
OK, so I'm not sure if this is more of a logic or code based question.
I'm trying to figure out how to either imagesearch a minimized window or find another way to accomplish the same basic task. I need to wait for a certain occurance / picture within a minimized window. As far as I know, there's not too much to work with situationally as it's all flash ( I can't find statusbar text, window title, or window text changes to trigger the end of entering data).
The data entered varries each loop, depending on certain things in the flash. It's looped to enter a given ammount of data to fill in all boxes and in some cases not as many entries are needed. At some point it finishes entering data and the flash changes to alert you are finished. Then a control is clicked to move on to the next form.
It's basically just a windows flash control inside the window, not much more. It enters information through the flash controls fairly slowly. There are about 40 entries made with a 10 second delay between each. Entering the full ammount of info for a small form is wasteful and unecessary.
Having it activate the window and imagesearch is annoying, I spent a lot of time figuring out how to interact with the controls while they are minimized, now I just need to find a way to trigger the end of the form. Any ideas? |
|
| Back to top |
|
 |
wOxxOm
Joined: 09 Feb 2006 Posts: 319
|
Posted: Tue Feb 26, 2008 4:44 am Post subject: |
|
|
| I wonder maybe minimized windows display device context maybe intercepted and copied, some WinAPI stuff like GetDC, bitblt, etc - there should be a lot of examples in VB or C of taking a screenshot of screen or window, so maybe it could be applied to a minimized window as well |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Tue Feb 26, 2008 6:49 pm Post subject: |
|
|
The imagesearch command can only see what is really displayed on the screen. you cannot imagesearch a minimized window. The above duggestion about using DllCall wit BitBlt and related functions seems like your best bet. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
Precise
Joined: 30 Dec 2007 Posts: 18 Location: East Coast
|
Posted: Wed Feb 27, 2008 2:02 am Post subject: |
|
|
| What is bitbit, theres nothing on it in this forum, can't find it on google... |
|
| Back to top |
|
 |
Oberon
Joined: 18 Feb 2008 Posts: 453
|
Posted: Wed Feb 27, 2008 9:29 am Post subject: |
|
|
| It's very complicated, I doubt you will like it. Have you tried using commands such as ControlGetText and ControlSetText instead? |
|
| Back to top |
|
 |
Precise
Joined: 30 Dec 2007 Posts: 18 Location: East Coast
|
Posted: Wed Mar 19, 2008 11:12 pm Post subject: |
|
|
Just because I don't have many posts in this forum does not mean I'm a total noob :p I've found an interesting way around this, which is what I was really looking for...
Using javascript "loader" mods to the page, provided to me by a more experianced member, I was able to monitor the page and output some important information in its title and status bars. This allowed me to replace imagesearch loops used for timing and control flow with winget loops. It has been very helpful encorporating javascript into this project.
The silent functions are useless if you have to imagesearch the screen. I found another topic somewhere in the forums that provided a way to imagecapture and manage a minimized window in memory. I think it was titled, "In-Memory Window Capture". I may eventually use this for other things where javascript wouldn't be as applicable. |
|
| Back to top |
|
 |
|