Ext.NewTaskWait( appName, arg1, arg2, ... )

Description

Same as Ext.NewTask( appName, arg1, arg2, ... ), but this function call waits until appName exits. While the script is waiting, its execution is frozen. This may cause performance problems for long scripts or scripts that occur repeatedly.

Argument

appName

appName can be any external application. If appName does not contain a path component, it is searched for in the path list given by the optional SBM registry setting "ScriptAppPath." If not found, appName is then searched for in the path list given by the operating system's environment variable "Path." ScriptAppPath conforms to the same syntax as Path. Folder paths are separated by semicolons, environment variables are surrounded by '%' characters, and spaces do not need to be escaped or quoted. Unlike Path, any quotes in ScriptAppPath are interpreted literally as part of the folder name. If appName does not contain a file extension, the system tries .COM, .EXE, .BAT, and then .CMD. Ext.NewTask() cannot execute any .BAT file whose file name or path contains one or more spaces. Other file types have no such limitation. Arguments following appName are optional. For details on using ScriptAppPath, refer to Setting Script Application Paths.

Return Values

Returns the application's exit code. For details about exit codes, refer to Ext.CmdLineWait( cmdLine ).

Related Topics