[jawsscripts] Re: can't use CreateObjectEx when using HotSpotClicker

  • From: "Mike O'Brien" <mike23432@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 26 Mar 2015 14:07:20 -0400

Hi

You can try calling the default CreateObjectEx directly and bypass HSC by
specifying

Default:: CreateObjectEx (parm1, parm2,parm3)

Below is an email explaining this syntax.

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Dennis Brown
Sent: Tuesday, January 15, 2008 03:50
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: is this new jaws script syntax?

Hi,
Those are new "scope" identifiers, needed because Outlook 2007 uses Word as
the editor exclusively.  Using SwitchToConfiguration to launch the Word
script set became very problematic, especially when dealing with exchange
server timing issues.
These identifiers tells Jaws which specific function to call.
For example, the FocusChangedEventEx is the first event triggered on a focus
change.
Microsoft Outlook 2007 has one, as does Microsoft Word 2007, MSOffice2007,
and default.jss.
They drop through if not redirected.
When going into a message, and the Word functions need calling, not the
Outlook functions, then the FocusChangedEventEx needs to be redirected to
the correct function, otherwise it would call the Outlook FocusChangedEvent,
which would call the Outlook SayFocusedObject, and Outlook
SayObjectTypeAndText, none of which are used in the message body in Outlook.
So, in Outlook's FocusChangedEventEx, we caused it to look for the class of
the message body, _WwG, and if the current class, then redirect it to call
the Word's FocusChangedEventEx function, so the Word functions could process
the message body.
Microsoft_Word_2007::FocusChangedEventEx(...)
Now the correct functions get called, and no constant switching of script
sets, vulnerable to timing issues.

Self::
is only when you want the current script set's instance of that function to
be used.

Scope is redundant if the functions would be called by simply dropping
through.  For example, ; Overwritten event in MyScripts.jss...
Function ValueChangedEvent(...)
If GetCurrentControlId()==4444 Then
    Default::ValueChangedEvent(...) ; Calls default.jss
    Return
EndIf
ValueChangedEvent(...) ; Drops through to default.jss anyway.
EndFunction

If default is the next set, and you are already letting it drop through to
default, then no scope is needed.
Also, be careful not to get into a loop.  You should never call up the
chain, only down, otherwise you continually call the current function.
In this example, the Word scripts don't use anything in the Outlook script
set, so a scope to an Outlook function should never be used in the Word
scripts, since the Word script set is called in  a "use Microsoft Word
2007.jsb" line within Microsoft Outlook 2007.jss file.
Hth.

Thanks,
Dennis Brown
----- Original Message -----
From: "Artur Räpp" <rtr@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Tuesday, January 15, 2008 3:05 PM
Subject: [jawsscripts] is this new jaws script syntax?


> Hi,
>
> I use jaws 9.
> I found in Microsoft Outlook 2007 script file (Microsoft Outlook 
> 2007.JSS)following
> default::SayAllStoppedEvent()
> line 5434, function SayAllStoppedEvent()
>
> is these 2 colons new jaws scripting language syntax? I haven't seen such 
> thing before.
>
> in same file are:
> line 173, function ScreenStabilizedEvent
> Microsoft_Word_2007::ScreenStabilizedEvent(hwndLastScreenWrite)
>
> line 215, function AutoStartEvent
> self::LoadApplicationSettings ()
>
> line 282, function FocusChangedEventEx
>  msoffice2007::FocusChangedEventEx (hwndFocus,
> nObject,nChild,hwndPrevFocus,nPrevObject, nPrevChild,nChangeDepth)
>
> Artur

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jason Fayre
Sent: Thursday, March 26, 2015 12:26
To: jawsscripts
Subject: [jawsscripts] can't use CreateObjectEx when using HotSpotClicker

Hello,
I'm trying to do some work on an application that uses hotspots created with
HotspotClicker. Unfortunately, I'm unable to do anything with CreateObjectEx
to create a UIA object while hsc is loaded. If the use hotspotclicker.jsb
item is in my script, the compile fails with an error stating:
Function CreateObjectEx requires two parameters not three.
If I remove the hsc line from the script, this problem goes away.
I looked at the HSC script, and it looks like it has a CreateObjectEx
function defined that appears to only take two parameters.
Has anyone come across this and how did you solve it?
Thanks!
__________�

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

Other related posts: