SUI_AddFormCommand Table of Contents || Prev | Next || [?]

 
SUI_AddFormCommand (formType; command; refcon{; methodName})
 
ParameterTypeDescription
formTypeLongint0 = output; 1 = input; 2 = dialog
commandTextPhrase to listen for to trigger the form command
refconLongintReference constant to assign to the form command
methodNameStringName of the project method to execute
 
Description

SUI_AddFormCommand adds phrases to listen for while in a form to run associated code.
Embedded language models are supported, which are references to string arrays. You can also make words optional by using parantheses.

Example

While in an output form for [Orders], you wish to allow the user to speak certain phrases totrigger hard-coded queries.

If (Form event = On Load)
  SUI_AddFormCommand (0;"(Please) show recent orders";0;"ShowRecentOrders")
End If

This example shows how you can specify a project method to be called as soon as the phrase passed as $1 is spoken.

Note: If you pass a 4D method name in $4, you can still specify a refcon ($3) for your use, but only values 0-99.