SBM AppScript Reference → Programming SBM AppScript → Extension Functions → Ext.NewTaskWait( appName, arg1, arg2, ... )
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.
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.
Returns the application's exit code. For details about exit codes, refer to Ext.CmdLineWait( cmdLine ).
Copyright © 2007–2016 Serena Software, Inc. All rights reserved.