The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.
From:
Chip OrangeSubject:
RE: How to retrieve the address bar in Internet ExplorerDate:
Thu, Sep 23, 2010 5:57:31 pmcharset="us-ascii"
Thanks Doug, and that's an important point.
As per notepad, it was just an obvious piece of software that everyone would
have, and be familiar with, and which I was using to demonstrate (in the
wiki scripting article) how you might find a piece of information in an
application, which you desired to have spoken by a script.
I hadn't thought of using the control.text property, so when I saw you use
it, I thought I'd try it, and offer it up as an alternate way, and a way of
introducing the entire idea of the control. I was surprised to see it fail.
It's hard to come up with useful examples, using some application that
everyone would have access to easily.
Chip
_____
From: Doug Geoffray [mailto:geoffray@gwmicro.com]
Sent: Thursday, September 23, 2010 3:20 PM
To: gw-scripting@gwmicro.com
Subject: Re: How to retrieve the address bar in Internet Explorer
Chip,
Right, but my theory is the less you have to be dependent on an OSM the
better. The MSAA approach is 100 percent accurate 100 percent of the time.
The OSM...well, even if we were 100% accurate (which we aren't and no screen
reader is), if it were covered or off the screen or something then it may
not work.. I'd vote for the 100 percent accuracy if at all possible.
by the way, in Notepad I never see anything other then the line and column.
Is there more status text you are trying to get?
Doug
On 9/23/2010 3:08 PM, Chip Orange wrote:
thanks Doug; like I said to Ron though clipstext works as well, as you say,
if there is one.
Chip
_____
From: Doug Geoffray [mailto:geoffray@gwmicro.com]
Sent: Thursday, September 23, 2010 3:08 PM
To: gw-scripting@gwmicro.com
Subject: Re: How to retrieve the address bar in Internet Explorer
Chip,
So if you don't want to use the clips and want to use MSAA as Ron suggested
you could do the following:
Get into Notepad and make sure the status bar is showing. Then bring up
Immed and type the following:
print
ActiveWindow.Children.FilterByType(wtStatus)(1).Accessible.Children(2).Name
In my case I get "Ln 7, Col 7"
That is a honker line but isn't it cool ? It obviously could be
broken up and in real life should be to make sure each step found what you
were looking for. For example if that status bar were not enabled then this
would throw an error because I assume I'll get a Status window.
Doug
On 9/23/2010 2:14 PM, Ron Parker wrote:
Control.text is just the window title. A status bar doesn't have a title,
because it's (usually) composed of multiple sections, each with their own
text.
One way to get the pieces of text that make up a status bar is to get the
Accessible for that status bar, then look at the Name property of each of
its children.
On 9/23/2010 2:03 PM, Chip Orange wrote:
Hi Doug,
I have a variation of this problem in the second part of the wiki scripting
article, and I was going to mention it to David.
I wanted to run with your answer and expand upon it a bit and add it to this
solution, but using notepad. What I found however is that while using my
solution for this problem (the notepad status line) I can use the clips to
get to the clipstext property, I cannot use your solution of use of the
control object's text property, which returns only an empty string (although
it should work fine).
Would you happen to know why it doesn't? The answer in itself is probably
worth a mention in the wiki article.
thanks.
Chip
_____
From: Doug Geoffray [mailto:geoffray@gwmicro.com]
Sent: Wednesday, September 22, 2010 11:28 AM
To: gw-scripting@gwmicro.com
Subject: Re: How to retrieve the address bar in Internet Explorer
David,
This is just like any other window. You first have to get the window of
interest and then get the contents from the window. In Windows 7 using IE 8
I just did the following using the Immed script to get the URL in the edit
box.
1) launch IE
2) pop up Immed with ctrl-shift-q
3) type the line below followed by ENTER:
print activewindow.children.filterbytype(wtedit)(1).control.text
For me this printed and spoke "http://www.gwmicro.com/";
because I was sitting at our home page.
Hope this helps.
Doug
On 9/22/2010 12:00 AM, David wrote:
OK, I have a scripting project, where I manage to focus a window in Internet
Explorer. What I need to do here, is to retrieve the information held in the
Address Bar.
Of course, I could have send some keystrokes from the script, and worked my
way around copying the info to the clipboard, then retrieved it from there,
somehow. Yet, I was wondering, if there is any instructions in WE, that will
let me - rather easily - get hold of the info in the adressbar?
Thanks alot!
If there is no such instruction as per date, could it be implemented in
later versions? Or, does anyone have a set of scripting lines, that perform
the task? First talking about it, would the same - or a similar instruction
- give access to the address bar in Windows Explorer, and in Firefox?
Thanks for all input on the matter!
Thanks Doug, and that's an important point.
As per notepad, it was just an obvious piece of software that everyone would
have, and be familiar with, and which I was using to demonstrate (in the
wiki scripting article) how you might find a piece of information in an
application, which you desired to have spoken by a script.
I hadn't thought of using the control.text property, so when I saw you use
it, I thought I'd try it, and offer it up as an alternate way, and a way of
introducing the entire idea of the control. I was surprised to see it fail.
It's hard to come up with useful examples, using some application that
everyone would have access to easily.
Chip
_____
From: Doug Geoffray [mailto:geoffray@gwmicro.com]
Sent: Thursday, September 23, 2010 3:20 PM
To: gw-scripting@gwmicro.com
Subject: Re: How to retrieve the address bar in Internet Explorer
Chip,
Right, but my theory is the less you have to be dependent on an OSM the
better. The MSAA approach is 100 percent accurate 100 percent of the time.
The OSM...well, even if we were 100% accurate (which we aren't and no screen
reader is), if it were covered or off the screen or something then it may
not work.. I'd vote for the 100 percent accuracy if at all possible.
by the way, in Notepad I never see anything other then the line and column.
Is there more status text you are trying to get?
Doug
On 9/23/2010 3:08 PM, Chip Orange wrote:
thanks Doug; like I said to Ron though clipstext works as well, as you say,
if there is one.
Chip
_____
From: Doug Geoffray [mailto:geoffray@gwmicro.com]
Sent: Thursday, September 23, 2010 3:08 PM
To: gw-scripting@gwmicro.com
Subject: Re: How to retrieve the address bar in Internet Explorer
Chip,
So if you don't want to use the clips and want to use MSAA as Ron suggested
you could do the following:
Get into Notepad and make sure the status bar is showing. Then bring up
Immed and type the following:
ActiveWindow.Children.FilterByType(wtStatus)(1).Accessible.Children(2).Name
In my case I get "Ln 7, Col 7"
That is a honker line but isn't it cool ? It obviously could be
broken up and in real life should be to make sure each step found what you
were looking for. For example if that status bar were not enabled then this
would throw an error because I assume I'll get a Status window.
Doug
On 9/23/2010 2:14 PM, Ron Parker wrote:
Control.text is just the window title. A status bar doesn't have a title,
because it's (usually) composed of multiple sections, each with their own
text.
One way to get the pieces of text that make up a status bar is to get the
Accessible for that status bar, then look at the Name property of each of
its children.
On 9/23/2010 2:03 PM, Chip Orange wrote:
Hi Doug,
I have a variation of this problem in the second part of the wiki scripting
article, and I was going to mention it to David.
I wanted to run with your answer and expand upon it a bit and add it to this
solution, but using notepad. What I found however is that while using my
solution for this problem (the notepad status line) I can use the clips to
get to the clipstext property, I cannot use your solution of use of the
control object's text property, which returns only an empty string (although
it should work fine).
Would you happen to know why it doesn't? The answer in itself is probably
worth a mention in the wiki article.
thanks.
Chip
_____
From: Doug Geoffray [mailto:geoffray@gwmicro.com]
Sent: Wednesday, September 22, 2010 11:28 AM
To: gw-scripting@gwmicro.com
Subject: Re: How to retrieve the address bar in Internet Explorer
David,
This is just like any other window. You first have to get the window of
interest and then get the contents from the window. In Windows 7 using IE 8
I just did the following using the Immed script to get the URL in the edit
box.
1) launch IE
2) pop up Immed with ctrl-shift-q
3) type the line below followed by ENTER:
print activewindow.children.filterbytype(wtedit)(1).control.text
For me this printed and spoke "http://www.gwmicro.com/";
because I was sitting at our home page.
Hope this helps.
Doug
On 9/22/2010 12:00 AM, David wrote:
OK, I have a scripting project, where I manage to focus a window in Internet
Explorer. What I need to do here, is to retrieve the information held in the
Address Bar.
Of course, I could have send some keystrokes from the script, and worked my
way around copying the info to the clipboard, then retrieved it from there,
somehow. Yet, I was wondering, if there is any instructions in WE, that will
let me - rather easily - get hold of the info in the adressbar?
Thanks alot!
If there is no such instruction as per date, could it be implemented in
later versions? Or, does anyone have a set of scripting lines, that perform
the task? First talking about it, would the same - or a similar instruction
- give access to the address bar in Windows Explorer, and in Firefox?
Thanks for all input on the matter!




