home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 20
/
AACD20.BIN
/
AACD
/
Graphics
/
PerfectPaint
/
rexx
/
general
/
SaveGif_Brush.rx
< prev
next >
Wrap
Text File
|
2000-04-09
|
2KB
|
131 lines
/* arexx Script
SAVE Brush in gif format
need 'tapgif' in PerfectPaint:tools/
*/
options results
parse ARG Port b
ADDRESS value Port
pp_AvoidRefresh
file=""
file2=""
option=0
if EXISTS('PerfectPaint:Prefs/Rexx_Prefs/SaveGif_Brush') THEN DO
IF OPEN('lfile','PerfectPaint:Prefs/Rexx_Prefs/SaveGif_Brush', "R") then DO
file = READLN('lfile')
option=READLN('lfile')
CALL CLOSE('lfile')
file2=""
do i=1 to LENGTH(file)
a=SUBSTR(file,i,1)
if a=" " then DO
a="*"
END
file2=file2||a
END
file=file2
END
END
pp_showscreen
pp_GetDepth
D=result
IF D=24 then DO
pp_RenderReq 1
END
pp_DialogInit 250 90 "*Save*Gif*Brush*" 3
pp_String 0 50 12 150 16 "Name" 1 100 file
n=LASTPOS('/',file)
if n=0 then DO
n=LASTPOS(':',file)
file=SUBSTR(file,1,n)
END
else DO
file=SUBSTR(file,1,n)
END
pp_Getfile 1 205 13 0 "Save*Gif" 0 file
pp_Cycle 2 100 32 100 16 "Transparency" 1 "No|Color*0|Current*Bg" option
pp_Dialog
rc=result
if rc=0 then
do
pp_PermitRefresh
EXIT
end
pp_GetDialog 0
file=result
pp_GetDialog 2
option=result
CALL SavePrefs('SaveGif_Brush',file,option)
ADDRESS value Port
if option=2 then
DO
pp_GetBpen
Bpen=result
END
if option=1 then
DO
Bpen=0
END
IF D=24 then DO
pp_Render 1 'ram:t/pptemp'
END
IF D<24 THEN DO
pp_Bsave 'ram:t/pptemp' 0
END
pp_asay 'Making*GIF*file|Please*wait*...'
address COMMAND
if option=0 then
DO
'perfectpaint:tools/tapgif '||'ram:t/pptemp '||'"'||file||'"'
END
ELSE
DO
'perfectpaint:tools/tapgif '||'ram:t/pptemp '||'"'||file||'"'||' TRAN '||Bpen
END
'delete >nil: ram:t/pptemp'
ADDRESS value Port
pp_closeasay
EXIT
SavePrefs: PROCEDURE
Prefname='PerfectPaint:Prefs/Rexx_Prefs/'||ARG(1)
if EXISTS(Prefname) THEN DO
ADDRESS COMMAND
'delete >nil: '||Prefname
END
IF OPEN('pfile',PrefName,'W') THEN DO
do i=2 to ARG()
CALL WRITELN('pfile',ARG(i))
end
CALL CLOSE('pfile')
RETURN