Notifications
Clear all

[Closed] ShellLounch command variable syntax

A simple question …
i want the shellLaunch command to send varaiables to the external app. but these variables are not constant (like a file name or such) but will have to be decided by the script itself.
What would be the right syntax for that ?

for example, i will have the script open a file browser dialog, that will that let the user choose a file, and that is the value that the script has to proccess and later pass to an external app…
i hope i made myself clear

3 Replies

Assuming your external app can take a file name as parameter all you have to do is store the file name of the picked file into a string variable and add that variable name to the shellLaunch() command for the optional <parameters string> paramater.

For example if you store your filename in a variable named sFilename and your external app is named “foo.exe” then the shellLaunch() command would be:

shellLaunch “foo.exe” sFilename

If the external app requires input parameters to be delimited with – characters (or other formatting) then you’ll have to add them to sFilename before executing shellLaunch()

2 Replies
(@krembo99)
Joined: 11 months ago

Posts: 0

yes… this is exactly the case, and those parameters, are just the thing i would need to control from the script itself …

so all i have to do is something like myFile = filename() as string

and than

myFile = Myfile + “-xxx” + ” here i need script varaiable as string ” ???

(@jeff_hanna)
Joined: 11 months ago

Posts: 0

Conceptually that looks correct. You can shorten it a bit as:

myFile += (” -xxx ” + <string variable you made in code>)