Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695

    OK, I got one for you guys...

    Can you pass a variable or parameter to the executable that AMS makes to (for example ) open a specific page in the project? I haven't a clue, but something like <my.exe /page6> yada yada. Put your thinkin' caps on. Thanks.

  2. #2
    Join Date
    Jun 2002
    Posts
    42
    I have done something similar in one of my projects. Here is a basic example:

    1) First you pass the project page number through the command line:

    myapp.exe 6

    2) Get the command line parameter in the project OnStart:

    page_to = _CommandLineArgs[1];

    3) Build an indexed table of the applications pages/names:

    app_pages = Application.GetPages();

    4) Jump to the page:

    Page.Jump(app_pages[page_to]);


    This is off the top of my head, but should work.

    HTH, CW.

  3. #3
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Look into: _CommandLineArgs
    Code:
    for n, args in _CommandLineArgs do
    	Dialog.Message("Command Line Args", "Argument number " .. n .. ": " .. args)
    end

  4. #4
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Hmmm, lots to ponder. I'll play and come back, thanks!

  5. #5
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    OK, I got this working great. It does work a lot better in the preload of page1 (otherwise, page1 flashes first - just for info).

    This has nothing to do with AMS, but since we're still on the topic I have to run a batch file to execute this (the program I'm using won't accept parameters for some reason - looking for strict association). The only problem I have is a flashing DOS window when executing. I'm using "start" as the windows command which supposedly suppresses the DOS window, but it's still flashing and looks ugly.
    You guys have an idea of how to do this otherwise?

  6. #6
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    I found a solution, thanks for all the help again. I figured out that batch files are the thing of the past

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts