I am working on trying to capture the text contained in the title bar of a window.
I wrote this simple script to display it as it sets focus on the parent window then the child window.
In Access I notice that Access the Names of the Windows are listed like this
66550 - OTable "email addresses : Table"
262808 - OForm "Form Test : Form"
How would I capture the one that is on top and get all of the text in the line? Anyone know?
MDL>Click on the Window that contains the value to be used as a Commandline
Press Alt
Press Tab
Release ALT
Wait>.5
GetActiveWindow>parent,X,Y
//Let>GAW_TYPE=1
GetActiveWindow>Child,X,Y
//Let>GAW_TYPE=0
//MDL>%parent%%CRLF%%Child%
Ask>%parent%%CRLF%%Child%%CRLF%Does one of the lines contain the data that needs to be a Commandline,gotit
If>%gotit%=YES,Startparse
Ask>Try entering manually?,ta
If>%ta%=YES,Begin,EOF
Label>Begin
Input>parent,Enter Parent Window,
Input>Child,Enter Child Window.
//Let>GAW_TYPE=0
SetFocus>%parent%*
GetActiveWindow>parent,X,Y
//Let>GAW_TYPE=1
SetFocus>%Child%*
GetActiveWindow>Child,X,Y
//Let>GAW_TYPE=0
Ask>%parent%%CRLF%%Child%%CRLF%Does one of the lines contain the data that needs to be a Commandline,gotit
If>%gotit%=YES,Startparse
MDL>Difficulty in Capturing Window Name - Will not Exit
Goto>EOF
Setting Focus and Getting Window Title
Moderators: JRL, Dorian (MJT support)
Try using the GetControlText> command.
GetControlText>WindowTitle,ClassName,Instance,Result
where ClassName would be replaced by OTable
GCT>WindowTitleGoesHere,OTable,1,HereIsYourAnswer
where 1 means it is the first occurrence of such an object on the desktop.
With this window open, View System Windows ( I believe on the tools menu) will show you the Classes, just count all instances of OTable (probably just the one) until you get to the one in which you are interested...that's your "instance"...
good luck...
GetControlText>WindowTitle,ClassName,Instance,Result
where ClassName would be replaced by OTable
GCT>WindowTitleGoesHere,OTable,1,HereIsYourAnswer
where 1 means it is the first occurrence of such an object on the desktop.
With this window open, View System Windows ( I believe on the tools menu) will show you the Classes, just count all instances of OTable (probably just the one) until you get to the one in which you are interested...that's your "instance"...
good luck...
Class and instance
Gave it a try, and it returned ##NOSUCHWINDOW##,
I copied the text from the view system windows tool so it would be an exact match.
Any other ideas?
I copied the text from the view system windows tool so it would be an exact match.
Any other ideas?
Getting Widow title
Paul,
I am away for the next couple of weeks without much internet access. The program though is Microsoft Access.
Thanks for looking into this
I am away for the next couple of weeks without much internet access. The program though is Microsoft Access.
Thanks for looking into this