forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Getting Window ID into variable

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Tue Nov 08, 2005 5:09 pm    Post subject: Getting Window ID into variable Reply with quote

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
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Tue Nov 08, 2005 5:42 pm    Post subject: Reply with quote

@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
View user's profile Send private message Send e-mail
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Mon Nov 14, 2005 5:37 pm    Post subject: Reply with quote

Hi there, thanks a lot for responding to my cry for help Crying or Very sad
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 Embarassed

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
View user's profile Send private message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Tue Nov 15, 2005 12:38 am    Post subject: Reply with quote

Check out this thread:

http://forum.vdsworld.com/viewtopic.php?t=450&highlight=spy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group