Windows command line

Ken Ray kray at sonsothunder.com
Mon Jan 17 12:54:15 EST 2005


On 1/17/05 10:05 AM, "Frédéric RINALDI" <frederic at runrev.com> wrote:

> Does anybody know how to allow a RRev application to be lauched (and
> some paremeter passed)
> from a command line in Windows?

>From Tip File0004 at
http://www.sonsothunder.com/devres/revolution/revolution.htm?_file004
-----------------
When you launch an MC/Rev app, any command line information is sent to the
application and is retrievable via *environment  variables* numbered $0 on
up. The $0 variable will always contain the path  to the application you
just launched, and the $1 will contain the first  command-line parameter
passed ($2 will be the second, etc.).

 So some simple code for this is:

on openStack
  put $0 into theAppPath
  put $1 into theDocToOpen
  answer "The doc to open is: " & theDocToOpen
end openStack
-----------------

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list