AREXX Script for ADPro
9 messages in this thread
Hope this isn't a FAQ, but does anyone know of an AREXX script that would
completely automate the process of converting a group of IFFs to GIFs?
— Geary
ps. Have ADPro 2.0 and AREXX
I could probably whip a script together to do the Conversions of the GIF's
to IFF24's relatively quickly BUT you'd need to change the filenames to
pic.0001, pic.0002 etc. in fact you could probably modify one of my Script
like the Pencil Test Script to do it relatively easily.
Never tried to batch process a whole directory of images without
changing the names to a standard header with a numeric extension. IF I
have time I'll try to whip one together but time is always in short
supply
FRED is perfect for removing any file name requirements. In FRED you create a
referential style movie or sequence file. This file contains the names of all
the images you wish to string together (in a specific order). The list is built
by file requester navigating and FRED itself allows reordering via a standard
cut and paste paradigm.
Guess I'll have to take a look at the new FRED, I haven't used it since
getting my A3000 and always HATED using FRED on my Anemic 500 with 2 megs
as it seemed to Devour RAM. Now that I have 14 megs 2 of which are Chip
ram I guess I won;t have this problem.
It would be fairly easy to do such a script if you were using a fixed output…
resolution. I assume the input IFFs would also be a fixed size. I'll think
on… it for a day or so and get back to you.
Geary,
The following script is a little rough around the edges, but it does work.
/* iffbatch.adpro */
/* Converts a directory of IFF images to GIF format without intervention. GIF
image sizes will be same as IFF size.
This file was designed to be invoked by the RX command on a CLI/Shell
line. */
/* Requires REXXARPLIB.library, available in AmigaTech. */
/* Std. startup. */
if ~show('l','rexxsupport.library') then call
addlib('rexxsupport.library',0,-30,0)
if ~show('l','rexxarplib.library') then call
addlib('rexxarplib.library',0,-30,0)
options results
x = 1
homedir = getfile(0.0)
if homedir = '' then exit
homedir1 = left(homedir, length(homedir)-1)
/* Don't click on a filename, just get into the directory where the files to
be
converted are kept. */
/* Creating the list of files to be converted in RAM */
address command "list >ram:temp" homedir1 "files lformat=%N"
foo = open(inf,'ram:temp')
do until eof(inf)
y = readln(inf)
if eof(inf) then leave
cvtfil.x = y
giffil.x = y||'.GIF'
x = x+1
end
/* Using a slightly modified version of ASDG's example script Locate ADPro to
load find and load ADPro in for use. */
CALL Locate_ADPro
IF RESULT = 1 THEN SAY "ADPro has been found"
ELSE SAY "Could not locate or start ADPro"
/* Moving ADPro to front to watch progress and Setting load and save formats
*/
Address 'ADPro'
ADPro_to_Front
LFORMAT "IFF"
SFORMAT "GIF"
/* The conversion loop */
do i = 1 to x-1
load homedir||cvtfil.i
render_type 256
execute
save homedir||giffil.i "image" "256 Color" xsize "by" ysize "Image"
end
/* Cleanup and Exit */
ADPRO_EXIT
say x-1 'images converted'
exit
Locate_ADPro:
Max_Seconds_To_Load = 60
Flag = 0
LibName = 'rexxsupport.library'
IF POS(LibName , SHOW('Libraries')) = 0 THEN ADDLIB(LibName , 0 , -30 , 0)
IF POS(LibName , SHOW('Libraries')) = 0 THEN RETURN 0
IF STATEF('adpro:') = "" THEN RETURN 0
TIME('R')
DO WHILE (Time('E') < Max_Seconds_To_Load) & (POS('ADPro' , SHOW('Ports')) =
0)
IF Flag = 0 THEN DO
/* Set whatever command line arguments you want. */
ADDRESS COMMAND 'run < nil: > nil: adpro:adpro BEHIND MAXMEM=5000000'
Flag = 1
END
ADDRESS COMMAND 'WAIT 1'
END
IF POS('ADPro' , SHOW('Ports')) = 0 THEN RETURN 0
ELSE RETURN 1
Which version of ADPro 2.0? Later versions include automatic tools to do this.
And, the ADPro 2.3 upgrade contains automatic tools to do just about anything
to anything.
It's version 2.1.0; I tried to find a script on the Program & Patch disks, but
didn't see anything that fit the bill. I'm fairly new to the Amiga platform
though, so I might have passed over what I needed.
— Geary