View previous topic :: View next topic |
Author |
Message |
Andy_Fletcher Contributor
Joined: 10 Jun 2003 Posts: 90 Location: Somerset, United Kingdom
|
Posted: Tue Nov 08, 2005 5:09 pm Post subject: Getting Window ID into variable |
|
|
Hi all, hope some can help me do this....
I am working on a script which requires that I control a number of dialogs from another application that have identical titlebar names so I cannot distinguish between them and so I can't send a Window Send action to a specific dialog.
The way I thought of seperating the dialogs identity was to get the windows id into a variable, but I don't no how to do this.
Example:
if @winexits(Dialog A)
%A = @function to get (WindowsID)
End
Do somthing like window send @CR()
rem Next dialog appears
If @winexsits(Dialog A)
%B = @function to get(Windows ID)
End
If @not(@equal(%A,%B)
Do somthing else......
Hope someone can see what i am getting at. |
|
Back to top |
|
|
SnarlingSheep Professional Member
Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Tue Nov 08, 2005 5:42 pm Post subject: |
|
|
@winexists does return the Window's ID.
Quote: |
This function is used to determine whether the window <window> is present or not. It returns the window identifier if a main window or dialog box with a title bar of <string> exists, and null (false) if not. The <window> is specified using its full title bar text or its class name.
Copyright © 1995 - 2001 S.A.D.E. s.a.r.l. / All rights are reserved.
|
Code: |
%A = @winexists(Dialog A)
|
Would probably be easier if you used the Window Spy tool to see if the dialogs have different Class Names, if they do, you can use them with @winexists(). _________________ -Sheep
My pockets hurt... |
|
Back to top |
|
|
Andy_Fletcher Contributor
Joined: 10 Jun 2003 Posts: 90 Location: Somerset, United Kingdom
|
Posted: Mon Nov 14, 2005 5:37 pm Post subject: |
|
|
Hi there, thanks a lot for responding to my cry for help
Unfortunately the 3 dialogs that I need to identify separately have all got the same window class and title bar text. The only thing that differs is the text which is in the dialog.
How do I get the text that is in a text box of this dialog box rather than the titlebar text ?
I used @wintext but only got the titlebar text and must be doing something wrong
Many thanks once again
Regards
Andy F
SnarlingSheep wrote: | @winexists does return the Window's ID.
Quote: |
This function is used to determine whether the window <window> is present or not. It returns the window identifier if a main window or dialog box with a title bar of <string> exists, and null (false) if not. The <window> is specified using its full title bar text or its class name.
Copyright © 1995 - 2001 S.A.D.E. s.a.r.l. / All rights are reserved.
|
Code: |
%A = @winexists(Dialog A)
|
Would probably be easier if you used the Window Spy tool to see if the dialogs have different Class Names, if they do, you can use them with @winexists(). |
|
|
Back to top |
|
|
MarkTrubo Contributor
Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
|
Back to top |
|
|
|