Exec
Definition:
Exec(command, params)
Description:
Execute a command with parameters.
Platforms:
All
Parameters:
command - required
String containing the command to run, including full path.
params - required
String containing the parameters to be passed to the command.
Returns:
nothing
Notes:
This Method will run the specified executable with the parameters specified in the params parameter. The command runs in a separate window and the Method returns immediately.
Note the following for different Platforms:
On Android devices the command parameter is expected to be an Android compatible URI (Uniform Resource Identifier) and the second parameter will usually be blank, e.g.:
Exec("file://mnt/sdcard/example.pdf","")
will load the file, example.pdf, providing a pdf reader is available on the device.
To load a browser and navigate to a specified web site you can simply include the web site URL as the first parameter, e.g.:
Exec("http://www.google.com","")
and you could run Google Maps using:
Exec("geo:0,0?q=The Avenue, Townsville","")
For some additional Google Application URLs refer to the following web site:
http://developer.android.com/guide/appendix/g-app-intents.html
Note that if you are migrating or copying Scripts from other Platforms to the Android device Platform, existing calls to Internet Explorer, iexplore.exe, will automatically open your Android browser instead. Calls to msedge.exe, however, will not be automatically converted to use the Android browser and would need to be edited within the Script.
On iOS devices the command parameter is expected to be an iOS compatible URL. This will load the default browser and attempt to connect to the specified web page.
If you are migrating or copying Scripts from other Platforms to the iOS Platform, existing calls to Internet Explorer, iexplore.exe, will automatically open your default browser instead. Calls to msedge.exe, however, will not be automatically converted to use the device's default browser and would need to be edited within the Script.
Note that you cannot execute another process directly on iOS as this is prevented by the operating system.
On the Windows Universal Platform, the command parameter must be a URL and the second parameter should be a blank string, "". The URL will be run in the default browser.
On the Windows Desktop Platform you can run any Windows executable file.
For example, you could call:
Exec("C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe", "")
to load an Edge browser window, or under Windows 10 you could display a map, including offline maps, using:
Exec("bingmaps:?where=" & strAddress, "")
or
Exec("bingmaps:?where=" & strLatitude & "," & strLongitude, "")