PDA

View Full Version : ShellLounch command variable syntax


krembo99
02-23-2005, 12:03 PM
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 :-)

Jeff_hanna
02-23-2005, 01:24 PM
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()

krembo99
02-23-2005, 01:44 PM
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()

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
02-23-2005, 08:06 PM
myFile = Myfile + "-xxx" + " here i need script varaiable as string " ???

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

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

CGTalk Moderation
02-23-2006, 09:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.