[jawsscripts] Re: Does any event trigger when you use the quick nav keys?

  • From: chad.foster@xxxxxxxxxx
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sun, 9 Mar 2008 19:31:26 -0400

Here is example of the code to insert into a batch file:


@Echo Off
::Set the title.
Title Configuring JAWS for use.
::Set JAWS version.
Set JAWSVersion=9.0
::Define variables
Set MyDocsDirectory=%UserProfile%\My Documents
set UserDirectory=%AppData%\Freedom Scientific\JAWS\%JAWSVersion%\SETTINGS\ENU
set ScriptsDirectory=%MyDocsDirectory%\Archives\Jaws\scripts
Set AllUsersDirectory=%AllUsersProfile%\Application Data\Freedom
Scientific\JAWS\%JAWSVersion%\settings\enu
::Set up shipping IE files.
copy "%AllUsersDirectory%\Internet Explorer.js*" "%UserDirectory%"
ren "%UserDirectory%\Internet Explorer.jsb" "FS_Internet Explorer.jsb"
ren "%UserDirectory%\Internet Explorer.jsd" "FS_Internet Explorer.jsd"
ren "%UserDirectory%\Internet Explorer.jss" "FS_Internet Explorer.jss"
::Move our IE files into place.
copy "%ScriptsDirectory%\IE\*" "%UserDirectory%"


It will do what you are seeking with the default files, you'll need to
write the batch file accordingly though. I recommend googling some
examples of Windows batch files for other uses.


--Chad


On 3/9/08, Bryan Garaventa <bgaraventa11@xxxxxxxxxxxxxx> wrote:
> Ah, any idea where I can get an example of such a batch file? I've never
> created one before.
>
> Would this recognize when no default jsb file is located within the personal
> settings folder, then check the shared user folder for the correct jsb to
> copy and rename into the personal settings folder as well?
>
> ----- Original Message -----
> From: <chad.foster@xxxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Sunday, March 09, 2008 2:13 PM
> Subject: [jawsscripts] Re: Does any event trigger when you use the quick nav
> keys?
>
>
> > You will need to insert your plugin script file as the default IE
> > script source and binary files, then use the renamed shipping FS IE
> > files.
> >
> > So your files will be named "Internet Explorer.jss" and "Internet
> > Explorer.jsb," and you can rename the shipping IE script files to
> > something along the lines of "FS_Internet Explorer.jss" and
> > "FS_Internet Explorer.jsb."
> >
> > In your custom-written IE script file, insert the following line:
> >
> > Use "FS_Internet Explorer.jsb"
> >
> > Then your KeyPressedEvent copy will take priority over the shipping IE
> > copy, and you will need to call the shipping IE KeyPressedEvent in
> > circumstances requiring no custom processing.
> >
> > You can write a batch file to do all the file renaming for you if it
> > needs to be done routinely e.g. upgrades of JAWS.
> >
> >
> > --Chad
> >
> > On 3/9/08, Bryan Garaventa <bgaraventa11@xxxxxxxxxxxxxx> wrote:
> >> I'm not sure if this behavior is a bug in my version of JAWS9, or is
> >> standard behavior with IE7, but I cannot get KeyPressedEvent to fire.
> >>
> >> The scripts need to be set up as an external script set, so I'm adding
> >> them
> >> to the default IE7 scripts using the usual line
> >> use "ScriptPlugin.jsb"
> >>
> >> Due to the nature of the scripts, I won't be able to depend on a
> >> modification of the default KeyPressedEvent function within the default
> >> IE
> >> script set. The plugin that I'm making is going to be distributed
> >> publically, and will be compatible with several different JAWS versions,
> >> including IE6.
> >>
> >> I see that there is a KeyPressedEvent function within the default IE7
> >> script
> >> file, would this be conflicting with mine?
> >>
> >> Also, I've tried the following code blocks, which would solve the problem
> >> if
> >> they worked...
> >>
> >> Script FocusToNextField ()
> >> PerformScript FocusToNextField()
> >> let g_i_isWithinTarget = isTargetObject ()
> >> EndScript
> >> Script FocusToPriorField ()
> >> PerformScript FocusToPriorField()
> >> let g_i_isWithinTarget = isTargetObject ()
> >> EndScript
> >>
> >> Both of the above scripts are also within the default IE7 script file, so
> >> I'm wondering if there is a conflict.
> >>
> >> Strangely though, the following script blocks work fine, even though they
> >> too are also within the default IE7 script file as well...
> >>
> >> Script SayNextLine ()
> >> PerformScript SayNextLine()
> >> let g_i_isWithinTarget = isTargetObject ()
> >> EndScript
> >> Script SayPriorLine ()
> >> PerformScript SayPriorLine()
> >> let g_i_isWithinTarget = isTargetObject ()
> >> EndScript
> >>
> >> So, leading me to conclude, I really have no idea what's going on...
> >>
> >>
> >> ----- Original Message -----
> >> From: "Dennis Brown" <DennisTBrown@xxxxxxxxxxx>
> >> To: <jawsscripts@xxxxxxxxxxxxx>
> >> Sent: Sunday, March 09, 2008 9:20 AM
> >> Subject: [jawsscripts] Re: Does any event trigger when you use the quick
> >> nav
> >> keys?
> >>
> >>
> >> > Also use a variable that determines if quick nav keys are activated.
> >> > There is a function and a flag for this, so run the function in
> >> > FocusChangedEvent to set or unset the global flag, then use that flag
> >> > as
> >> > your first step in the condition statement in KeyPressedEvent.  That
> >> > makes
> >> > it less intrusive on regular keypresses.
> >> > Also check for FormsMode flag in that same condition so it doesn't
> >> > activate if entering text in a form field.
> >> >
> >> > Thanks,
> >> > Dennis Brown
> >> > ----- Original Message -----
> >> > From: <chad.foster@xxxxxxxxxx>
> >> > To: <jawsscripts@xxxxxxxxxxxxx>
> >> > Sent: Sunday, March 09, 2008 10:34 AM
> >> > Subject: [jawsscripts] Re: Does any event trigger when you use the
> >> > quick
> >> > nav keys?
> >> >
> >> >
> >> >> You should insert some logic into KeyPressedEvent to make sure your
> >> >> logic needs to fire, not just fire your logic every time this event is
> >> >> fired. So you would want to check for:
> >> >>
> >> >> (1) Is the nIsScriptKey parameter variable TRUE or FALSE? You only
> >> >> want to proceed if it is TRUE.
> >> >> (2) Is the Virtual PC cursor active? You should proceed if it is TRUE.
> >> >> (3) Is the KeyPressedEvent being fired from a quicknav key? You will
> >> >> need to write a function to determine if the current script key is a
> >> >> quicknav key combination. Note: use the length of the
> >> >> GetCurrentScriptKey function's return value, along with StringSegment
> >> >> using the plus sign (+) as the delimiter.
> >> >> (4) If all of these conditions are met, fire your logic, otherwise,
> >> >> return.
> >> >>
> >> >> Using the order I listed above minimizes overhead, since you are
> >> >> proceeding in the order of operations that use less memory up-front.
> >> >>
> >> >>
> >> >> --Chad
> >> >>
> >> >>
> >> >> On 3/8/08, Bryan Garaventa <bgaraventa11@xxxxxxxxxxxxxx> wrote:
> >> >>> This won't work though, the script checks for a condition by querying
> >> >>> elements on a web page, then when the condition is found, a variable
> >> >>> object
> >> >>> for the DOM is stored, and a scheduled event runs to check on the
> >> >>> condition
> >> >>> of a specific element every two seconds.
> >> >>>
> >> >>> If this script were triggered every time a key is pressed, it would
> >> >>> be
> >> >>> way
> >> >>> too intrusive and would degrade performance.
> >> >>>
> >> >>> It does work if I attach the script to the main navigation commands
> >> >>> like
> >> >>> prior line, next line, paragraph, etc., but the only condition that
> >> >>> gets
> >> >>> past the script handler however, is when the quick nav keys are used
> >> >>> to
> >> >>> jump
> >> >>> directly into a form element, which doesn't look to trigger any sort
> >> >>> of
> >> >>> event like FocusChangeEvent, or FocusPointMovedEvent.
> >> >>>
> >> >>> If there isn't a basic event handler for this, then I guess I'll just
> >> >>> have
> >> >>> to attach key assignments to e and f to check for the condition, then
> >> >>> continue on to the quick nav command. It's a bit clunky like this
> >> >>> though.
> >> >>>
> >> >>>
> >> >>> ----- Original Message -----
> >> >>> From: <chad.foster@xxxxxxxxxx>
> >> >>> To: <jawsscripts@xxxxxxxxxxxxx>
> >> >>> Sent: Saturday, March 08, 2008 3:53 PM
> >> >>> Subject: [jawsscripts] Re: Does any event trigger when you use the
> >> >>> quick
> >> >>> nav
> >> >>> keys?
> >> >>>
> >> >>>
> >> >>> > Bryan, check out KeyPressedEvent.
> >> >>> >
> >> >>> >
> >> >>> > --Chad
> >> >>> >
> >> >>> >
> >> >>> > On 3/8/08, Bryan Garaventa <bgaraventa11@xxxxxxxxxxxxxx> wrote:
> >> >>> >> I'm trying to attach an event that runs when you use the quick nav
> >> >>> >> keys
> >> >>> >> such
> >> >>> >> as F or E on a web page. Is there any event that deals with this?
> >> >>> >>
> >> >>> >> Thanks,
> >> >>> >>
> >> >>> >> Bryan
> >> >>> >>
> >> >>> >> __________
> >> >>> >> View the list's information and change your settings at
> >> >>> >> //www.freelists.org/list/jawsscripts
> >> >>> >>
> >> >>> >>
> >> >>> >
> >> >>> >
> >> >>> > --
> >> >>> > Chad Foster
> >> >>> > Access Technology Solutions
> >> >>> > http://www.GO-ATS.net
> >> >>> > __________
> >> >>> > 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
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >> --
> >> >> Chad Foster
> >> >> Access Technology Solutions
> >> >> http://www.GO-ATS.net
> >> >> __________
> >> >> 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
> >> >
> >>
> >> __________
> >> View the list's information and change your settings at
> >> //www.freelists.org/list/jawsscripts
> >>
> >>
> >
> >
> > --
> > Chad Foster
> > Access Technology Solutions
> > http://www.GO-ATS.net
> > __________
> > 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
>
>


-- 
Chad Foster
Access Technology Solutions
http://www.GO-ATS.net
__________ 
View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: