<:#284,9360>Install American Heritage Dictionary to Tools menu at startup.
<:#284,9360>
<:#284,9360><+!>How to Install The American Heritage Dictionary for Ami Pro<-!>
<:#284,9360>
<:#568,9360>You must run this macro file in order to install The American Heritage Dictionary to your Ami Pro Tools menu.
<:#284,9360>
<:#284,9360>Choose Tools/Macros/Playback, then select this file, INSTALAH.SMM, as the macro file to play.
<:#284,9360>
<:#568,9360>This macro file, along with the companion macro file AHD.SMM, are located in The American Heritage Dictionary directory, which is normally C:\AHDW.
<:#284,9360>
<:#284,9360><+!>What This Macro Does<-!>
<:#284,9360>
<:#568,9360>This macro installs AHD.SMM as the macro to automatically run at program load (Tools/User Setup/Program load, or automacroload= in AMIPRO.INI).
<:#284,9360>
<:#568,9360>If you already have a macro set to run at program load, then AHD.SMM will be called from the current auto-load macro.
<:#284,9360>
<:#568,9360><+">Note:<-"> If you are using the Ami autorun (2.0) or _autorun (3.0) macro as your auto-load macro, you may instead wish to edit AUTORUN.CFG (2.0) or AMIAUTO.CFG to add AHD.SMM.
<:#284,9360>If you do so, be sure to copy AHD.SMM to your Ami macros directory.
<:#284,9360>
<:#284,9360><+!>If the Macro Fails<-!>
<:#284,9360>
<:#568,9360>Be sure that this file, INSTALAH.SMM, and AHD.SMM are in The American Heritage Dictionary 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 AHD.SMM.
<:#284,9360>
<:#284,9360>If there is already an autoload macro assigned, you can edit it and add a call to AHD.SMM.
<:#284,9360>
<:#852,9360>Below the first line that begins with "FUNCTION," add a line with, "CALL d:\path\AHD.SMM!AHD1()" replacing "d:\path" with the drive and directory where macro is installed.
<:#284,9360><+!>
<:#284,9360><+!>Versions Supported<-!>
<:#284,9360>
<:#852,9360>The macros for The American Heritage Dictionary support versions 2.0 and 3.0 of Ami Pro. If future versions of Ami Pro use compatible macro syntax, then these macros should work in those versions as well.
<:p<* >>
<:#284,9360><+!>FUNCTION AHDLoad(Cmd)<-!>
<:#284,9360>DEFSTR Char;
<:#284,9360>
<:#568,9360>IF (Decide("Choose Yes to install The American Heritage Dictionary to the Ami Pro Tools menu or choose No to quit.") = 0)
<:#284,9360> EXIT FUNCTION
<:#284,9360>ENDIF
<:#284,9360>
<:#284,9360>Ahd = "AHD.SMM"
<:#284,9360>
<:#284,9360>'Use path of INSTALAH macro to find AHD macro
<:#284,9360>AHMac = GetRunningMacroFile$()
<:#284,9360>I = LEN(AHMac)
<:#284,9360>WHILE "\" != Assign(&Char, MID$(AHMac, I, 1))
<:#284,9360> I = I - 1
<:#284,9360>WEND
<:#284,9360>AHMac = Left$(AHMac, I)
<:#284,9360>AHMac = strcat$(AHMac, Ahd)
<:#284,9360>AHMac = LCASE$(AHMac)
<:#284,9360>'Make sure that the AHD macro exists in the specified path
<:#284,9360>IF "" = FindFirst$(AHMac, 33) 'include read-only and archive flags