How to execute a script file with arguments
German S. Arduino
garduino at yahoo.com
Tue Jun 4 18:15:26 UTC 2002
--- Lex Spoon <lex at cc.gatech.edu> escribió: >
"=?iso-8859-1?q?German=20S.=20Arduino?="
> <garduino at yahoo.com> wrote:
> > Hello:
> >
> > I know that I can call Squeak, by example as:
> >
> > squeak image script.st arg1 arg2 arg3
> >
> > Supposing that arg1 arg2 and arg3 are receiver,
> > subject and data to build a mail that I want to
> send
> > with SMTPSocket, how I must build de script to
> read
> > these arguments and next send the mail?.
>
> This is actually a FAQ
> (http://minnow.cc.gatech.edu/squeak/425). Here's
> the page, which is admittedly a tad sparse:
>
> ================
> A Squeak script file can be executed as follows.
>
> If you run "Squeak myImage.image script.st arg1 arg2
> arg3", then script.st will be filed in as the image
> starts up.
>
> arg1, arg2, and so on may be accessed with
> SystemDictionary>>getSystemAttribute:. The argument
> to getSystemAttribute: is an integer which
> determines what is returned:
> 0 - Virtual Machine name
> 1 - Image name
> 2 - Script file name
> 3 ... n - additional arguments
>
> See System Attributes for fuller details.
> ================
>
>
> Also, check out the more general page on strategies
> for making Squeak programs that can be run from your
> OS's facilities; there are other ways than script
> files:
>
> http://minnow.cc.gatech.edu/squeak/2269
>
>
> -Lex
>
Thanks Lex, I've bad understood
SystemDictionary>>getSystemAttribute, but now
wit your help and also the help of Diego Gómez Deck,
all is working.
Thanks Again and Best Regards.
---
Germán Arduino.
Cobertura especial de la Copa Mundial de la FIFA Corea-Japón 2002, sólo en Yahoo! Deportes:
http://ar.sports.yahoo.com/fifaworldcup/
More information about the Squeak-dev
mailing list
|