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.
Professional Software Development Tools
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.
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.
Look into: _CommandLineArgs
Code:for n, args in _CommandLineArgs do Dialog.Message("Command Line Args", "Argument number " .. n .. ": " .. args) end
Hmmm, lots to ponder. I'll play and come back, thanks!
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 topicI 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?
I found a solution, thanks for all the help again. I figured out that batch files are the thing of the past![]()