[jawsscripts] Re: FS Reader Script Help

I just realized after compiling my SayPriorCharacter script, that there
is all ready a SayPriorCharacter script in the FSReader script file. 
This complicates the logic required a bit.

You would need to incorporate the IsSameScript logic into the original
FS scripts for SayPriorCharacter and SayNextCharacter scripts.  Let us
know if you have any trouble with this.

David Farough
Application Accessibility Coordinator/coordonateur de l'accessibilité 
Information Technology Services Directorate /
Direction des services d'information technologiques
Public Service Commission / Commission de la fonction publique
Email / Courriel:  David.Farough@xxxxxxxxxxxxx
Tel. / Tél:    (613) 992-2779 

>>> "David Farough" <David.Farough@xxxxxxxxxxxxx> 12:22 pm Friday,
October 31, 2008 >>>
Here is another idea you can use.

You could use the IsSameScript function to perform one action when key
is pressed once and specify different functionality to be used for
subsequent presses of the same key.

Lets start with the 5 key on the number pad.

This key has been mapped to the SayCharacter script.

All you would need to do is to add this script to the FSReader.jss
file
and compile it.

If you check back a few days on this list there was a discussion of
the
IsSameScript function.  I have used Paul Magill's method when coding
this script.

The subject for the post was:  Help with a script

Script SayCharacter () ; for Num pad 5 key 
if isSameScript () then 
        TypeKey ("control+p") ; original keystroke for PlayPause
function
;       PerformScript PlayPause() this does not work here because 
; PlayPause uses TypeCurrentScriptKey() which would result in the
wrong
key being pressed
else
        Delay (3, true) ; allow a delay 
        if IsKeyWaiting () then ; get out if another key was pressed 
                return 
        endif
        PerformScript SayCharacter() ; perform the default SayCharacter
script.
endif
EndScript

You could do something similar for SayPriorCharacter and
SayNextCharacter scripts.

This approach should work.

Script SayPriorCharacter () ; 4 on num pad 
if isSameScript () then 
        PerformScript Rewind()
else
        Delay (3, true)
        if IsKeyWaiting () then 
                return 
        endif
        PerformScript SayPriorCharacter()
endif

EndScript


Watch out for the use of TypeCurrentScriptKey functions in the
FSReader
scripts.




David Farough
Application Accessibility Coordinator/coordonateur de l'accessibilité 
Information Technology Services Directorate /
Direction des services d'information technologiques
Public Service Commission / Commission de la fonction publique
Email / Courriel:  David.Farough@xxxxxxxxxxxxx 
Tel. / Tél:    (613) 992-2779 

>>> "Matthew2007" <matthew2007@xxxxxxxxxxx> 09:00 am Friday, October
31, 2008 >>>
Everett,

You just conveyed the equivalent of Chinese calculus with this
explanation. 
(laughing). Like I stated, I'm still a beginner, but the good news is
that 
you conveyed it was not impossible to do what I want which is a good
thing. 
I will try to research as much as I am able to later tonight after
work
as 
well as this weekend. Hopefully I can continue to ask you for more
help
and 
feedback as I go along.

Matthew

----- Original Message ----- 
From: "E.J. Zufelt" <everett@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Friday, October 31, 2008 6:38 AM
Subject: [jawsscripts] Re: FS Reader Script Help


> Good morning Matthew,
>
> Without having given this too much thought, I'd suggest you try the
> following.
>
> 1. Create a new global variable in the FSReader script that acts as
a

> toggle
> between 0 and 1.
> 2. Create a script and assign it to the Control P key combination.
> 3. In that script, if your variable is set to 0 set it to 1, if it
is
1 
> set
> it to 0.
> 4. Create another new script and assign it the numpad 5 key.
> 5. If your variable is set to 0 call say by character, if it is set
to 1
> call play/pause.
>
> HTH,
> Everett
>
>
> ----- Original Message ----- 
> From: "Matthew2007" <matthew2007@xxxxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Friday, October 31, 2008 8:17 AM
> Subject: [jawsscripts] FS Reader Script Help
>
>
>> Hi all
>>
>> I'm using Freedom Scientific's FS reader to read some daisy
material, but
>> I've come across a very annoying problem I'd like to resolve with a

>> script
>> change---I've attached the error message below. For those who have
ever
>> used
>> FS reader, the control P command plays and pauses audio daisy
books.
The
>> problem is that when the user must play and pause often, the user
ends up
>> having to find his or her way over to the control plus P keystroke
which
>> becomes very cumbersome after a while. I thought rather than to
have
to
>> put
>> of with this hassle, maybe I would be able to write or tweak a
script 
>> that
>> will allow me to change the FS reader play pause command from
control P
>> keystroke to the numpad 5. If anyone out there can help me
reconfigure 
>> the
>> play pause keystroke script, I will then change the numpad left and
right
>> arrows to rewind and forward so that I can read any daisy book with
my
>> three
>> fingers via numpad numbers 4, 5 and 6. I'm sure those of you who
have 
>> used
>> FS reader can see the simple logic and incredible comfort this
>> hotkey/script
>> can provide a daisy book reader. The problem is that I'm given the
>> following
>> error message when I try to assign my new hotkey via Jaws keyboard
>> manager:
>>
>> "Keystroke In Use
>> NumPad5 is already assigned to SayCharacter in C:\Documents and
>> Settings\...
>> Freedom Scientific\JAWS\6.0\... DEFAULT.JKM.  Continuing will
replace the
>> existing assignment.
>> OK Cancel"
>>
>> As you can see there is a keyboard conflict I'm coming across. I
>> understand
>> why the keyboard conflict is happening as the numpad five is also
the key
>> jaws uses for say current character. This is also very problematic
in 
>> that
>> when placing a personal note within FS reader using the control
plus
>> letter
>> B, if I press the numpad 5 to play and or pause, I will also be
invoking
>> the
>> say current character command.
>>
>> the question I have is... Is there a way of getting jaws to used
the
>> numpad
>> 4, 5, and 6 to rewind, play/pause, and forward respectively as I
read a
>> book, then once I would like to place a personal note within a
daisy
book
>> by
>> using control letter B I can have these keys revert back to their
default
>> actions of sayPreviousCharacter, Play/pause, and SayNextCharacter 
>> scripts?
>> In other words, I want to script the default playback
functionality,
then
>> have the original FS reader functionality kick in after I press
control B
>> to
>> place a bookmark. this sounds very, very possible, but I can't
think
of
>> how
>> to make this happen as I'm still a preschool scriptor. For those
who
want
>> to
>> try this out for yourselves, just launch FS reader from the jaws
menu
>> within
>> Programs. Open one of the jaws tutorials and press control P to
play
and
>> pause the daisy tutorial. You can then press control plus letter B
to
>> place
>> a bookmark. As you will soon find, to do what I want I need to be
able to
>> get jaws to shut off my numpad 4, 5, and 6 personal keyboard tweak
to 
>> then
>> type in my bookmarks using default text entry and jaws reading
command. 
>> If
>> anyone out there can help and you need more clarification, please
feel
>> free
>> to let me know.
>>
>> The Struggling and confused Matthew
>>
>>
>> __________
>> Visit and contribute to The JAWS Script Repository
http://jawsscripts.com 
>>
>> View the list's information and change your settings at
>> http://www.freelists.org/list/jawsscripts 
>>
>>
>
> __________
> Visit and contribute to The JAWS Script Repository
http://jawsscripts.com 
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts 
> 

__________ 
Visit and contribute to The JAWS Script Repository
http://jawsscripts.com 

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


100 Years Merits a Celebration!  
http://www.psc-cfp.gc.ca/100/index-eng.htm 
100 ans, ça mérite une célébration!    
http://www.psc-cfp.gc.ca/100/index-fra.htm 

__________ 
Visit and contribute to The JAWS Script Repository
http://jawsscripts.com 

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


100 Years Merits a Celebration!  
http://www.psc-cfp.gc.ca/100/index-eng.htm 
100 ans, ça mérite une célébration!    
http://www.psc-cfp.gc.ca/100/index-fra.htm 

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: