PDA

View Full Version : Command Line in runtime?


Josué Alba
03-31-2005, 11:36 AM
Hi how can I send linecommand to an Ams Ap in runtime?

Is there a way can someone send me the basic code please?

Derek
03-31-2005, 11:48 AM
You mean from another AMS application?

Here's how you can pass command line arguments from one AMS.exe to another:

Using the built in global variable _CommandLineArgs, you can then retrieve the args in the second AMS.exe. This allows you to pass any argument to the second exe file.

In the following example, passing a 'page number' as an arg - ie:

In AMS_1.exe use the following Action to run AMS_2.exe
File.Run("AutoPlay\\Docs\\autorun.exe", "Page3", "", SW_SHOWNORMAL, false);

In AMS_2.exe you can use these Actions to make a page jump to "page 3"
Page.Jump(_CommandLineArgs[1]);

Of course, this can be adapted to suit.