[jawsscripts] Re: Get IE Document from window handle

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Tue, 26 Jun 2012 17:00:05 -0400

That should work to get the DOM for a page that you're opening from a
script, but not so much for a page that's already open. For that, you
can setFocus() to the window, grab the IEGetCurrentDocument() result,
and setFocus() back to where it was before, which you can of course
save in advance with getFocus(). This is not as clean as would be a
new optional hwnd parameter to IEGetCurrentDocument(), but it at least
works where you really need it. I recommend use of speechOff/speechOn
and maybe a pause() after the return of focus, to avoid extra speech
during this little stunt.

On Tue, Jun 26, 2012 at 12:44:49PM -0700, John Martyn wrote:
This will help in getting the window handle of an IE window using the DOM.
Var
Int trigger,
Int safety,
Object o,
String sysDir
let sysDir = GetUserSettingsDirectory ()
if StringSegmentCount (sysDir, "\\") == 10 || IsWinVista () then
let o = CreateObjectEx ("internetexplorer.application", 0)
else
let o = CreateObject ("internetexplorer.application")
endif
o.visible="true"
o.navigate("www.blindtunes.net/currentVersion.htm")
while trigger != 1
let safety = safety+1
Delay (10, 1)
let theIE = o.hWND
if theIE != 0 then
let trigger = 1
endif
if safety == 10 then
let trigger = 1
endif
endwhile

This should help.
John

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee
Sent: Friday, June 22, 2012 6:39 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Get IE Document from window handle

Unfortunately I don't think so.

On Fri, Jun 22, 2012 at 08:54:07PM -0400, Kamil wrote:
Hi all,

Just wondering if in JAWS 13, FS has finally introduced a function to return
the DOM of an IE window by handle.

Thanks for your kind attention,
Kamil 

__________???

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

--
Doug Lee, Senior Accessibility Programmer SSB BART Group -
Accessibility-on-Demand mailto:doug.lee@xxxxxxxxxxxxxxxx
http://www.ssbbartgroup.com "While they were saying among themselves it
cannot be done, it was done." --Helen Keller __________o?=

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________???

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: