Page 1 of 1

Command line Peramitors

Posted: Fri Mar 21, 2008 11:37 pm
by keyless
I want to be able to use command line peramitors to have my program run a certain function when it is started (different from how it normally runs)

I want to be able to use: MyApp.exe -i
and have it run differently then if I used just: MyApp.exe

Is there a way that I can code into the stack script to look for this -i (or however I can have such a peramitor) on open stack?

Posted: Fri Mar 21, 2008 11:54 pm
by Mark
Hi keyless,

That would be something like:

Code: Select all

on preOpenStack
  if $1 is "-i" then
    -- behave differently
  else
    -- behave normally
  end if
end preOpenStack
Best,

Mark

Posted: Sat Mar 22, 2008 7:39 am
by keyless
Awsome, I knew it had to be easy. Very cool, I see I can have multiple arguments too ($2, $3, $4 etc).

Thanks much Mark