-
Notifications
You must be signed in to change notification settings - Fork 165
system
qiannian edited this page Aug 3, 2023
·
3 revisions
命令
运行可执行文件,可指定模式
long RunApp(app_path,mode)
参数 | 类型 | 描述 |
---|---|---|
app_path | string | 指定的可执行程序全路径 |
mode | int | 取值如下 |
mode
值 | 描述 |
---|---|
0 | 普通模式 |
1 | 加强模式 |
返回值
类型:int
- 0: 失败
- 1: 成功
示例
op.RunApp("c:\\windows\\notepad.exe",0)
运行可执行文件,可指定显示模式
long WinExec(cmdline, cmdshow)
参数 | 类型 | 描述 |
---|---|---|
cmdline | string | 指定的可执行程序全路径 |
cmdshow | int | 取值如下 |
cmdshow
值 | 描述 |
---|---|
0 | 隐藏 |
1 | 用最近的大小和位置显示,激活 |
返回值
类型:int
- 0: 失败
- 1: 成功
示例
op.WinExec("c:\\windows\\notepad.exe",1)
运行命令行并返回结果
string GetCmdStr(cmdline, millseconds)
参数 | 类型 | 描述 |
---|---|---|
cmdline | string | 指定的可执行程序全路径 |
millseconds | int | 等待的时间(毫秒) |
返回值
类型:string
cmd 输出的字符
示例
str = op.GetCmdStr("cmd.exe" 2000)