home *** CD-ROM | disk | FTP | other *** search
- /*Assign KeyMaster to F-Key 1
- by Lyle Milton
- © 1995 OAO Media Inc.*/
-
- parse arg textPATH lwmPATH .
-
- lwmPATH = lwmPATH||"/"
- call CHANGE_FILE()
-
- libadd = addlib("LWModelerARexx.port",0)
- call addlib "rexxsupport.library", 0, -30, 0
- libadd = "LWModelerARexx.port"
- IF POS(libadd , SHOW('L')) = 0 THEN
- IF ~addlib("LWModelerARexx.port",0) THEN BREAK
- ELSE call CHANGE_KEY()
- ELSE call CHANGE_KEY()
-
- if index(upper(lwmPath),Arexx_Examples) = 0 then call CHANGE_SETS()
-
- exit
-
- /*||||||||||||||||||END OF PROGRAM|||||||||||||||||||||||||*/
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- CHANGE_FILE:
-
- call open(md,textPATH,"r")
- i=0
- do while ~EOF(md)
- i = i + 1
- line.i = ReadLn(md)
- end
- call close(md)
-
- address command,
- "copy "||textPATH||" to "||textPATH||"-B4MacroForm"
-
- call open(kc,textPATH,"w")
- do n = 1 to i
- if index(upper(line.n),KeyMacroF1) ~= 0 & index(upper(line.n),KeyMacroF10) = 0 then
- call WriteLn(kc,"KeyMacroF1 "||lwmPATH||"OAO--KeyMaster.lwm")
- else call Writeln(kc,line.n)
- end
- call close(kc)
-
- return
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- CHANGE_KEY:
-
- call RXFUN_SET(1,lwmPATH||"OAO--KeyMaster.lwm")
- call notify(1,!"KeyMaster has successfully been assigned to F-Key 1.",
- ,@"Return to Workbench to complete the installation.")
-
- return
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- CHANGE_SETS:
-
- call open(cset,"Toaster:MacroForm/FKey_Sets/MacroForm","w")
-
- call writeln(cset,lwmPATH||"OAO--KeyMaster.lwm")
- call writeln(cset,lwmPATH||"OAO--Align_&_Center.lwm")
- call writeln(cset,lwmPATH||"OAO--Dimensions.lwm")
- call writeln(cset,lwmPATH||"OAO--Distance_&_Angles.lwm")
- call writeln(cset,lwmPATH||"OAO--Slice_&_Dice.lwm")
- call writeln(cset,lwmPATH||"OAO--NewBox.lwm")
- call writeln(cset,lwmPATH||"OAO--RailToolz.lwm")
- call writeln(cset,lwmPATH||"OAO--Apply.lwm")
- call writeln(cset,lwmPATH||"OAO--Reset.lwm")
- call writeln(cset,"(none)")
-
- all open(close)
-
- return
-
-
-