Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - retrieve data from an applications popup window

Reply
 
Old 12-16-2008   #1 (permalink)
Mark.Luebke


 
 

retrieve data from an applications popup window

Can anyone tell me how to retrieve the strMsg or strTitle from another
running applications popup window?
I need help please.


My System SpecsSystem Spec
Old 12-16-2008   #2 (permalink)
mayayana


 
 

Re: retrieve data from an applications popup window

> Can anyone tell me how to retrieve the strMsg or strTitle from another
Quote:

> running applications popup window?
> I need help please.
>
That's a tough one. You might try the WMI Win32_Process
class. I think that can return the window caption, but it
may not give you a window that's not top-level.

Other than that, even with Win32 API it's diffficult. There
are functions to get top level windows, and functions to
enumerate child windows, and functions to get the title bar
caption or "text" of any window. (Text depends on the window.)
And there are Active Accessibility functions that can go down
into any and all windows, returning a number of properties
from all sub-windows. But there's nothing like that in script, and
even with the API it's tedious and limited.

The only thing I can think of, which would be a long shot,
would be to take a screenshot via script and then write your
own script-based OCR functionality to decipher the characters
displayed onscreen.


My System SpecsSystem Spec
Old 12-17-2008   #3 (permalink)
mr_unreliable


 
 

Re: retrieve data from an applications popup window

Mark.Luebke@xxxxxx wrote:
Quote:

> Can anyone tell me how to retrieve the strMsg or strTitle from another
> running applications popup window?
> I need help please.
>
hi Mark,

Yes, that sort of stuff is not within the usual scope of script.

You can struggle with the system api, but if you are willing to
use a third-party control, then I would suggest "AutoItX". It is
an actX control, callable from script, which will do what you
want. It is part of the AutoIt language download, available here:

http://www.autoitscript.com/autoit3/downloads.shtml

Note: if you happen to use win9x, the current version of autoit
won't work for you, you will have to go back to version 3.2.10.

There are other third-party controls which will work. If you
do wish to call system api's from script, then "dynawrap" will
do it for you (see boilerplate below).

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
the answers will be applicable to the questions)


--- <DynaWrap Boilerplate> ---
It is possible to declare-and-call an api from script,
but you must use a third-party control to do so,
or else write one yourself.

It has already been correctly pointed out that there
is no api-capability in "pure" script.

If you are willing to use a third-party control, then
one such control, called "DynaWrap", can be found on
Guenter Born's website (note: Guenter refers to it as
"DynaCall"). Here is the link to it:

http://people.freenet.de/gborn/WSHBa...SHDynaCall.htm

- or -

http://ourworld.compuserve.com/homep...SHDynaCall.htm

On that page you will find a download for the control,
plus some code samples.

Note: you may find additional sample code by searching
the archives of the wsh and vbscript ng's.

Note also: DynaWrap does have its limitations. There are
certain things it can't do. For example, you can't call
api's "by ordinal". (I had previously asserted that you
can't use DynaWrap to call api's which take typedefs as
parameters, but I have been proven wrong on that --
although it took me about two weeks to figure out how it
was done). Regardless, Dynawrap will work for most of
"the usual suspects".

And finally, DynaWrap doesn't work entirely as advertised.
For example, it is supposed to allow for the declaration of
several api definitions in one instance of itself. I could
never get that to work (in win9x -- but others have shown
this to work as advertised under winNT). With win98, you
will need a new instance of DynaWrap for every api, or else
re-instantiate the object for every api. Someday I'm going
to learn enough c++ to fix that...

Another possibility (for calling api's from script is XNeat:

http://www.xneat.com/doc/call_win32_api.html

One other thing. While the above discussion is oriented to
calling the system api's, contained in the user32, kernel32,
gdi32 and other system dll's, you could use DynaWrap (and
other similiar utilities) to call the exported interfaces
to ANY dll.

--- </DynaWrap Boilerplate> ---


My System SpecsSystem Spec
Old 02-03-2009   #4 (permalink)
Python42


 
 

Re: retrieve data from an applications popup window

You might try AutoITx from http://www.autoitscript.com/autoit3/index.shtml

<Mark.Luebke@xxxxxx> wrote in message
news:a69f0c88-8f97-4f7a-88da-b4302be48f9b@xxxxxx
Quote:

> Can anyone tell me how to retrieve the strMsg or strTitle from another
> running applications popup window?
> I need help please.
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Popup Window Vista mail
retrieve data from hard drive .NET General
folder lost in applications cannot retrieve files Vista file management
Possible To Retrieve Data Files From A Complete PC Backup Vista General
Retrieve data from notes gadget Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46