home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************/
- /* ClassX Amiga Rexx script - Copyright © 1997 ClassX Development */
- /******************************************************************/
-
- /*
- $VER: FM_RXShell.rexx 3.0
- */
-
- /*
- #ITA "Arexx Shell"
- #INF "Apre una shell ARexx per utilizzare i comandi di FontMachine"
- #INF "- Descrizione:"
- #INF " FontMachine possiede una completa interfaccia AREXX per il controllo"
- #INF " dei vari aspetti del programma. Tramite questa macro, viene aperta"
- #INF " una finestra SHELL con cui pilotare FontMachine a basso livello."
- #INF "- Uso:"
- #INF " Dopo aver lanciato la macro, viene aperta una finesta SHELL sullo"
- #INF " schermo di Workbench. Per uscire premere Q+INVIO."
- #END
- */
-
- /*
- #ENG "ARexx Shell"
- #INF "Opens the ARexx command Shell of FontMachine"
- #INF "- Description:"
- #INF " FontMachine provides a complete AREXX interface to enable the"
- #INF " control of the various aspects of the program. This macro opens"
- #INF " a SHELL window where the user can type the FontMachine's low-level"
- #INF " AREXX commands."
- #INF "- Usage:"
- #INF " When the macro is started, a SHELL window appears on the Workbench"
- #INF " screen. To stop the macro and close the SHELL type Q + ENTER."
- #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
-
- /******************************************************************/
-
- open('console', 'CON:0/11/640/200/FontMachine Rexx Shell/SCREEN "FontMachine [0]"', 'RW')
- writeln('console', 'Enter commands, "Q" to exit.')
-
- /* loop until user exits */
- do forever
-
- /* get command string from user */
- writech('console','CMD> ')
- cmd=readln('console')
-
- select
-
- /* time to quit? */
- when (upper(cmd) = "Q") then do
- leave
- end
-
- /* need some help? */
- when (cmd = "?") then do
- writeln('console', 'Enter "Q" to exit.')
- end
-
- /* do nothing on empty lines */
- when (cmd = "") then do
- nop
- end
-
- /* whatsinaline */
- otherwise do
- /* execute the command string */
- cmd
-
- /* if ok show the result, if any */
- if (RC = 0) then do
- if FM_RESULT ~= "" then writeln('console', FM_RESULT)
- end
-
- else do
- writeln('console', 'Error:' FM_ERROR);
- end
- end
- end
- end
-
- exit(0)
-
- /******************************************************************/
-