home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 6
/
AACD06.ISO
/
AACD
/
Graphics
/
SViewIV
/
ARexx-Scripts
/
MetaView.rx
< prev
next >
Wrap
Text File
|
2000-01-19
|
2KB
|
98 lines
/*
$VER: MetaView.rx V9.00 (15.8.99)
© 1997-99 by Andreas R. Kleinert
Load a vector graphics into MetaView, then
save it to ILBM and load it into SViewIV
written in 1997-99 by Andreas R. Kleinert
*/
METAVIEW = 'hd5:MetaView/MetaView' /* Please adjust the path */
/* maybe also the "Bilder:" assign below */
OPTIONS RESULTS
SIGNAL ON FAILURE
SIGNAL ON SYNTAX
/*
** Looking for our start process
*/
SVPORT = 'SViewII.rx'
IF ~SHOW('P',SVPORT) THEN DO
say "Please start SViewIV before!"
EXIT
end
/*
** Create a new Metaview process:
** first look for the already running processes;
** the new port will be the next one
*/
do NUMBER = 0 to 20
if (SHOW(PORTS,"METAVIEW." || NUMBER) = 0) then
leave
end
/*
** Searching for MetaView: 1. our path above,
** 2. path in env:MetaView.path
** or 3. you must have an assign "MetaView:"
*/
if (EXISTS(METAVIEW)=0) then do
if OPEN("MVVAR","env:MetaView.path","Read") then do
METAVIEW = READLN("MVVAR")
end
if (EXISTS(METAVIEW)=0) then do
METAVIEW = "MetaView:MetaView"
end
end
/*
** Enable warnings for WaitForPort
*/
OPTIONS FAILAT 5
ADDRESS COMMAND
"run " || METAVIEW || " NODISPLAY"
MVPORT = "METAVIEW." || NUMBER
"WaitForPort " || MVPORT
/*
** Ignore the other errors
*/
OPTIONS FAILAT 21
/*
** Do all needed things with MetaView (LOAD,SAVE,QUIT...)
*/
ADDRESS VALUE MVPORT
REQUESTFILE "Bilder:"
FILENAME = result
LOAD FILENAME
SAVE "t:mv_sv_import.ilbm" AS ILBM
QUIT
/*
** Import the temporary file in application
*/
ADDRESS VALUE SVPORT
'LOAD=t:mv_sv_import.ilbm'
EXIT
FAILURE:
ADDRESS COMMAND
REQUESTCHOICE "Error" """Can't find" METAVIEW "!""" "OK"
EXIT
SYNTAX:
say "Error on line" SIGL ":" ERRORTEXT(RC) "!"
EXIT