Skip to main content

Open-File-or-URL

Command Description

Open a file or a website URL with system association

Command Prototype

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

Parameter Description

ParameterRequiredTypeDefaultDescription
sPathTruepath'''C:\Users'''The file path or website URL to open
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

/************************************Open file or URL************ ********************* 
Command prototype:
iPID = App.Start('''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 Cloud Music\CloudMusic\cloudmusic.exe'''
Dim iWait = 0
Dim iShow = 1
iPID = App.Start(sPath,iWait, iShow)
TracePrint(iPID)