Important: The information in this document is obsolete and should not be used for new development.
Executing Scripts
MacApp provides theTExecuteScriptCommandclass to execute a script. You initialize a command object of this type by calling theIExecuteScriptCommandmethod. You pass anOSAIDvalue specifying the script to be executed, anOSAIDvalue specifying the script context, and aComponentInstancevalue specifying the scripting component, along with standard command information such as the context and command number.The
DoItmethod of theTExecuteScriptCommandobject executes the script that was specified in theIExecuteScriptCommandmethod. For sample code that demonstrates how to execute a script withTExecuteScriptCommand, see theTMenuBehaviorclass in the DemoText sample application distributed with MacApp.