Dear Dennis Brown and Group:
Did you all read my script? I'm still not sure what is wrong with it. I
believe I followed your directions to a tee. Unfortunately it wouldn't
compile.
Stacy Smith.
At 02:37 PM 5/27/1999 -0700, you wrote:
>
>ScriptTip#104: Changing Synthesizers Automatically.
>
>Someone asked if there was a means of switching synthesizers when loading a
>specific application. That user wanted to switch from their default
>synthesizer, the Access32 software Dectalk, to the DoubleTalk-LT, whenever
>they enter VOXChat, so as to free up the sound card for that application.
>Here is how to do this, but it can be used in any application, such as
>having Eloquence load whenever going into Microsoft Word, and having it
>switch back to another synthesizer when leaving Word!
>
>It is as simple as adding a line in the AutoStartEvent, and the
>AutoFinishEvent functions. If you recall, when these functions are present
>within a script file, they get called when the associated application gets
>started, and when it is exited, respectively. If they aren't in the script
>file, it is very easy to add them yourself.
>With that in mind, we'll gear these instructions as if you found no
>AutoStartEvent or AutoFinishEvent functions in your script file; if they are
>there, then you can just focus on the instructions for adding the two
>"SetSynth()" statements.
>To get the correct synthesizer KeyName, take a look at your JFW.INI file
>with NotePad, or some other editor. That file is found in the folder JFW is
>installed in.
>
>1) While in the application you want to associate the synthesizer switch
>with, hit Insert+0 to launch the Script Manager with that application's
>script file loaded for editing.
> if there is no script file for this program, the Script Manager will create
>a blank one.
>2) To see if you already have an AutoStartEvent function, hit Control+L to
>bring up the list of scripts/functions in the current script file. It is
>sorted by name, so the "A" should be the first scripts you come to in this
>list. If you have an AutoStartEvent, highlight it and whack Enter. This
>will place you on that script's header line. Hit End and then Enter to
>place yourself on a blank line underneath that header line.
>3) If you don't have an AutoStartEvent, hit Escape and we'll create one.
>a) Hit F2 to get to the first script in this file, (if there are any).
>b) If you land on that script, hit the UpArrow once to get on the line
>above that script. If there are no scripts, then you can just start with
>the next step.
>c) Type in, or cut and paste, the following lines: (Note: if you already
>had an AutoStartEvent, then just add the following SetSynth line below.)
>
>function AutoStartEvent()
>SetSynth("lt") ;Sets DoubleTalk-LT/LiteTalk as synthesizer.
>EndFunction
>
>This tells JFW that whenever this program is launched, the user wants their
>DoubleTalk-LT, or their LiteTalk, to be used as their synthesizer.
>***Important: if you don't have the external synthesizer turned on at this
>point, you'll probably hang the system, requiring a reboot. This is because
>you'll be trying to access a serial device that, (as far as the system is
>concerned), isn't there. This is not a bug in either the synthesizer or
>screen reader, but rather a User Error--and those are the easiest rrors to
>fix!)
>4) Hit Control+S to compile what we have so far. If successful, go to the
>next step.
>5) Hit Control+L again to locate the AutoFinishEvent. If you have one,
>highlight it and hit Enter, then arrow down to a line underneath the
>variable declarations and hit End, then Enter to create a blank line.
>6) If you don't have one, hit Escape to exit the script list and hit
>Control+End to reach the bottom of the file. Hit Enter a couple of times to
>give yourself some room.
>7) Type in, or cut and paste, the following:
>
>function AutoFinishEvent()
>SetSynth("dtsoft") ;Sets synthesizer back to Access32
>EndFunction
>
>8) Compile with Control+S.
>
>Hit Alt+F4 to exit the Script editor and see what response you get when
>loading and unloading this application!
>
>
>
>What it does: This script will load the DoubleTalk-LT, or LiteTalk,
>external synthesizers whenever this application gets focus--whether by
>running initially, or by becoming the active focus with Alt+Tab from another
>window.
>
>
>Hope this helps!
>
>Thanks,
>Dennis Brown, [EMAIL PROTECTED]
>Visit the Blind Programming site at http://www.mindspring.com/~brown99/
>
>
>
>-
>Visit the jfw ml web page: http://jfw.cjb.net
>
>
-
Visit the jfw ml web page: http://jfw.cjb.net