home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 127
/
af127a.adf
/
PerfectPaint.lzx
/
PerfectPaint
/
rexx
/
general
/
SaveNewIcon.rx
< prev
next >
Wrap
Text File
|
1999-06-17
|
1KB
|
80 lines
/* arexx Script
Save NEwIcon
You need "Inject Brush" from NewIcon V3 Archives in C:
*/
options results
parse ARG Port1 b
ADDRESS value Port1
P=SUBSTR(Port1,15,1)
say P
pp_SetBrush 1
pp_GetWidthB
w1=result
pp_GetHeightB
h1=result
pp_GetDepthB
d1=result
Bname1='ram:t/B.1.'||P
Bname2='ram:t/B.2.'||P
error=1
ADDRESS COMMAND
if (EXISTS(Bname1))&(EXISTS(Bname2)) THEN error=0
ADDRESS value Port1
if error=1 then DO
pp_Warn 'This*script*requires|two*Brushes'
EXIT
END
pp_SetBrush 2
pp_GetWidthB
w2=result
if w1~=w2 THEN DO
pp_Warn 'Brushes*must*have|the*same*width.'
EXIT
END
pp_GetHeightB
h2=result
if h1~=h2 THEN DO
pp_Warn 'Brushes*must*have|the*same*height.'
EXIT
END
pp_GetDepthB
d2=result
if d1~=d2 THEN DO
pp_Warn 'Brushes*must*have|the*same*depth.'
EXIT
END
IF h1>93|w1>93 THEN DO
pp_Warn 'Maximum*icon*size*is|93x93'
EXIT
END
pp_askfile 'Select*a*.info*file'
file=result
IF RIGHT(file,5)~='.info' THEN DO
file=file||'.info'
END
ADDRESS COMMAND
if ~EXISTS(file) THEN DO
'COPY >nil: PerfectPaint:Icons/NI.info '||'"'||file||'"'
END
'C:injectbrush '||' "'||file||'" '||Bname1||' '||Bname2||' FORCE'