Runs an external program.
RUN("filename", wait, showmode, bgtime)
"filename" |
- |
A string, the filename of the program to run. |
||||||||
wait |
- |
Optional. A negative integer specifying the process wait mode:
If wait is not specified, DADiSP does not wait and continues to run concurrently with the executed program. |
||||||||
showmode |
- |
Optional. A positive integer specifying the display mode of the application to run.
If wait is –1, showmode has no effect. |
||||||||
bgtime |
- |
Optional. An integer specifying the background monitor time in milliseconds. If specified, the executing program is queried every bgtime milliseconds to determine if it is still running. Ctrl-Break can be used to terminate monitoring of the task. Defaults to 0, no background task monitoring. |
run("MYPROG")
runs the program "MYPROG" without waiting.
run("dir > tmpfile", -1);viewfile("tmpfile")
runs the dir system command without display and waits until the task has completed, then returns control to DADiSP. The result of the listing is displayed after the command has completed.
run("notepad", 3)
runs Notepad maximized and does not wait until Notepad is finished.
run("notepad", -4, 3)
runs Notepad maximized and waits for Notepad to finish before returning to DADiSP.
RUN can call executable programs written in any language. The only limitation is the amount of system memory available for the external program.
An error message is displayed if the program cannot be executed.
If bgtime is specified, the executing task is queried every bgtime milliseconds to determine the task state. In this case, task monitoring can be terminated by pressing Ctrl-Break.
See SHELLEXECUTE to process a file using a system defined application.
dadisp.cnf (configuration file)