23 January 2009, 05:35 | #1 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Passing arguments to scripts
I was hoping that "script A B C" would pass the arguments into the local $0 $1 $2 etc. but unfortunately it doesn't. Is it possible to do this in a single line somehow without writing a tool for it? I'd be happy to use an existing tool if there is one.
|
23 January 2009, 08:19 | #2 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,856
|
If you mean AmigaDos, then this is how to do it:
Code:
.key opt1,opt2,opt3,opt4 echo <opt1> echo <opt2> echo <opt3> echo <opt4> Code:
.key opt1,opt2,opt3,opt4 .bra { .ket } echo {opt1} echo {opt2} echo {opt3} echo {opt4} Last edited by Thorham; 23 January 2009 at 18:57. |
23 January 2009, 13:44 | #3 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
That's exactly what I was looking for. Thanks Thorham
|
23 January 2009, 18:58 | #4 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,856
|
|
23 January 2009, 20:43 | #5 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,658
|
Oooh I love AmigaDOS scripting!
I need to get back to it, I used to have some mad codes xD |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Invalid workbench arguments | Wasagi | project.WHDLoad | 2 | 22 February 2021 21:16 |
Executable script file/arguments | shrub3056 | support.Apps | 1 | 26 July 2011 18:08 |
AmigaDOS scripts | lloyd | Coders. General | 2 | 22 November 2004 19:47 |
I don't want to be the cause of more arguments, but... | MethodGit | Retrogaming General Discussion | 27 | 08 October 2004 15:45 |
Norwegians passing thru OSLO? PLEASE READ :) | AmiDelf | Amiga scene | 0 | 29 September 2003 15:11 |
|
|