/* Figlet.ged.rexx by Manfred Matzinger ** $VER: Figlet.ged.rexx v2.00 (25.01.96) ** ** Based on Figlet.ged by Troels Walsted Hansen ** ** Modification: Works with Figlet V2.1.1 ** ** To find Figlet V2.1.1 please look at the Amiga Web Directory ** http://www.cucug.org/amiga.html ** ** An ARexx script that asks you for a string and a figlet font, ** and then, using the figlet program, writes whatever string you ** entered, in the font you chose, into the editor. */ /* some user variables. edit to your hearts content */ figletprogpath = "Misc:Figlet/" figletfontpath = "Misc:Figlet/" /* needs GoldED functions */ options results if(substr(address(),1,6) ~= "GOLDED") then do say "This script should only be started from inside GoldED." exit 20 end else gedport = address() /* get string */ address(gedport) REQUEST BODY '"Enter some text:"' BUTTON '"_Ok|_Cancel"' TITLE '"Figlet.ged"' VAR figletstring STRING if(rc ~= 0) then exit /* get fontname */ REQUEST TITLE '"Select figlet font:"' FILE PATH '"'figletfontpath'"' MASK '"#?.flf"' VAR figletfont if(rc ~= 0) then exit lastchar = right(figletfont,3) if(lastchar ~= "flf" | figletfont = "") then exit /* run figlet */ call open(ofh, "T:figlet.fse.temp.file1", W) call writeln(ofh, figletstring) call close(ofh) QUERY RIGHT VAR columnsnumber address command figletprogpath || 'figlet T:figlet.fse.temp.file2 -f ' || delstr(figletfont, lastpos(".",figletfont)) || ' -c -w ' || columnsnumber address(gedport) OPEN NAME '"T:figlet.fse.temp.file2"' FAST INSERT /* cleanup and exit */ if(exists("T:figlet.fse.temp.file1")) then address command 'delete >nil: "T:figlet.fse.temp.file1"' if(exists("T:figlet.fse.temp.file2")) then address command 'delete >nil: "T:figlet.fse.temp.file2"' exit