[jawsscripts] Re: WMI
- From: Soronel Haetir <soronel.haetir@xxxxxxxxx>
- To: jawsscripts@xxxxxxxxxxxxx
- Date: Mon, 13 Aug 2012 17:00:11 -0800
Okay, I added some test code, and on my machine at least, the locator
is created but then the query returns 0 objects.
if !oLocator Then
SayString("Failed to create locator")
return
EndIf
and then later
SayInteger(oMonitors.Count)
It's not much but it is a start toward figuring out what's going on.
On 8/13/12, Stefan Moisei <vortex37@xxxxxxxxx> wrote:
> Thanks Soronel,
> Is there any way of debugging those COM calls?
> I've made a script using the ProgID you gave me, it obviously doesn't work,
>
> and I don't know how to find out why.
> The script follows, in case you can spot any error:
>
> Script GetMonitorStatus ()
> var
> object oLocator,
> object oWmi,
> object oMonitors,
> object oMonitor
> oLocator=CreateObject("WbemScripting.SWbemLocator.1")
> oWmi=oLocator.ConnectServer(".", "root")
> oMonitors=oWmi.ExecQuery("select * from WmiMonitorBasicDisplayParams",
> "WQL", 48)
> oMonitor=oMonitors[0]
> SayInteger(oMonitor.MaxHorizontalImageSize)
> EndScript
> -----Original Message-----
> From: Soronel Haetir
> Sent: Tuesday, August 14, 2012 2:13 AM
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: WMI
>
> I haven't tried it, but it certainly looks like it should be possible
> using the objects rooted at SWbemLocator.
>
> It looks like the ProgID is "WbemScripting.SWbemLocator.1" (as far as
> I can tell that info is not in MSDN, at least not with all the other
> info about the scripting interface for WMI).
>
> Do you have a specific question?
>
> On 8/13/12, Stefan Moisei <vortex37@xxxxxxxxx> wrote:
>> Hi,
>> Has anyone used WMI in Jaws Scripting? From what I read until now, it
>> seems
>> to be accessible via COM, so it should be possible.
>> If you did, may you be so kind as to show me how?
>> Thanks.
>> __________�
>>
>> View the list's information and change your settings at
>> http://www.freelists.org/list/jawsscripts
>>
>>
>
>
> --
> Soronel Haetir
> soronel.haetir@xxxxxxxxx
> __________�
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> __________�
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
>
--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________�
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
Other related posts: