home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************/
- /* ClassX Amiga Rexx script - Copyright © 1997 ClassX Development */
- /******************************************************************/
-
- /*
- $VER: UpdateProjects.rexx 3.0
- */
-
- /*
- #ITA "Aggiorna Progetti"
- #INF "- Descrizione:"
- #INF " La macro esegue una scansione della directory 'FontMachine:Projects'"
- #INF " convertendo i vecchi progetti realizzati con FontMachine v1.xx"
- #INF " nel formato utilizzato dalla v2.xx e successive versioni."
- #INF "- Uso:"
- #INF " La conversione è completamente automatica e non richiede"
- #INF " alcuna interazione con l'utente."
- #END
- */
-
- /*
- #ENG "Update Projects"
- #INF "- Description:"
- #INF " The macro scans the 'FontMachine:Projects' and converts the"
- #INF " old FontMachine v1.xx projects into the format used by v2.xx"
- #INF " and following versions."
- #INF "- Usage:"
- #INF " The conversion is completely automatic and doesn't need any"
- #INF " user input."
- #END
- */
-
- MYPORT = 'FontMachine'
-
- IF ~SHOW('P', MYPORT) THEN DO
- IF EXISTS('FontMachine:FontMachine') THEN DO
- ADDRESS COMMAND 'Run >NIL: FontMachine:FontMachine'
- DO 30 WHILE ~SHOW('P',MYPORT)
- ADDRESS COMMAND 'Wait >NIL: 1 SEC'
- END
- END
- ELSE DO
- SAY "FontMachine could not be loaded."
- EXIT 10
- END
- END
-
- IF ~SHOW('P', MYPORT) THEN DO
- SAY 'FontMachine Rexx port could not be opened.'
- EXIT 10
- END
-
- ADDRESS VALUE MYPORT
- OPTIONS RESULTS
- OPTIONS FAILAT 10000
-
- /* Make sure rexxsupport library is opened */
- IF ~SHOW('L','rexxsupport.library') THEN CALL ADDLIB('rexxsupport.library',0,-30)
-
- SIGNAL ON Break_C
- SIGNAL ON Break_D
-
- /******************************************************************/
-
- LockGui
-
- /* set relevant paths for projects and temp files */
- PrjDir = 'FontMachine:Project/'
-
- /* scan the projects dir */
- Files = SHOWDIR(PrjDir,'f',"|")
- fLength = LENGTH(Files)
-
- nList=0
- do while fLength>0
- cLength=pos('|',Files)
- if cLength=0 then do
- cLength=FLength+1
- fLength=0
- end
- cFile = left(Files,cLength-1)
- pFile = PrjDir||cFile
-
- /* Check for valid v1.xx projects */
- IF OPEN('in',pFile,'R') then do
- IF (READLN('in')='#FONTMACHINE 1') then do
-
- /* Ok, go on with the project */
- FreeFont
- FreeTexture Front
- FreeTexture Border
- LoadProject pFile
- IF RC=0 THEN SaveProject pFile
- ELSE Request '"ARexx Error"' '"'FM_ERROR'"' 'Ok'
-
- END
- CLOSE('in')
- END
-
- /* next project */
- if FLength~=0 then Files=right(Files,fLength-cLength)
- fLength=fLength-cLength
- END
-
- Request '"ARexx Message"' '"End"' 'Ok'
-
- UnLockGui
- EXIT
-
- /******************************************************************/
-
- WaitRender: PROCEDURE
- /* wait the rendering of the font */
- DO FOREVER
- CheckRedraw
- if FM_RESULT ~= 0 then ADDRESS COMMAND 'Wait >NIL: 1 SEC'
- else LEAVE
- END
- RETURN
-
- /******************************************************************/
-
- /* break handlers */
- Break_C:
- Break_D:
- UnLockGui
- Request '"FontMachine"' '"Procedure Stopped"' 'Ok'
- RETURN
-
- /******************************************************************/
-