home *** CD-ROM | disk | FTP | other *** search
- /* CMD: Add Macro
- * Add Macro file to list
- */
-
- call addlib "LWModelerARexx.port", 0
- signal on error
- signal on syntax
- fullfile=getfilename("-- Add Macro --","Toaster:Arexx_Examples/lwm" )
- say fullfile
- if(fullfile~="(none)") then do
- txt = left(fullfile, length(fullfile) - 4)
- if (open(fil, fullfile, 'r')) then do
- ln = readln(fil)
- say ln
- call close fil
- say txt
- do j = 1 to words(ln)
- if (word(ln, j) = 'CMD:') then do
- txt = subword(ln, j + 1)
- say txt
- end
- end j
- end /* Open */
- say call 'rxcmd_add' txt fullfile
- call rxcmd_add txt, fullfile
- end
- call remlib "LWModelerARexx.port"
-
- exit
-
- syntax:
- error:
- t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
- call remlib(mxx)
- exit
-