home *** CD-ROM | disk | FTP | other *** search
/ The American Heritage Talking Dictionary / AHD361VOICE.bin / windows / ahd.smm < prev    next >
INI File  |  1994-09-14  |  6KB  |  370 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     _default.sty
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     HP DeskJet Family
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [desc]
  18.     Run American Heritage Dictionary from Ami Tools menu
  19.     
  20.     
  21.     
  22.     
  23.     779673227
  24.     43
  25.     672763988
  26.     439
  27.     4
  28.     0
  29.     0
  30.     0
  31.     0
  32.     
  33.     
  34.     
  35.     
  36.     
  37.     
  38.     0
  39. [fopts]
  40.     0
  41.     1
  42.     0
  43.     0
  44. [lnopts]
  45.     2
  46.     Body Text
  47.     1
  48. [docopts]
  49.     5
  50.     2
  51. [GramStyle]
  52.     
  53. [l1]
  54.     0
  55. [pg]
  56.     4
  57.     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
  58.     62 0 5 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
  59.     83 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
  60.     83 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
  61. [edoc]
  62. <:#284,9360>The first macro, AHD1, installs AHD macros in the Tools Menu.
  63.  
  64. <:#284,9360>
  65.  
  66. <:#284,9360>The second macro, AHD, gets installed  in the Tools / American Heritage menu item.
  67.  
  68. <:#284,9360>
  69.  
  70. <:#568,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.
  71.  
  72. <:#284,9360>
  73.  
  74. <:#284,9360>
  75.  
  76. <:#284,9360><+!>FUNCTION AHD1()<-!>
  77.  
  78. <:#284,9360>
  79.  
  80. <:#284,9360>M1 = GetRunningMacroFile$()
  81.  
  82. <:#284,9360>M1 = strcat$ (M1, "!AHD")
  83.  
  84. <:#284,9360>
  85.  
  86. <:#284,9360>DeleteMenuItem (1, "Too&ls", "American &Heritage")
  87.  
  88. <:#284,9360>AddMenuItem (1, "Too&ls", "American &Heritage", M1 )
  89.  
  90. <:#284,9360>
  91.  
  92. <:#284,9360><+!>END FUNCTION<-!>
  93.  
  94. <:#284,9360>
  95.  
  96. <**><:p<* >>
  97.  
  98. <:#284,9360><+!>FUNCTION AHD()<-!>
  99.  
  100. <:#284,9360>DEFINE FindWindow()    DLLCall("user,FindWindow,HCC", %1, %2)
  101.  
  102. <:#284,9360>DEFINE WinExec()    DLLCall("kernel,WinExec,HCH", %1, %2)
  103.  
  104. <:#284,9360>DEFINE SendMessage()    DLLCall("user,SendMessage,JHHHJ", %1, %2, %3, %4)
  105.  
  106. <:#284,9360>DEFINE GetAmiWindow()    DLLCall("user,GetActiveWindow,H")
  107.  
  108. <:#284,9360>DEFINE SetFocus()    DLLCall("user,SetFocus,HH", %1)
  109.  
  110. <:#284,9360>
  111.  
  112. <:#284,9360>
  113.  
  114. <:#284,9360>WndTitle = "The American Heritage Dictionary"
  115.  
  116. <:#284,9360>WndTitle2="The Dictionary of Cultural Literacy"
  117.  
  118. <:#284,9360>WndTitle3="Word of the Day"
  119.  
  120. <:#284,9360>hWnd = FindWindow(0, WndTitle)
  121.  
  122. <:#284,9360>IF (hWnd = 0)
  123.  
  124. <:#284,9360>    hWnd = FindWindow (0, WndTitle2)
  125.  
  126. <:#284,9360>ENDIF 
  127.  
  128. <:#284,9360>IF (hWnd <;> 0)
  129.  
  130. <:#284,9360>    GOTO GetSelection
  131.  
  132. <:#284,9360>ENDIF
  133.  
  134. <:#284,9360>
  135.  
  136. <:#284,9360>AHDir = GetProfileString$("Program", "Path", "ahd3.ini")
  137.  
  138. <:#284,9360>IF (LEN(AHDir) = 0)
  139.  
  140. <:#284,9360>    Message("Can't find The American Heritage Dictionary.  Path not found in AHD3.INI.")
  141.  
  142. <:#284,9360>    EXIT FUNCTION
  143.  
  144. <:#284,9360>ENDIF
  145.  
  146. <:#284,9360>IF(RIGHT$(AHDir, 1) <<<;> "\")
  147.  
  148. <:#284,9360>    AHDir = strcat$(AHDir, "\")
  149.  
  150. <:#284,9360>ENDIF
  151.  
  152. <:#284,9360>AHExe = strcat$ (AHDir, "ahd3.exe")
  153.  
  154. <:#284,9360>
  155.  
  156. <:#284,9360>IF (FindFirst$(AHExe, 33) = "")
  157.  
  158. <:#568,9360>    Message("Can't find The American Heritage Dictionary.  Path in AHD3.INI is incorrect:  {AHDir}")
  159.  
  160. <:#284,9360>    EXIT FUNCTION
  161.  
  162. <:#284,9360>ENDIF
  163.  
  164. <:#284,9360>
  165.  
  166. <:#284,9360>hAHD = WinExec(AHExe, 1)
  167.  
  168. <:#284,9360>IF (hAHD << 32)
  169.  
  170. <:#284,9360>    Message("Can't load The American Heritage Dictionary.")
  171.  
  172. <:#284,9360>    EXIT FUNCTION
  173.  
  174. <:#284,9360>ENDIF
  175.  
  176. <:#284,9360>
  177.  
  178. <:#284,9360>hWnd = FindWindow(0, WndTitle)
  179.  
  180. <:#284,9360>IF (hWnd = 0)
  181.  
  182. <:#284,9360>    hWnd = FindWindow (0, WndTitle2)
  183.  
  184. <:#284,9360>ENDIF
  185.  
  186. <:#284,9360>IF (hWnd = 0)
  187.  
  188. <:#284,9360>    Message("Can't find The American Heritage Dictionary window.")
  189.  
  190. <:#284,9360>    EXIT FUNCTION
  191.  
  192. <:#284,9360>ENDIF
  193.  
  194. <:#284,9360>
  195.  
  196. <:#284,9360>GetSelection:
  197.  
  198. <:#284,9360>n = LEN(CurShade$())
  199.  
  200. <:#284,9360>IF (n <;> 50)    ' Limit selection to 50 chars max
  201.  
  202. <:#284,9360>    ClipboardWrite(LEFT$(CurShade$(), 50), 0)
  203.  
  204. <:#284,9360>ELSEIF (n <;> 0)
  205.  
  206. <:#284,9360>    Copy
  207.  
  208. <:#284,9360>ENDIF
  209.  
  210. <:#284,9360>hAmiWnd = GetAmiWindow()
  211.  
  212. <:#284,9360>lResult = SendMessage(hWnd, 273, 2026, hAmiWnd)
  213.  
  214. hWnd=FindWindow(0, WndTitle3)
  215.  
  216. IF ( hWnd <<<;> 0)
  217.  
  218.     SetFocus(hWnd)
  219.  
  220. ENDIF 
  221.  
  222. <:#284,9360> 
  223.  
  224. <:#284,9360><+!>END FUNCTION<-!>
  225.  
  226. <:p<* >>
  227.  
  228. >
  229.  
  230. [Embedded]
  231. 00004159
  232. >
  233. [macsum] 2
  234. AHD1 0 0 2 7
  235. AHD 149 0 11 18
  236. [macse]
  237. 14 AHD1
  238. 0 802
  239. 13
  240. 8 1
  241. 0 16 "{1}" "!AHD"
  242. 13
  243. 8 1
  244. 0 520 1 "Too&ls" "American &Heritage"
  245. 0 516 1 "Too&ls" "American &Heritage" "{1}"
  246. 6 0
  247. 15
  248. 9
  249. 14 AHD
  250. 7 "The American Heritage Dictionary"
  251. 8 1
  252. 7 "The Dictionary of Cultural Literacy"
  253. 8 2
  254. 7 "Word of the Day"
  255. 8 3
  256. 0 284 "user,FindWindow,HCC" 0 "{1}"
  257. 13
  258. 8 4
  259. 6 4
  260. 5 0
  261. 18 0
  262. 11 00000244
  263. 0 284 "user,FindWindow,HCC" 0 "{2}"
  264. 13
  265. 8 4
  266. 6 4
  267. 5 0
  268. 18 3
  269. 11 00000286
  270. 10 00001071
  271. 0 286 "Program" "Path" "ahd3.ini"
  272. 13
  273. 8 5
  274. 0 14 "{5}"
  275. 13
  276. 5 0
  277. 18 0
  278. 11 00000463
  279. 0 3 "Can't find The American Heritage Dictionary.  Path not found in AHD3.INI."
  280. 6 0
  281. 15
  282. 9
  283. 0 807 "{5}" 1
  284. 13
  285. 7 "\"
  286. 18 1
  287. 11 00000533
  288. 0 16 "{5}" "\"
  289. 13
  290. 8 5
  291. 0 16 "{5}" "ahd3.exe"
  292. 13
  293. 8 6
  294. 0 280 "{6}" 33
  295. 13
  296. 7 ""
  297. 18 0
  298. 11 00000711
  299. 0 3 "Can't find The American Heritage Dictionary.  Path in AHD3.INI is incorrect:  {5}"
  300. 6 0
  301. 15
  302. 9
  303. 0 284 "kernel,WinExec,HCH" "{6}" 1
  304. 13
  305. 8 7
  306. 6 7
  307. 5 32
  308. 18 5
  309. 11 00000850
  310. 0 3 "Can't load The American Heritage Dictionary."
  311. 6 0
  312. 15
  313. 9
  314. 0 284 "user,FindWindow,HCC" 0 "{1}"
  315. 13
  316. 8 4
  317. 6 4
  318. 5 0
  319. 18 0
  320. 11 00000971
  321. 0 284 "user,FindWindow,HCC" 0 "{2}"
  322. 13
  323. 8 4
  324. 6 4
  325. 5 0
  326. 18 0
  327. 11 00001071
  328. 0 3 "Can't find The American Heritage Dictionary window."
  329. 6 0
  330. 15
  331. 9
  332. 0 24
  333. 13
  334. 0 14 [X]
  335. 13
  336. 8 8
  337. 6 8
  338. 5 50
  339. 18 3
  340. 11 00001185
  341. 0 24
  342. 13
  343. 0 806 [X] 50
  344. 13
  345. 0 1038 [X] 0
  346. 10 00001222
  347. 6 8
  348. 5 0
  349. 18 3
  350. 11 00001222
  351. 24 154
  352. 0 284 "user,GetActiveWindow,H"
  353. 13
  354. 8 9
  355. 0 284 "user,SendMessage,JHHHJ" "{4}" 273 2026 "{9}"
  356. 13
  357. 8 10
  358. 0 284 "user,FindWindow,HCC" 0 "{3}"
  359. 13
  360. 8 4
  361. 6 4
  362. 5 0
  363. 18 1
  364. 11 00001433
  365. 0 284 "user,SetFocus,HH" "{4}"
  366. 6 0
  367. 15
  368. 9
  369. 00004184
  370.