View Full Version : passing arguments in launch demo action

07-29-2004, 12:58 AM

I have a demo that launches several otherd demos, which are virtually the same bur each one needs to do a slightly different action. The launched demos are identical, except that each one is in a different language, and I wouldn't like to avoid "hard coding" the different action.

I would rather like that the initial demo pass an argument to each of the demos it launches, which will specify the action.

How can I pass an argument in a launch demo action? Or perhaps I can use some kind of global variable, that I can set in the initial demo and the launched demo would be able to read?



08-13-2004, 10:48 AM
If you launch the demos using a "Launch Application" action rather than a "Launch Demo" action, you can send current settings from global variables as part of the application command line.

For example, I use the following settings:

Application Name: <path>demo32.exe<path>
(launches Demo32.exe in directory Demo32 is currently running in)

Set current working directory: No

Application Command Line: -vs1<Global.String1(Global)>
-vs2<Global.String2(Global)> <path>newdemo.dbd<path>

Wait for the application to end? No

Message to display if application not found: None

By using -vs1<Global.String1(Global)>, I can pass the current value for global string variable 1 to newdemo.dbd, which I'm launching. Likewise, -vs2 sets global string variable 2.

So you'd have a button or other object that the user can click to select a language, for example, and that'd perform two actions:

Set a global variable, and then launch application as described above.

Hope this helps. It works for me, anyway. :)