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

  • From: Jonathan Milam <milamj@xxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Fri, 20 May 2016 22:47:22 -0400

THanks, Jonathan.  Actually, I would like to have 1 minute added to
the default value each time the script keystroke is invoked.  I
thought that the INI read and write strings would need to be used,
otherwise whenever the keystroke was pressed, it wouldn't be adding
another minute to the value.  Is that not correct?  Is there another
way of doing it?

Jonathan

Sent from my iPhone

On May 20, 2016, at 4:08 PM, Jonathan Cohn <jon.c.cohn@xxxxxxxxx> wrote:

It appears to me that the INI file is being used as the default increment / 
decrement value for the time. If you are hardcoding a time of 1 minute then 
you won't need this line of code, unless you want to use the default move 
time as your move time in the script.

I expect that there is a .qs / .qsm file to adjust the defaultTime value that 
is set in the INI file.

Best wishes,

Jonathan



On 20 May 2016, at 09:56, Jonathan Milam <milamj@xxxxxxx> wrote:

Thanks, Doug.  I definitely understand where you're coming from and
completely agree.  At the time, I couldn't figure out how to find the
pieces of the code that I would need, so I thought it would just be easier
to call the actual JumpToRelativeTime script and pass keystrokes to it.

However, since then, I have been able to find the code that I need for my
script and am now able to jump by incruments of time.  Now what I would
like to do is to figure out how to create a script to modify the value in
the TimeMarkerFile and add a minute to the current value which is using
mm:ss format.

I am referring to the following lines:
   Let sTime=IniReadString(SettingsSection,
DefaultRelativeTimeKey,cscNull, TimeMarkerFile)
   IniWriteString(SettingsSection, DefaultRelativeTimeKey,sTime,
TimeMarkerFile)

I am using the sTime string to first read the current time in the
TimeMarkerFile.  I then want to somehow let sTime equal an integer that
adds 1 minute to the current time in the TimeMarkerFile.  The script would
write that new value to the TimeMarkerFile whenever the keystroke is
pressed to which the script is attached.  Subsequent presses of the
keystroke would add an additional minute to the current value in the
TimeMarkerFile.

Does this make sense?  Any ideas on it?

Jonathan

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

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
__________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

__________�

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: