Command Line Arguments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ScottDuncan
    Forum Member
    • Oct 2003
    • 116

    Command Line Arguments

    It seems pretty easy to send arguments, i've found plenty of documentation on it, but i'm struggling to understand how to receive the argument in AMS.
    Basically i'd like to send a variable from one .exe to the other.

    For example (something like),

    result = action.getCommandLineArgument
    (i know this isn't an action, it's the idea)

    if result = X then
    page.jump
    end

    If the CommandLine = A then page.jump page 2
    If the CommandLine = B then page.jump page 3
  • Dermot
    Indigo Rose Customer
    • Apr 2004
    • 1791

    #2
    The coomandline arguments are stored in a table called _CommandLineArgs. You can access them like this.

    Arg = _CommandLineArgs[1];

    if Arg == "Page 1" then
    Page.Jump("Page 1");
    elseif Arg == "Page 2" then
    Page.Jump("Page 1");
    elseif Arg == "Page 3" then
    Page.Jump("Page 3");
    end

    If ther is more than one arg you would use _CommandLineArgs[2] to access the second one and so on.

    Dermot
    Dermot

    I am so out of here :yes

    Comment

    • Brett
      Indigo Rose Staff Member
      • Jan 2000
      • 2001

      #3
      Read this article.

      Comment

      • ScottDuncan
        Forum Member
        • Oct 2003
        • 116

        #4
        Thanks for the help

        Comment

        Working...
        X