Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

can one get commandline arguments to a rebol script

 [1/3] from: bry::itnisk::com at: 10-Apr-2002 12:01


Can one have a rebol script with a commandline argument so that one can call it like this rebolargs.r hello="world" if so does anyone have an example

 [2/3] from: anton:lexicon at: 10-Apr-2002 21:37


Doing another script from an already running rebol script:
>> write %arg-test.r {rebol[] system/script/args} >> do/args %arg-test.r "I don't want to argue"
== "I don't want to argue"
>> delete %arg-test.r ; clean up >From Windows 2000 console:
D:\...\Rebol\View\rebol.exe Remind.r "Bin night" "Put bin out" Where the Remind.r script is in the current directory. (You can put the full path to the script if you like) The Remind.r script gets the arguments like this (I recommend this way.) args: any [ system/options/args to-block system/script/args ] You can get the remind.r script here: http://anton.idatam.com.au/rebol/util/remind.r Anton.

 [3/3] from: joel:neely:fedex at: 10-Apr-2002 7:09


Hi, Bryan, Bryan Rasmussen wrote:
> Can one have a rebol script with a commandline argument so > that one can call it like this > > rebolargs.r hello="world" >
Within the running script system/options/args gives you a block of string arguments, and system/script/args gives you a single string with all of the above concatenated. -jn- -- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]