[comp.sys.amiga] WorkBench argument passing

adam@lamont.Columbia.edu (adam levin) (05/05/88)

I have written an Amiga version of the board game Black Box.
The CLI calling sequence is "AntiMatter [-a atoms] [-s size]"
I want to add the ability to pass arguments from the WorkBench.
If AntiMatter.info has two tooltypes: "ATOMS=4" and "SIZE=8", I can:

(I'm new to the WB startup stuff, and not near my manuals,
 so forgive the simple mistakes.)

1.  Get the program name from the external structure WBenchMsg.
2.  Use that name to GetDiskObject().
3.  Get the toolarray from the diskobject.
4.  Use tooltypes() to get the values of "ATOMS" and "SIZE".  
5.  FreeDiskObject.

Is this reasonable?
The Libs&Devs RKM talks about replying to messages and things like that.
Am I corrupting things by not using a port?  Said RKM also talks about
the argument list associated with the WBenchMsg, but as I understand it,
that's for extended selection of icons, not arguments as in CLI args.
"ATOMS" and "SIZE" aren't really tools, so am I bucking the mainstream
when I use them just to get arguments?

Thanks,  Adam Levin

-- 
Phone:  (914) 359-2900 x434
Post:   Lamont-Doherty Geological Observatory / Palisades, NY 10964
USENET: {ihnp4, decvax, seismo} philabs!lamont!adam
ARPA:   lamont!adam@columbia.edu