AmigaActive (1272/2143)

From:Neil Bothwick
Date:17 May 2000 at 20:10:55
Subject:Re: ArtEffect and loading pictures to start with...

Sam Thomas said,

> /* err, script to load a picture into ArtEffect on startup*/
> parse arg pic
> if ~show('P','ArtEffect') then address command 'Run >NIL: Programs:ArtEffect/ArtEffect'
> waitforport ArtEffect
> address 'ArtEffect' 'loadpic' pic

> the script loads ArtEffect up, but it does not insert the picture I selected
> in to it :-( I then tried the script again while ArtEffect was loaded and
> it then loaded the picture up. (so it (the script) works when ArtEffect is
> running)

waitforport is a DOS command, not an ARexx statement. You haven't given
an "address command" statement so waitforport does nothing and the
script immediately tries to load the picture, before ArtEffect is
loaded.

The "address command" in line 3 only applies to that line becuase it's
followed by the command to be sent. Try this:

/* err, script to load a picture into ArtEffect on startup*/
parse arg pic
address command
if ~show('P','ArtEffect') then 'Run >NIL: Programs:ArtEffect/ArtEffect'
'waitforport ArtEffect'
address 'ArtEffect' 'loadpic' pic

Test it from a shell first, only try using it as a filetype action when
you know it works.

Neil



Neil Bothwick - New Media Editor, Amiga Active Magazine
Connected via Wirenet - http://www.wire.net.uk
The UK's first Amiga-only internet access provider


Multitasking?? But I only have one PC!

------------------------------------------------------------------------
Was the salesman clueless? Productopia has the answers.
http://click.egroups.com/1/3019/3/_/468125/_/958590933/
------------------------------------------------------------------------

Quote carefully and read all ADMIN:README mails