Skip to main content

Launch-Application

Command Description

Launch an application, and return the PID of the app

Command Prototype

iPID = App.Run(sPath, iWait, iShow)

Parameter Description

ParameterRequiredTypeDefaultDescription
sPathTruepath'''C:\Users'''Application file path
iWaitTrueenum0Waiting mode
iShowTrueenum1The display style after the program is launched (not necessarily valid)

return

iPID,The variable used to save the output of the command.

Demo

/************************************Start Application************ ************************ 
Command prototype:
iPID = App.Run('''C:\Users''', 0, 1)
Input parameters:
sPath--application file path
iWait--waiting mode
iShow--display style after program startup
Outgoing parameters:
iPID--the result of running the command
********************************************************************************/
Dim sPath = '''D:\app\NetEase Youdao Dictionary\Dict\YoudaoDict.exe'''
Dim iWait = 0
Dim iShow = 1
iPID = App.Run(sPath,iWait, iShow)
TracePrint(iPID)