View Full Version : OK, I got one for you guys...
rhosk
03-18-2004, 02:10 PM
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.
CWRIGHT
03-18-2004, 02:52 PM
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
for n, args in _CommandLineArgs do
Dialog.Message("Command Line Args", "Argument number " .. n .. ": " .. args)
end
rhosk
03-18-2004, 03:17 PM
Hmmm, lots to ponder. I'll play and come back, thanks!
rhosk
03-19-2004, 06:14 AM
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?
rhosk
03-19-2004, 02:04 PM
I found a solution, thanks for all the help again. I figured out that batch files are the thing of the past :D
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.