Getting the command line

Ben Rubinstein benr_mc at cogapp.com
Wed Mar 27 05:12:01 EST 2002


on 26/3/02 8:01 PM, Dar Scott at dsc at swcp.com wrote:

> Can a rev standalone app get the command line?
> 
> I don't mean specify one in shell or "open process", I mean get the
> command line for itself.

Depending whether you want Windows or Unix, follow the mighty dollar...

If Windows, I think you'll find what you want in a set of global variables
$0...$n.

Not sure where you'd find this in the documentation though (I'm not saying
it's not there - just that I couldn't find it looking in reasonable places
to answer this question, and still couldn't find it when I was looking for
the answer that I thought I knew).  I think a reasonable place to look would
be
    Development Guide/The System Environment/How to...


If Unix:

    You can access Unix environment variables by prepending
    the $ character to the environment variable¹s name. For
    example, the following statement gets the contents of
    the LOGNAME environment variable:
        get $LOGNAME

I found this text in About/containers, variables and sources of value; I
think if those are mentioned, it would be reasonable to mention the DOS ones
in the same place.

  Ben Rubinstein               |  Email: benr_mc at cogapp.com
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866





More information about the use-livecode mailing list