home *** CD-ROM | disk | FTP | other *** search
Wrap
INI File | 1995-01-11 | 18.1 KB | 1,465 lines
[ver] 4 [sty] _macro.sty [files] [charset] 82 ANSI (Windows, IBM CP 1252) [revisions] 0 [prn] Olivetti JP 350 [port] LPT1: [lang] 1 [desc] Install ReferenZing to Tools menu 780690202 29 735410161 420 6 0 0 0 0 1 [fopts] 0 1 0 0 [lnopts] 2 Body Text 1 [docopts] 5 2 [GramStyle] [tag] Body Text 2 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Body Text 0 0 [tag] Body Single 3 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Body Single 0 0 [tag] Bullet 1 5 [fnt] Times New Roman 240 0 49152 [algn] 1 1 288 288 288 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 <*5> 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Bullet 1 0 0 [tag] Number List 6 [fnt] Times New Roman 240 0 49152 [algn] 1 1 360 360 360 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 <*:>. 360 1 1 0 0 0 0 [nfmt] 272 1 2 . , $ Number List 0 0 [tag] Subhead 7 [fnt] Times New Roman 240 0 49155 [algn] 1 1 0 0 0 [spc] 33 273 1 72 72 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 2 0 1 1 0 0 0 0 [nfmt] 272 1 2 . , $ Subhead 0 0 [tag] Title 8 [fnt] Arial 360 0 16385 [algn] 4 1 0 0 0 [spc] 33 446 1 144 72 1 100 [brk] 16 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 1 0 1 1 0 0 0 0 [nfmt] 272 1 2 . , $ Title 0 0 [tag] Header 9 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Header 0 0 [tag] Footer 11 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Footer 0 0 [tag] Bullet 12 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 288 288 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 <*0> 360 1 1 0 0 0 0 [nfmt] 272 1 2 . , $ Bullet 0 0 [lay] Standard 513 [rght] 15840 12240 1 1440 1440 1 1440 1440 0 1 0 1 0 2 1 1440 10800 12 1 720 1 1440 1 2160 1 2880 1 3600 1 4320 1 5040 1 5760 1 6480 1 7200 1 7920 1 8640 [hrght] [lyfrm] 1 11200 0 0 12240 1440 0 1 3 1 0 0 0 0 0 0 0 0 1 [frmlay] 1440 12240 1 1440 72 1 792 1440 0 1 0 1 1 0 1 1440 10800 2 2 4680 3 9360 [txt] > [frght] [lyfrm] 1 13248 0 14400 12240 15840 0 1 3 1 0 0 0 0 0 0 0 0 2 [frmlay] 15840 12240 1 1440 792 1 14472 1440 0 1 0 1 1 0 1 1440 10800 2 2 4680 3 9360 [txt] > [elay] [l1] 0 [pg] 6 19 0 5 512 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 62 0 36 0 0 1 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 99 0 5 512 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 144 0 0 0 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 188 0 16 0 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 216 0 0 1025 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 [edoc] <:#284,9360>Install ReferenZing to Tools menu at startup. <:#284,9360> <:#284,9360>Run this macro file to install ReferenZing to the Ami Pro 3.0 Tools menu. <:#284,9360> <:#284,9360>Choose Tools/Macros/Playback and select INSTALL.SMM <:#284,9360> <:#568,9360>Macros INSTALL.SMM & REFER.SMM are located in the ReferenZing directory, which is normally C:\REFERENZ. <:#284,9360> <:#284,9360>If an error occurs: <:#284,9360> <:#284,9360>Be sure that this file, INSTALL.SMM and REFER.SMM are in the ReferenZing directory. <:#284,9360> <:#568,9360>Check Tools/User Setup/Program load to see if you already have a macro entered and checked. If not, enter the path and name of REFER.SMM. <:#284,9360> <:#284,9360>If there is already an autoload macro assigned, you can edit it and add a call to REFER.SMM. <:#284,9360> <:#852,9360>Below the first line that begins with "FUNCTION," add a line with, "CALL c:\path\REFER.SMM!REFERINS()" replacing "c:\path" with the drive and directory where macro is installed. <:#284,9360> <:p<* >> <:#284,9360><+!>FUNCTION ReferLoad(Cmd)<-!> <:#284,9360>DEFSTR Char; <:#284,9360> <:#568,9360>IF (Decide("Choose Yes to install ReferenZing to the Ami Pro Tools menu or choose No to quit.") = 0) <:#284,9360> EXIT FUNCTION <:#284,9360>ENDIF <:#284,9360> <:#284,9360>Quote = "REFER.SMM" <:#284,9360> <:#284,9360>'Use path of INSTALL macro to find REFER macro <:#284,9360>ReferMac = GetRunningMacroFile$() <:#284,9360>I = LEN(ReferMac) <:#284,9360>WHILE "\" != Assign(&Char, MID$(ReferMac, I, 1)) <:#284,9360> I = I - 1 <:#284,9360>WEND <:#284,9360>ReferMac = Left$(ReferMac, I) <:#284,9360>ReferMac = strcat$(ReferMac, Quote) <:#284,9360>ReferMac = LCASE$(ReferMac) <:#284,9360>'Make sure that the REFER macro exists in the specified path <:#284,9360>IF "" = FindFirst$(ReferMac, 33) 'include read-only and archive flags <:#284,9360> CALL ReferErr("Can't find {ReferMac}.") <:#284,9360> EXIT FUNCTION <:#284,9360>ENDIF <:#284,9360>AutoLoad = GetProfileString$("AmiPro", "automacroload", "amipro.ini") <:#284,9360>'If there isn't currently an auto load macro or it is disabled, assign ours as the auto load macro. <:#284,9360>'If there is already an auto load macro, call it from REFER.SMM. <:#284,9360>IF (AutoLoad = "") <:#284,9360> CALL NewLoad(REFERMac) <:#284,9360>ELSEIF "0" = LEFT$(AutoLoad, 1) <:#284,9360> CALL NewLoad(REFERMac) <:#284,9360>ELSEIF (UCASE$(QUOTE) = UCASE$(RIGHT$(AutoLoad, LEN(QUOTE)))) <:#284,9360> 'CALL REFERErr("{QUOTE} is already the autoload macro") <:#568,9360> CALL NewLoad(REFERMac) ' reinstall anyway, in case path is invalid or macro is old <:#284,9360> EXIT FUNCTION <:#284,9360>ELSE <:#284,9360> AutoLoad = MID$(AutoLoad, 3, LEN(AutoLoad) - 2) <:#284,9360> FuncName = "" 'Filename may be followed by name of function to run <:#284,9360> I = strchr(1, AutoLoad, "!") <:#284,9360> IF (I <;>1) <:#284,9360> FuncName = MID$(AutoLoad, I + 1, LEN(AutoLoad) - I + 1) <:#284,9360> J = strchr(1, FuncName, "(") <:#284,9360> IF (J <;> 0) ' trim parentheses from name <:#284,9360> FuncName = LEFT$(FuncName, J - 1) <:#284,9360> ENDIF <:#284,9360> AutoLoad = LEFT$(AutoLoad, I - 1) <:#284,9360> ENDIF <:#284,9360> CALL ModifyLoad(REFERMac, AutoLoad, FuncName) <:#284,9360>ENDIF <:#284,9360> <:#284,9360><+!>END FUNCTION<-!> <:#284,9360> <:#284,9360> <:#284,9360><+!>FUNCTION REFERErr(string)<-!> <:#284,9360> Message(string) <:#284,9360><+!>END FUNCTION<-!> <:#284,9360> <:#284,9360> <:#284,9360><+!>FUNCTION REFERMSG(string)<-!> <:#284,9360> Message(string) <:#284,9360><+!>END FUNCTION<-!> <:#284,9360> <:#284,9360> <:#284,9360><+!>FUNCTION NewLoad(REFERMac)<-!> <:#284,9360>'Install REFER.SMM as the new Autoload macro <:#284,9360> <:#284,9360>REFERMac = strcat$("1," REFERMac) <:#284,9360>WriteProfileString("AmiPro", "automacroload", REFERMac, "amipro.ini") <:#284,9360>AutoLoad = GetProfileString$("AmiPro", "automacroload", "amipro.ini") <:#284,9360>IF (AutoLoad <<<;> REFERMac) <:#284,9360> REFERErr("Can't install auto-load macro {REFERMac}.") <:#284,9360>ELSE <:#284,9360> Cmd = MID$(REFERMac, 3, LEN(REFERMac)) <:#284,9360> Cmd = strcat$(Cmd, "!REFERINS") <:#284,9360> CALLI {Cmd}() <:#568,9360> REFERMSG("Auto-load macro is now {REFERMac}. ReferenZing has been added to the Tools menu.") <:#284,9360>ENDIF <:#284,9360> <:#284,9360><+!>END FUNCTION<-!> <:#284,9360> <:p<* >> <:#284,9360><+!>FUNCTION ModifyLoad(REFERMac, AutoLoad, FuncName)<-!> <:#284,9360>'Edit existing auto-load macro to invoke ReferenZing macro from it <:#284,9360> <:#284,9360>'Find current AutoLoad macro <:#284,9360>'If no path specified for autoload macro, prepend the Ami macro path to filename <:#284,9360>IF strchr(1, AutoLoad, "\") << 0 <:#284,9360> MacDir = GetMacPath$() <:#284,9360> IF ("\" <<<;> RIGHT$(MacDir, 1)) <:#284,9360> MacDir = strcat$(MacDir, "\") <:#284,9360> ENDIF <:#284,9360> AutoLoad = strcat$(MacDir, AutoLoad) <:#284,9360>ENDIF <:#284,9360>IF FindFirst$(AutoLoad, 33) = "" <:#284,9360> REFERErr("Can't find {AutoLoad} auto-load macro to modify.") <:#284,9360> CALL AskLoad(REFERMac) <:#284,9360> EXIT FUNCTION <:#284,9360>ENDIF <:#284,9360> <:#284,9360>'Check whether AutoLoad macro is already open and close it if so (abandoning changes) <:#284,9360>IF (SelectWindow(AutoLoad)) <:#284,9360> FileChanged(1, 0) <:#284,9360> FileClose() <:#284,9360>ENDIF <:#284,9360> <:#284,9360>'Make sure it is read-write <:#284,9360>ReadOnly = DOSGetFileAttr(AutoLoad) & 1 <:#284,9360>IF ReadOnly <:#284,9360> IF DOSSetFileAttr(AutoLoad, 0) <:#284,9360> REFERERR("Can't change read-only attribute of {AutoLoad}.") <:#284,9360> CALL AskLoad(REFERMac) <:#284,9360> EXIT FUNCTION <:#284,9360> ENDIF <:#284,9360>ENDIF <:#284,9360> <:#284,9360>'Open the file <:#284,9360>IF (FileOpen(AutoLoad, 1, "") <<<;> 1) <:#284,9360> REFERErr("Can't open {AutoLoad}.") <:#284,9360> CALL AskLoad(REFERMac) <:#284,9360> DOSSetFileAttr(AutoLoad, ReadOnly) <:#284,9360> EXIT FUNCTION <:#284,9360>ENDIF <:#284,9360> <:#284,9360>'. . . continued . . . <:#284,9360> <:#284,9360> <:#284,9360><**>'Macro command string = filename + '!' + macro name <:#284,9360>Cmd = strcat$(REFERMac, "!REFERINS") <:#284,9360> <:#284,9360>'Check whether ReferenZing is already installed <:#284,9360>IF (Replace(0, 0, FindFromPage1, Cmd, "") = 1) <:#568,9360> REFERERR("ReferenZing Version 1.0 has already been installed in auto-load macro {AutoLoad}.") <:#284,9360> FileClose() <:#284,9360> DOSSetFileAttr(AutoLoad, ReadOnly) <:#284,9360> EXIT FUNCTION <:#284,9360>ENDIF <:#284,9360> <:#284,9360>'Find end of main or specified function and insert call to ReferenZing <:#284,9360>TYPE("<[>CTRLHome]") ' go to the beginning of the document <:#284,9360>WHILE(TRUE) ' create a loop <:#284,9360> IF (Replace(0, 0, 0, "FUNCTION", "") = 1) <:#284,9360> TYPE("<[>ESC]<[>CTRLLeft]") ' deselect the word <:#284,9360> 'Function must be at start of line, else assume this isn't a real function definition <:#284,9360> IF (GetTextBeforeCursor$() = "") <:#284,9360> IF (FuncName = "") 'If function name unspecified, use first one in file <:#284,9360> BREAK <:#284,9360> ELSE 'Else check for specified function name <:#284,9360> TYPE("<[>CTRLRight]") ' next word is function name <:#284,9360> ThisFunc = LEFT$(CurWord$(), strchr(1, CurWord$(), "(") - 1) <:#284,9360> IF (LCASE$(ThisFunc) = LCASE$(FuncName)) <:#284,9360> BREAK ' this is the auto-load function <:#284,9360> ENDIF <:#284,9360> ENDIF <:#284,9360> ENDIF <:#284,9360> TYPE("<[>End]") ' go to end of line then continue search to prevent endless loop <:#284,9360> ELSE <:#284,9360> REFERERR("Can't find {FuncName} macro function in {AutoLoad}.") <:#284,9360> FileClose() <:#284,9360> CALL AskLoad(REFERMAC) <:#284,9360> DOSSetFileAttr(AutoLoad, ReadOnly) <:#284,9360> EXIT FUNCTION <:#284,9360> ENDIF <:#284,9360>WEND <:#284,9360> <:#284,9360>TYPE("<[>End]<[>Enter]'Add ReferenZing Version 1.0 to the Tools menu.<[>Enter]") <:#284,9360>TYPE("CALL {Cmd}()<[>Enter]") <:#284,9360> <:#284,9360>'Try to save the file <:#284,9360>Messages(Off) <:#284,9360>IF (Save() != 1) <:#284,9360> FileChanged(1, 0) <:#284,9360> FileClose() <:#284,9360> DOSSetFileAttr(AutoLoad, ReadOnly) <:#284,9360> REFERERR("Can't save {AutoLoad}.") <:#284,9360> CALL AskLoad(REFERMAC) <:#284,9360> EXIT FUNCTION <:#284,9360>ENDIF <:#284,9360>Messages(On) <:#568,9360>'If saved successfully, put ReferenZing on Tools menu now and inform user of successful completion <:#284,9360>CALLI {Cmd}() <:#284,9360>REFERMSG("ReferenZing has been added to the Tools menu.") <:#284,9360>FileClose() <:#284,9360>DOSSetFileAttr(AutoLoad, ReadOnly) <:#284,9360> <:#284,9360><+!>END FUNCTION<-!> <:#284,9360> <:#284,9360> <:#284,9360><+!>FUNCTION AskLoad(REFERMAC)<-!> <:#284,9360>'If we couldn't modify the old auto-load macro, ask the user whether to switch to our macro <:#284,9360> <:#284,9360>IF Decide("Choose Yes to install {REFERMAC} as the new auto-load macro or No to quit.") <:#284,9360> CALL NewLoad(REFERMAC) <:#284,9360>ELSE <:#284,9360> REFERERR("ReferenZing Version 1 .0 NOT installed to Tools menu.") <:#284,9360>ENDIF <:#284,9360> <:#284,9360><+!>END FUNCTION<-!> <:#284,9360> > [Embedded] 00014736 > [macsum] 6 ReferLoad 0 1 8 19 REFERErr 1168 1 1 71 REFERMSG 1204 1 1 76 NewLoad 1240 1 3 81 ModifyLoad 1663 3 5 99 AskLoad 3388 1 1 205 [macse] 14 ReferLoad 0 2 "Choose Yes to install ReferenZing to the Ami Pro Tools menu or choose No to quit." 13 5 0 18 0 11 00000143 6 1 15 9 7 "REFER.SMM" 8 3 0 802 13 8 4 0 14 "{4}" 13 8 5 7 "\" 0 15 "{4}" "{5}" 1 13 0 805 &2 [X] 13 18 1 11 00000301 6 5 5 1 3 1 8 5 10 00000200 0 806 "{4}" "{5}" 13 8 4 0 16 "{4}" "{3}" 13 8 4 0 17 "{4}" 13 8 4 7 "" 0 280 "{4}" 33 13 18 0 11 00000465 16 ReferErr "Can't find {4}." 6 1 15 9 0 286 "AmiPro" "automacroload" "amipro.ini" 13 8 6 6 6 7 "" 18 0 11 00000580 16 NewLoad "{4}" 10 00001156 7 "0" 0 806 "{6}" 1 13 18 0 11 00000656 16 NewLoad "{4}" 10 00001156 0 18 "{3}" 13 0 14 "{3}" 13 0 807 "{6}" [X] 13 0 18 [X] 13 18 0 11 00000785 16 NewLoad "{4}" 6 1 15 9 10 00001156 0 14 "{6}" 13 5 2 3 1 0 15 "{6}" 3 [X] 13 8 6 7 "" 8 7 0 13 1 "{6}" "!" 13 8 5 6 5 5 1 18 3 11 00001123 6 5 5 1 3 0 0 14 "{6}" 13 6 5 3 1 5 1 3 0 0 15 "{6}" [X] [X] 13 8 7 0 13 1 "{7}" "(" 13 8 8 6 8 5 0 18 3 11 00001082 6 8 5 1 3 1 0 806 "{7}" [X] 13 8 7 6 5 5 1 3 1 0 806 "{6}" [X] 13 8 6 16 ModifyLoad "{4}" "{6}" "{7}" 6 1 15 9 14 REFERErr 0 3 "{0}" 6 1 15 9 14 REFERMSG 0 3 "{0}" 6 1 15 9 14 NewLoad 0 16 "1," "{0}" 13 8 0 0 287 "AmiPro" "automacroload" "{0}" "amipro.ini" 0 286 "AmiPro" "automacroload" "amipro.ini" 13 8 2 6 2 6 0 18 1 11 00000235 16 REFERErr "Can't install auto-load macro {0}." 10 00000411 0 14 "{0}" 13 0 15 "{0}" 3 [X] 13 8 3 0 16 "{3}" "!REFERINS" 13 8 3 16 "{3}" 16 REFERMSG "Auto-load macro is now {0}. ReferenZing has been added to the Tools menu." 6 1 15 9 14 ModifyLoad 0 13 1 "{1}" "\" 13 5 0 18 5 11 00000174 0 295 13 8 4 7 "\" 0 807 "{4}" 1 13 18 1 11 00000147 0 16 "{4}" "\" 13 8 4 0 16 "{4}" "{1}" 13 8 1 0 280 "{1}" 33 13 7 "" 18 0 11 00000306 16 REFERErr "Can't find {1} auto-load macro to modify." 16 AskLoad "{0}" 6 3 15 9 0 796 "{1}" 13 11 00000355 0 34 1 0 2 147 1 0 775 "{1}" 13 5 1 25 1 8 5 6 5 11 00000524 0 776 "{1}" 0 13 11 00000524 16 REFERERR "Can't change read-only attribute of {1}." 16 AskLoad "{0}" 6 3 15 9 2 102 1 "{1}" 1 "" 13 5 1 18 1 11 00000652 16 REFERErr "Can't open {1}." 16 AskLoad "{0}" 0 776 "{1}" "{5}" 6 3 15 9 0 16 "{0}" "!REFERINS" 13 8 6 2 488 1 0 0 8192 "{6}" "" 13 5 1 18 0 11 00000871 16 REFERERR "ReferenZing Version 1.0 has already been installed in auto-load macro {1}." 2 147 1 0 776 "{1}" "{5}" 6 3 15 9 0 6 "[16420]" 5 1 11 00001373 2 488 1 0 0 0 "FUNCTION" "" 13 5 1 18 0 11 00001249 0 6 "[27][16421]" 0 37 13 7 "" 18 0 11 00001224 6 2 7 "" 18 0 11 00001071 10 00001373 10 00001224 0 6 "[16423]" 0 23 13 0 23 13 0 13 1 [X] "(" 13 5 1 3 1 0 806 [X] [X] 13 8 7 0 17 "{7}" 13 0 17 "{2}" 13 18 0 11 00001224 10 00001373 0 6 "[35]" 10 00001360 16 REFERERR "Can't find {2} macro function in {1}." 2 147 1 16 AskLoad "{0}" 0 776 "{1}" "{5}" 6 3 15 9 10 00000886 0 6 "[35][13]'Add ReferenZing Version 1.0 to the Tools menu.[13]" 0 6 "CALL {6}()[13]" 0 30 0 2 103 1 13 5 1 18 1 11 00001606 0 34 1 0 2 147 1 0 776 "{1}" "{5}" 16 REFERERR "Can't save {1}." 16 AskLoad "{0}" 6 3 15 9 0 30 1 16 "{6}" 16 REFERMSG "ReferenZing has been added to the Tools menu." 2 147 1 0 776 "{1}" "{5}" 6 3 15 9 14 AskLoad 0 2 "Choose Yes to install {0} as the new auto-load macro or No to quit." 13 11 00000135 16 NewLoad "{0}" 10 00000204 16 REFERERR "ReferenZing Version 1 .0 NOT installed to Tools menu." 6 1 15 9 00014761