home *** CD-ROM | disk | FTP | other *** search
Wrap
INI File | 1993-07-16 | 4.9 KB | 316 lines
[ver] 4 [sty] ~default.sty [files] [charset] 82 ANSI (Windows, IBM CP 1252) [revisions] 0 [prn] HP DeskJet Family [port] LPT1: [lang] 1 [desc] Run American Heritage Dictionary from Ami Tools menu 741653912 39 672763988 412 4 0 0 0 0 0 [fopts] 0 1 0 0 [lnopts] 2 Body Text 1 [docopts] 5 2 [GramStyle] [l1] 0 [pg] 4 18 0 6 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 61 0 42 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 69 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 69 0 5 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] <:#288,9360>The first macro, AHD1, installs AHD macros in the Tools Menu. <:#288,9360> <:#288,9360>The second macro, AHD, gets installed in the Tools / American Heritage menu item. <:#288,9360> <:#576,9360>This macro should be installed under Tools/User Setup as the macro to run at program load, or should be called from the current autoload macro. Instalah.smm will do this for you. <:#288,9360> <:#288,9360> <:#288,9360><+!>FUNCTION AHD1()<-!> <:#288,9360> <:#288,9360>M1 = GetRunningMacroFile$() <:#288,9360>M1 = strcat$ (M1, "!AHD") <:#288,9360> <:#288,9360>DeleteMenuItem (1, "Too&ls", "American &Heritage") <:#288,9360>AddMenuItem (1, "Too&ls", "American &Heritage", M1 ) <:#288,9360> <:#288,9360><+!>END FUNCTION<-!> <:#288,9360> <**><:p<* >> <:#288,9360><+!>FUNCTION AHD()<-!> <:#288,9360>DEFINE FindWindow() DLLCall("user,FindWindow,HCC", %1, %2) <:#288,9360>DEFINE WinExec() DLLCall("kernel,WinExec,HCH", %1, %2) <:#288,9360>DEFINE SendMessage() DLLCall("user,SendMessage,JHHHJ", %1, %2, %3, %4) <:#288,9360>DEFINE GetAmiWindow() DLLCall("user,GetActiveWindow,H") <:#288,9360> <:#288,9360>WndTitle = "The American Heritage Dictionary" <:#288,9360>hWnd = FindWindow(0, WndTitle) <:#288,9360>IF (hWnd <;> 0) <:#288,9360> GOTO GetSelection <:#288,9360>ENDIF <:#288,9360> <:#288,9360>AHDir = GetProfileString$("Program", "Path", "ahd3.ini") <:#288,9360>IF (LEN(AHDir) = 0) <:#576,9360> Message("Can't find The American Heritage Dictionary. Path not found in AHD3.INI.") <:#288,9360> EXIT FUNCTION <:#288,9360>ENDIF <:#288,9360>IF(RIGHT$(AHDir, 1) <<<;> "\") <:#288,9360> AHDir = strcat$(AHDir, "\") <:#288,9360>ENDIF <:#288,9360>AHExe = strcat$ (AHDir, "ahd3.exe") <:#288,9360> <:#288,9360>IF (FindFirst$(AHExe, 33) = "") <:#576,9360> Message("Can't find The American Heritage Dictionary. Path in AHD3.INI is incorrect: {AHDir}") <:#288,9360> EXIT FUNCTION <:#288,9360>ENDIF <:#288,9360> <:#288,9360>hAHD = WinExec(AHExe, 1) <:#288,9360>IF (hAHD << 32) <:#288,9360> Message("Can't load The American Heritage Dictionary.") <:#288,9360> EXIT FUNCTION <:#288,9360>ENDIF <:#288,9360> <:#288,9360>hWnd = FindWindow(0, WndTitle) <:#288,9360>IF (hWnd = 0) <:#288,9360> Message("Can't find The American Heritage Dictionary window.") <:#288,9360> EXIT FUNCTION <:#288,9360>ENDIF <:#288,9360> <:#288,9360>GetSelection: <:#288,9360>n = LEN(CurShade$()) <:#288,9360>IF (n <;> 50) ' Limit selection to 50 chars max <:#288,9360> ClipboardWrite(LEFT$(CurShade$(), 50), 0) <:#288,9360>ELSEIF (n <;> 0) <:#288,9360> Copy <:#288,9360>ENDIF <:#288,9360>hAmiWnd = GetAmiWindow() <:#288,9360>lResult = SendMessage(hWnd, 273, 2026, hAmiWnd) <:#288,9360> <:#288,9360><+!>END FUNCTION<-!> <:p<* >> > [Embedded] 00003691 > [macsum] 2 AHD1 0 0 2 7 AHD 149 0 9 18 [macse] 14 AHD1 0 802 13 8 1 0 16 "{1}" "!AHD" 13 8 1 0 520 1 "Too&ls" "American &Heritage" 0 516 1 "Too&ls" "American &Heritage" "{1}" 6 0 15 9 14 AHD 7 "The American Heritage Dictionary" 8 1 0 284 "user,FindWindow,HCC" 0 "{1}" 13 8 2 6 2 5 0 18 3 11 00000139 10 00000849 0 286 "Program" "Path" "ahd3.ini" 13 8 3 0 14 "{3}" 13 5 0 18 0 11 00000316 0 3 "Can't find The American Heritage Dictionary. Path not found in AHD3.INI." 6 0 15 9 0 807 "{3}" 1 13 7 "\" 18 1 11 00000386 0 16 "{3}" "\" 13 8 3 0 16 "{3}" "ahd3.exe" 13 8 4 0 280 "{4}" 33 13 7 "" 18 0 11 00000564 0 3 "Can't find The American Heritage Dictionary. Path in AHD3.INI is incorrect: {3}" 6 0 15 9 0 284 "kernel,WinExec,HCH" "{4}" 1 13 8 5 6 5 5 32 18 5 11 00000703 0 3 "Can't load The American Heritage Dictionary." 6 0 15 9 0 284 "user,FindWindow,HCC" 0 "{1}" 13 8 2 6 2 5 0 18 0 11 00000849 0 3 "Can't find The American Heritage Dictionary window." 6 0 15 9 0 24 13 0 14 [X] 13 8 6 6 6 5 50 18 3 11 00000963 0 24 13 0 806 [X] 50 13 0 1038 [X] 0 10 00001000 6 6 5 0 18 3 11 00001000 24 154 0 284 "user,GetActiveWindow,H" 13 8 7 0 284 "user,SendMessage,JHHHJ" "{2}" 273 2026 "{7}" 13 8 8 6 0 15 9 00003716