Paths
Paths is the
name given to the arrows which you see linking the modules in the
Graphical Design Environment. These arrows represent transitions
from one module to another.
Creating new
paths
To create a new
path press the Properties button on the module from which the path
will start, and go to the Paths tab.
Paths are
specified using the format:
On {Trigger} Goto
[Module Title]
You can edit the
Paths directly, or you can use the Add New Path help frame to add
the paths for you.
Timeout
Paths
Apart from paths
taken when the caller presses a key, you can also specify paths
which are taken upon Timeout. The Timeout path will be take
if a caller has not made a selection within the specified number of
seconds. A timeout path with a wait time of zero seconds will be
taken immediately after the last sound file in the module has
finished playing.
Voicemail
system
Paths can direct
the caller to a Voicemail Box, Voicemail Box Menu or Voicemail
Retrieve Menu, eg:
When specifying
the Voicemail Box as the destination, the Voicemail Box number must
be specified as well. make sure that the Voicemail Box specified
exists and has been configured using the Voicemail System Manager
Returning from the Voicemail
system
If you would
like the caller to go to a certain module after returning from the
Voicemail system then you can specify a return module. The Path
definition needs to be:
On {Trigger} Goto
[Voicemail System Module] Return [Module
Title]
The Current
Paths settings will need to be edited by hand to specify such a
path, the Add New Path help frame does not handle the Return
option.
Example if after
Retrieving Voicemail the caller should be sent to the main menu
again, the path will look like this:
If the titles of
the modules are too long to fit on one line, the path description
will wrap around to the following lines. This is OK.
Branching to other scripts and calling
subscrips.
The Enterprise
and Evaluation versions of VoiceGuide can call subscripts.
To branch (goto)
to a script you can specify a path like this:
on {event} goto
[script filename|module name]
eg:
on {1} goto
[c:\scripts\myscript.vgs|PlayWelcome]
To run a subscript (gosub) to a script you can specify a path:
on {event}
gosub [script filename|module name]
eg:
on {1} gosub
[c:\scripts\myscript.vgs|PlayWelcome]
The script name or the module name can be left blank. If the
Script Filename
is left blank then
the current script is assumed, and if the Module Name is left blank then the default starting
module in the script is used.
eg:
on {1} gosub
[|PlayWelcome]
eg:
on {1} gosub
[c:\scripts\myscript.vgs|]
If the
[|module name]
notation is used
the path to the destination module will not be drawn. This
side-effect can be used to visually to de-clutter highly linked
scripts.
If "|" is
omitted from the destination specification then the destination
name is assumed to be just a module in the current script. So for
example this path will not work:
on {1} gosub
[c:\scripts\myscript.vgs]
To specify what
module should be the next module once the subscript returns the
"return" path option should be used. If the "return" path option is
not used when the subscript returns then VoiceGuide will start
running the default start module in the returned to script.
To specify a return module:
on {event}
gosub [script filename|module name] return [return
script filename|return module name]
eg:
on {1} gosub
[c:\scripts\admin.vgs|GetUserPin] return
[c:\TakeOrder.vgs|MainMenu]
note that you can instruct the subscript to return to a different
script. The return script filename can be omitted if you would like
the subscript to return to the same script.
to return from a subscript use a path like this:
on {event} return
eg:
on {4} return
For the programmers reading this:
The gosub paths essentially 'push' the return address onto a stack,
and return path 'pop' these of the stack and direct to VoiceGuide
to execute at the popped script/module. The various
goto/gosub/return paths are briefly demonstrated in the sample
scripts in VoiceGuide's \scripts\more sample scripts\paths directory.
Branching to other scripts and calling subscripts using COM
interface.
Please see the VoiceGuide COM
Reference section in this Help file for information on how the
goto/gosub/return commands can be issued to VoiceGuide from other
external programs or VB Scripts, Java scripts etc.
|