/* ARexx script to automatically launch InterChange Plus and any number of Converters and Tools. Version 1.0 */ parse UPPER arg rest if rest = '?' then do say 'InterChange Launcher' say '' say 'For example, entering:' say '' say '1> ic lw im' say '' say 'starts InterChange Plus and the LightWave and Imagine Converters.' say '' say 'This script assumes the logical assignment "IC_PLUS:" points' say 'to the drawer where you installed InterChange, and that' say 'you have not renamed any programs.' say '' say 'You are free to enter any number of abbreviations on the' say 'command line, in either upper or lower case, from the' say 'following list:' say '' say 'LW LIGHT LightWave IM IMAG Imagine' say 'TS Turbo Silver SC Sculpt 3D' say 'VS VideoScape PAGE PREN PAGErender' say 'IFM InterFont CAD CAD-3D' say 'STAT Statistics ISHAPE ImageMaster ISHAPE' say 'AD ADRAW Aegis Draw PD PDRAW Professional Draw' say 'GRID GridSnap SCA SCALE Scale' say 'PR PointReduce SURF Surface' /* say 'WAVE Wavefront DXF AutoCAD DXF' */ say '' say 'If you enter an unknown abbreviation, this script will ask if you' say 'would like to try again. Enter y or Y and enter another choice.' say '' exit end /* Start the rexxsupport library */ if ~show('L',"rexxsupport.library") then do if ~addlib( 'rexxsupport.library', 0, -30, 0 ) then do say 'rexxsupport.library not available' exit 10 end end /* Be sure they've set the IC_PLUS: logical assignment */ AssignList = ShowList('Assigns') if pos('IC_PLUS',AssignList) == 0 then do say "You must make the assignment IC_PLUS:" say "before you can start InterChange Plus" say "with this startup script." say "" say "Consult your manual for more" say "information." exit 10 end address command /* If InterChange is not running, then we can open this port name. */ if show('P',"InterChangePlus_2.0") = 0 then do 'run >NIL: IC_PLUS:InterChange_Plus' /* Loop until port appears */ do while show('P',"InterChangePlus_2.0") = 0 end end /* Otherwise, do not start InterChange */ /* If the first argument is 'all', then run them all instead */ if rest = 'ALL' then do rest = 'LW IM TS SC VS IFM PAGE CAD AD PD ISH STAT SURF SCALE PR GRID' end do while rest ~= '' parse var rest a rest select /* The three arguments to StartOne() are: the Converter filename path, the Converter's AmigaDOS "Port" name, and any command-line options you'd like to add... */ when (a = 'LW' | a = 'LIGHT') then do call StartOne( 'IC_PLUS:LightWave_Converter', 'ICP_LightWave', 'ORIG PT EDGE' ) end when (a = 'IM' | a = 'IMAG') then do call StartOne( 'IC_PLUS:TS-Imagine_Converter', 'ICP_Imagine', '' ) end when (a = 'TS') then do call StartOne( 'IC_PLUS:TurboSilver_Converter', 'ICP_TurboSilver20', '' ) end when (a = 'SC') then do call StartOne( 'IC_PLUS:Sculpt3D_Converter', 'ICP_Sculpt', '' ) end when (a = 'VS') then do call StartOne( 'IC_PLUS:VideoScape3D_Converter', 'ICP_VideoScape20', 'ORIG PT EDGE' ) end when (a = 'IFM') then do call StartOne( 'IC_PLUS:InterFont_Converter', 'ICP_InterFont', '' ) end when (a = 'PAGE') then do call StartOne( 'IC_PLUS:PAGErender_Converter', 'ICP_PAGErender', '' ) end when (a = 'CAD') then do call StartOne( 'IC_PLUS:CAD-3D_Converter', 'ICP_CAD3D', '' ) end when (a = 'AD' | a = 'ADRAW') then do call StartOne( 'IC_PLUS:AegisDraw_Converter', 'ICP_AegisDraw', '' ) end when (a = 'PD' | a = 'PDRAW') then do call StartOne( 'IC_PLUS:ProDraw_Converter', 'ICP_ProDraw', '' ) end when (a = 'ISH') then do call StartOne( 'IC_PLUS:ISHAPE_Converter', 'ICP_ISHAPE', '' ) end when (a = 'STAT') then do call StartOne( 'IC_PLUS:Statistics_Converter', 'ICP_Statistics', '' ) end when (a = 'SURF') then do call StartOne( 'IC_PLUS:Surface_Converter', 'ICP_Surface', '' ) end when (a = 'SCALE' | a = 'SCA') then do call StartOne( 'IC_PLUS:Scale_Tool', 'ICP_Scale', '' ) end when (a = 'PR') then do call StartOne( 'IC_PLUS:PointReduce_Tool', 'ICP_PointReduce', '' ) end when (a = 'GRID') then do call StartOne( 'IC_PLUS:GridSnap_Tool', 'ICP_GridSnap', '' ) end otherwise do say 'Command' a 'not defined, try again? y/n' pull ans if ans = 'Y' then do say 'New choice?' pull choice rest = choice || rest end end end end exit /* Start a program and wait for a certain port name to appear */ StartOne: /* Three arguments are the program name, the port name, and any command line options you'd like */ parse arg converter, portname, custom /* If this program is already running, then we can open this port name. */ if show( 'P', portname ) = 0 then do 'run >NIL: 'converter custom /* Loop until port appears */ iii = 0 do while show( 'P', portname ) = 0 if iii = 5000 then do say 'Could not start' converter return 0 end iii = iii + 1; end end return 0;