/* Personal Paint Amiga Rexx script - Marko Seppänen (marko.seppanen@wwnet.fi) */ /* $VER: DecreasesAnimColors.pprx 1.000 (9 Nov 1997) */ /** ENG Use this script to reduce colors by one from every animation frame. */ IF ARG(1, EXISTS) THEN PARSE ARG PPPORT ELSE PPPORT = 'PPAINT' IF ~SHOW('P', PPPORT) THEN DO IF EXISTS('PPaint:PPaint') THEN DO ADDRESS COMMAND 'Run >NIL: PPaint:PPaint' DO 30 WHILE ~SHOW('P',PPPORT) ADDRESS COMMAND 'Wait >NIL: 1 SEC' END END ELSE DO SAY "Personal Paint could not be loaded." EXIT 10 END END IF ~SHOW('P', PPPORT) THEN DO SAY 'Personal Paint Rexx port could not be opened' EXIT 10 END ADDRESS VALUE PPPORT OPTIONS RESULTS OPTIONS FAILAT 10000 txt_err_oldclient = 'This script requires a newer version of Personal Paint' Version 'REXX' IF RESULT < 7 THEN DO RequestNotify 'PROMPT "'txt_err_oldclient'"' EXIT 10 END LockGUI GetFrames frames = RESULT IF frames = 0 THEN DO UnlockGUI EXIT END IF frames > 0 THEN DO GetFramePosition savepos = RESULT errcode = 0 SetFramePosition 1 DO fnum = 1 TO frames Get 'COLORS' colorcount=RESULT LessColors colorcount-1 SetFramePosition 'NEXT' END SetFramePosition savepos IF errcode > 0 THEN DO RequestNotify 'PROMPT "'errmess'"' END END UnlockGUI