从Dmis调用外部可执行文件

来自ArcoWiki
Slia讨论 | 贡献2018年6月4日 (一) 12:43的版本 (创建页面,内容为“In order to '''Call An External Executable from Dmis''' the command to be executed is <code>CALL/EXTERN,SYS</code>.<br/> The .EXE can be run with or without…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索

In order to Call An External Executable from Dmis the command to be executed is CALL/EXTERN,SYS.
The .EXE can be run with or without extra arguments.

External Program without argument

$$ This example open notepad, and suspends ARCO execution while Notepad is open

CALL/EXTERN, SYS, 'notepad.exe', WAIT'

External Program with one argument only

$$ This example open the c:\TEST.TXT file with notepad, and suspends ARCO execution while notepad is open

CALL/EXTERN, SYS, 'notepad.exe', WAIT, 'C:\TEST.TXT'

External Program with more arguments

$$ This example presents a .exe file with more argument, and runs independently from ARCO

CALL/EXTERN,SYS, 'exename.exe', CONT, 'arg1', 'arg2'

Parameters

The WAIT parameter SUSPENDS during the external program execution.
With WAIT parameter the External Program SUSPENDS ARCO until the execution is over

The CONT parameter DOESN'T SUSPENDS during the external program execution.
With CONT parameter the External Program runs independently.

Use of Blanks in File Name

If blanks are present in the file path, it is necessary to enclose the entire path between inverted commas.

$$Example of white characters in the path

CALL/EXTERN, SYS, '" D:\Visual Studio 2010\exename.exe"', WAIT, '" D:\Visual Studio 2010\arg1.txt"', '" D:\Visual Studio 2010\arg2.txt"'