[jawsscripts] Re: script is not working.

nah matthew, I think Jitendra's correct on this, in this situation.

Jatendra I believe he's talking about the Add Hotkey function in Keyboard
manager itself, not I think, the more specialized instance of it for adding
links to virtual buffer, that you've kindly pasted in below.

I'm kinda embarrassed now that I didn't notice the TypeCurrentScriptKey in
the actual script code myself. but luckily jatendra is on the good job for
us! <smile.>

the AddHotkey in the keyboard manager matthew, can only be activated for
functions of an application,
which have been already assigned to jaws scripts,
and is not available for builtIn keys of an application for which there are
no scripts.

I.e. if you wanted to reassign the control+O open dialog Keystroke in
wordPad for example, you could not use keyboard manager to do that, because
it's a builtin keystroke/function of wordPad, and thus wouldn't show up at
all in keyboard manager, because it's not been assigned to any jaws script.
in FsReader's case however,
there are scripts assigned to these builtin keys, to provide some level of
extra support or functionality to the Builtins.
But, as jatendra has pointed out, the scripts may only be doing very light
duties in FSReader, to provide some extra support/functionality
around the builtIn functions of those keystrokes.

However in either case this doesn't mean you can't duplicate or reassign all
of these keys, through scripting.
i.e. if you reassign your openDialog script from control+O, to f5, using
keyboard manager,
then go into the script manager, find that script in there, put a semicolon
at the leftHand end of the TypeCurrentScriptKey()
function, to stop it from running, then on a blank line below that, type:
{control+O}

and press enter to insure it's on it's own line, then hit control+s to
recompile/save this.
Now f5 should pres control+O for you internally, and run the open dialog
builtIN function.

Note the left and right braces, shift+brackets next to P, that must be used
to surround actual keystrokes you want your script to press for you.

now of course this stil leaves the builtIN control+o hotkey, doing the open
Dialog job as well, though now, without any scripted support to it's builtin
function, which may've been there previously.

now, if you wanted to totally reassign the builtIn control+O keystroke,
to something else, then you'd have to make a new script in the script
manager, with control+e, then in that first dialog where it asks you whehter
or not you want to assign it to a keystroke, (in which case it becomes a
script,) or not, (in which case it remains a user function,)
it also asks for description and summary of what the script will do etc, and
if you've checked the box that asks whether you wanna assign a keystroke to
the script,
then at the end of tab order in this dialog,
it also asks what key to assign to this new script. here you'd then just hit
the control+o actual keystroek itself, and it should speak that back to you,
then tab to ok and hit enter.
now you'd have a new blank script in there, assigned to control+o, which you
could now put in anything you wanted this key to do, instead of it's builtin
function.
you could of course also put conditions in your script, such that only if x
and/or Y were true, do Zed, else,
TypeCurrentScriptKey()
instead, which would then pass control+O to the application, if those
conditions weren't met, and thus perform it's builtin OpenDialog job.

hth.

geoff c.



To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, November 17, 2008 4:29 PM
Subject: [jawsscripts] Re: script is not working.


> Jitendra,
>
> Thank you very, very much for going through the trouble of doing the
> research and experimentation. Though your solution could very well work,
I'm
> still under the impression that the add hotkey function was created to
> amplify the already existing keyboard commands. That is, originally, the
> user could configure jaws to add additional keyboard commands because one
> might not be comfortable with using default keyboard commands. In other
> words, do we still have a problem with keyboard assignments not taking, or
> is this new desired interaction FS wants users to use.
>
> Thanks once again for your efforts.
>
> Matthew
> ----- Original Message ----- 
> From: "zJitendra" <jeet.invincible@xxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Sunday, November 16, 2008 8:46 PM
> Subject: [jawsscripts] Re: script is not working.
>
>
> > Hello mathew and all, sorry as I have deleted the original thread
> > related to this topic, therefore, none of you see your message below.
> > by the way, I looked in to the jss of fs reader, and found following:
> > JAWS just scripted the keyboard shortcuts, but they already built-in in
> > fs reader, means one can use any screen-reader provided that fs reader
> > is installed, and you can use keys like Comma to back, period for
> > forward, ctrl+O to open, play, pause, stop and more keys, so now, why fs
> > scripted it?
> > may be just to prevent jaws from speaking key names, and in some places
> > when changing speed, provide the level of speed like 15, 20 or whatever
> > you set.
> > so when scripting keys already built-in, following code what they used:
> > and read till end of this mail for the answer of your question.
> > script OpenDialog()
> > if UserBufferIsActive() then
> >     UserBufferDeactivate()
> > EndIf
> > SayCurrentScriptKeyLabel()
> > TypeCurrentScriptKey()
> > ;as you can see, that type current script key statement types the key
> > assigned with the script, and in your case, f5 was assigned to the
> > script, but in fs reader, ctrl+O is ;built-in for open dialog, script
> > types f5, and the dialog is not invoked.
> > ;therefore, when changing keys to such scripts, make sure if key is
> > built-in, use some other code instead, and remove type current script
key.
> > ;type key or type string may be helpfull.
> > EndScript
> > Thank you, Hope this helps. Jitendra from india.
> > Skype: Jeet.delhi
> >
> > __________
> > 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

Other related posts: