[jawsscripts] Re: Passing keystrokes from one script to another script

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 19 May 2016 08:51:24 -0400

Sounds like you want to do a jump of specific length without asking for user 
input. The best way to do that
would be to copy the relevant parts of the script you're currently trying to 
call, such as the
WinampJumpToTime(sTimeMark) line and the code above it that figures out the 
right value for sTimeMark. If you
don't want to ask the user for input, no need to bring up that edit box in the 
first place. :)

On Thu, May 19, 2016 at 08:47:21AM -0400, Jonathan Milam wrote:
Thanks, Doug and Paul.  I appreciate the information.  When I mentioned
calling the script  from within my script, I was using:
PerformScript JumpToRelativeTime()
However, once the script was called, I couldn't pass typing an integer and
then the enter key to execute it.  My knowledge of scripts is still very
basic, however, I did try and copy the code that I thought I would need
from the RelativeTime script into my own, but wasn't able to determine
which pieces I needed for my script without receiving compilation errors.

Jonathan
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee
Sent: Thursday, May 19, 2016 8:42 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Passing keystrokes from one script to another
script

A bit of additional info:

I believe curly brackets for typing keys are deprecated. TypeKey("Tab") is
better than {Tab} nowadays.

But calling the code you want to run directly tends to be better still. So
you would probably want
PerformScript as already mentioned.

There is one other option that I have not played with, which is the
SimulateKey() function. That's supposed to
do what you're trying to do, though I still think PerformScript is better
in this case.

On Thu, May 19, 2016 at 10:20:09PM +1000, Paul Magill wrote:
Hi Jonathon,

Not clear here what you are trying to achieve?

If you just want to call the JumpToRelativeTime()  script, then in your
own script, just use:
PerformScript JumpToRelativeTime()

If you want to pass a value to that input box, and press enter, then the
easiest way might be, just to copy the relevant parts of the
JumpToRelativeTime   script into your script, and assign the value
directly to the variable, sRelative.

I e. use the basic code from JumpToRelativeTime, instead of calling it.

Regards,
Paul from Australia

-----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jonathan Milam
Hi All,


Is it not possible to invoke keystrokes in a script from within another
script in the same file?  Using winamp.jss as the example, I am attempting
to call the ???????JumpToRelativeTime??????? Winamp script from my own
script I am developing at the bottom of the same file.  I first tried
passing the keystroke that invokes the script using the curley brackets,
typekey, typestring etc, but couldn????????t pass it through successfully
to Winamp.  I then called the script by inserting it into my own script
and this worked well.  Though I am now able to call the script, whenever I
try and pass keystrokes to it, nothing happens.  It????????s like they are
somehow being blocked from passing through.  VFO Support tells me that you
cannot pass keystrokes through to other scripts, but I find this extremely
difficult to believe.  I have tried putting the keystrokes in curley
brackets, using TypeKey, TypeString, etc. but I cannot make it work.  Any
help would be appreciated.



Thanks,
Jonathan


__________???

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

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:Doug.Lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________o?=

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

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:Doug.Lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________�

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

Other related posts: