Re: Stumped: JAWS GetObject function for current browser window?

I've been playing around with your suggestion. Sadly though, it doesn't appear to work.


Whenever I try to access the string for the handle, even by using a static value such as

let ssBrowser = colProcesses(0) ; For the first instance

let Info = ssBrowser.Handle

Say (Info, 0) ; Says nothing.

let Info = ssBrowser.ProcessID

Say (Info, 0) ; Says nothing


The array must be there, as indicated by the SayInteger function which is accurate. Getting to any of the objects it contains seems weirdly difficult though.

Any other suggestions? I'm thoroughly lost...

Thanks,

Bryan

----- Original Message ----- From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Friday, September 21, 2007 11:37 PM
Subject: Re: Stumped: JAWS GetObject function for current browser window?


Hi Bryan,

My first thought is that the properties of this object might have strange names. However, when I look at:

http://msdn2.microsoft.com/en-us/library/aa394372(d=printer).aspx

I see that they don't. Apart from the fact that you don't seem to have declared the var ssBrowser, I would guess that the difficulty lies in the line where you are trying to access one member of the array of colProcesses. And of course JAWSScript doesn't have a foreach command. Does it help to write a while loop to access, say, the handle of every instance?

 It's early in the morning here.  Things may get clearer when I'm awake.

 Martin



----- Original Message ----- From: "Bryan Garaventa" <bryan@xxxxxxxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Saturday, September 22, 2007 5:52 AM
Subject: Re: Stumped: JAWS GetObject function for current browser window?


Ah well, I guess my last message was a little premature...

Though I can return the number of instances currently running, I cannot actually access the object within the collection.

; This is the code that works for returning the numbered collection:

var object objWMIService,

object colProcesses,

int NumberOfProcesses



let objWMIService = GetObject("winmgmts:\\\\" +

"." +

\\root\\cimv2)



let colProcesses = objWMIService.ExecQuery("Select * from Win32_Process Where Name = 'iexplore.exe'")



let NumberOfProcesses = colProcesses.Count



SayInteger (NumberOfProcesses) ; Returns accurately the number of running IE instances



; Now for the part that doesn't work...



var string Info



While (NumberOfProcesses)



let ssBrowser = colProcesses(NumberOfProcesses - 1)



let Info = ssBrowser.Handle

Say (Info, 0) ; Returns ""



let Info = ssBrowser.ProcessID

Say (Info, 0) ; Returns ""



let NumberOfProcesses = NumberOfProcesses - 1

EndWhile


Any ideas?

---snip---

__________
View the list's information and change your settings at http://www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at http://www.freelists.org/list/programmingblind

Other related posts: