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

DO/ARGS problem

 [1/3] from: gchillemi:aliceposta:it at: 12-Dec-2007 17:19


Hello, I have two scripts, the first one starts the second after his end. I read the arguments with the following approach on both scripts: args: any [ system/options/args to-block system/script/args ] Lets do an example: First script: first_script.r Rebol [] args: any [ system/options/args to-block system/script/args ] print ["Script name: " first args] args: copy [] do/args %second_script.r ["Second Script"] --------- Second script: second_script.r Rebol [] args: any [ system/options/args to-block system/script/args ] print ["Script name: " first args] -------- Execute the first script with rebol.exe c:/First_script.r "First Script" The output should be First Script Second Script Instead it is First Script First Script The argumens for the second script are those of first script I have checked and: probe system/options/args returns the values of the first one probe system/script/args returns the value of the second As the second script could be executed either alone or started from the first one, how could I change the argument approach ? Giuseppe Chillemi

 [2/3] from: gchillemi::aliceposta::it at: 12-Dec-2007 17:26

Forgot to say


I am using version 2.7.5 Giuseppe Chillemi

 [3/3] from: anton::wilddsl::net::au at: 13-Dec-2007 13:16

Re: DO/ARGS problem


Hi Giuseppe, Giuseppe Chillemi wrote:
> The argumens for the second script are those of first script > I have checked and:
<<quoted lines omitted: 3>>
> first one, how could I change the argument approach ? > Giuseppe Chillemi
Maybe system/script/parent/args can help you here. You can check system/script/parent to see if the script was started by another one. Anton.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted