home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 18 / 18.iso / w / w252 / 4.ddi / MACROS.CMZ / NOTES.SMM < prev    next >
Encoding:
INI File  |  1991-08-19  |  3.6 KB  |  311 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     ~macro.sty
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     PostScript Printer
  13. [lang]
  14.     1
  15. [desc]
  16.     
  17.     Lotus WPD Marketing
  18.     Beginner
  19.     Exec, ActivateApp
  20.     
  21.     682670492
  22.     13
  23.     677631022
  24.     119
  25.     1
  26.     0
  27.     0
  28.     0
  29.     0
  30.     
  31.     
  32.     
  33.     
  34.     
  35.     
  36.     0
  37. [fopts]
  38.     0
  39.     1
  40.     0
  41.     0
  42. [lnopts]
  43.     2
  44.     Body Text
  45.     1
  46. [docopts]
  47.     5
  48.     2
  49. [l1]
  50.     0
  51. [edoc]
  52. Macro by <+!>Charlie Pappas<-!>
  53.  
  54.  
  55. function execsuite()
  56.  
  57. app = "notes.exe"
  58.  
  59. appname = "Lotus Notes"
  60.  
  61. defdir = "c:\notes"
  62.  
  63. ignorekeyboard(1)
  64.  
  65. declare missouri(xapp)
  66.  
  67. declare getprofile(xappname)
  68.  
  69. declare writeprofile(path, xappname)
  70.  
  71. declare tryit(path, xapp)
  72.  
  73. defstr path;
  74.  
  75.  
  76. if appisrunning(appname)
  77.  
  78.     activateapp(appname)
  79.  
  80.     apprestore(appname)
  81.  
  82.     return 1
  83.  
  84. endif
  85.  
  86. if 0 = doschdir(defdir)
  87.  
  88.     if tryit("", app) <;> 31
  89.  
  90.         return 1
  91.  
  92.     endif
  93.  
  94. endif
  95.  
  96. if tryit(getprofile(appname), app) <;> 31
  97.  
  98.     return 1
  99.  
  100. endif
  101.  
  102. again:
  103.  
  104. if assign(&path, missouri(app)) <<<;> 0
  105.  
  106.     if tryit(path, app) <;> 31
  107.  
  108.         writeprofile(path, appname)
  109.  
  110.     else
  111.  
  112.         goto again
  113.  
  114.     endif
  115.  
  116. endif
  117.  
  118. end function
  119.  
  120.  
  121. function tryit(path, app)
  122.  
  123. doschdir(path)
  124.  
  125. return exec(strcat$(path, app), "")
  126.  
  127. end function
  128.  
  129.  
  130. function writeprofile(path, appname)
  131.  
  132. writeprofilestring("LotusApps", appname, path, "amipro.ini")
  133.  
  134. end function
  135.  
  136.  
  137. function getprofile(appname)
  138.  
  139. return getprofilestring$("LotusApps", appname, "amipro.ini")
  140.  
  141. end function
  142.  
  143.  
  144. function missouri(app)
  145.  
  146. defstr box;
  147.  
  148. filledit(9001, "*.exe")
  149.  
  150. filledit(8007, app)
  151.  
  152. if assign(&box, dialogbox(".", "findapp")) <<<;> 1
  153.  
  154.     return 0
  155.  
  156. endif
  157.  
  158. return getcurrentdir$()
  159.  
  160. end function
  161.  
  162.  
  163.  
  164. DIALOG findapp
  165.  
  166. -2134376448 7 70 35 200 97 "" "" "Find Application"
  167.  
  168. FONT 8 "Helv"
  169.  
  170. 7 34 59 8 1000 1342177280 "static" "&Program path:" 0 
  171.  
  172. 6 45 60 44 9001 1352728579 "listbox" "" 0 
  173.  
  174. 155 5 40 14 1 1342373889 "button" "OK" 0 
  175.  
  176. 155 21 40 14 2 1342373888 "button" "Cancel" 0 
  177.  
  178. 68 34 80 8 7999 1342177280 "static" "" 0 
  179.  
  180. 7 6 142 9 1006 1342177280 "static" "Change into the directory that contains" 0 
  181.  
  182. 7 16 107 8 8007 1342177280 "static" "" 0 
  183.  
  184. END DIALOG
  185.  
  186. >
  187.  
  188. [Embedded]
  189. 00002146
  190. >
  191. [macsum] 6
  192. execsuite 0 0 5 2
  193. tryit 522 2 1 36
  194. writeprofile 603 2 1 41
  195. getprofile 676 1 1 45
  196. missouri 752 1 2 49
  197. findapp 909 0 -1 60
  198. [macse]
  199. 14 execsuite
  200. 7 "notes.exe"
  201. 8 1
  202. 7 "Lotus Notes"
  203. 8 2
  204. 7 "c:\notes"
  205. 8 3
  206. 0 32 1
  207. 0 1032 "{2}"
  208. 13
  209. 11 00000152
  210. 0 38 "{2}"
  211. 0 1031 "{2}"
  212. 5 1
  213. 15
  214. 9
  215. 5 0
  216. 0 781 "{3}"
  217. 13
  218. 18 0
  219. 11 00000253
  220. 16 tryit "" "{1}"
  221. 13
  222. 5 31
  223. 18 3
  224. 11 00000253
  225. 5 1
  226. 15
  227. 9
  228. 16 getprofile "{2}"
  229. 13
  230. 16 tryit [X] "{1}"
  231. 13
  232. 5 31
  233. 18 3
  234. 11 00000339
  235. 5 1
  236. 15
  237. 9
  238. 16 missouri "{1}"
  239. 13
  240. 0 805 &4 [X]
  241. 13
  242. 5 0
  243. 18 1
  244. 11 00000510
  245. 16 tryit "{4}" "{1}"
  246. 13
  247. 5 31
  248. 18 3
  249. 11 00000497
  250. 16 writeprofile "{4}" "{2}"
  251. 10 00000510
  252. 10 00000339
  253. 6 0
  254. 15
  255. 9
  256. 14 tryit
  257. 0 781 "{0}"
  258. 0 16 "{0}" "{1}"
  259. 13
  260. 0 22 [X] ""
  261. 13
  262. 15
  263. 9
  264. 6 2
  265. 15
  266. 9
  267. 14 writeprofile
  268. 0 287 "LotusApps" "{1}" "{0}" "amipro.ini"
  269. 6 2
  270. 15
  271. 9
  272. 14 getprofile
  273. 0 286 "LotusApps" "{0}" "amipro.ini"
  274. 13
  275. 15
  276. 9
  277. 6 1
  278. 15
  279. 9
  280. 14 missouri
  281. 0 31 9001 "*.exe"
  282. 0 31 8007 "{0}"
  283. 0 26 "." "findapp"
  284. 13
  285. 0 805 &2 [X]
  286. 13
  287. 5 1
  288. 18 1
  289. 11 00000127
  290. 5 0
  291. 15
  292. 9
  293. 0 290
  294. 13
  295. 15
  296. 9
  297. 6 1
  298. 15
  299. 9
  300. DIALOG findapp
  301. -2134376448 7 70 35 200 97 "" "" "Find Application" 
  302. FONT 8 "Helv" 
  303. 7 34 59 8 1000 1342177280 "static" "&Program path:" 0 
  304. 6 45 60 44 9001 1352728579 "listbox" "" 0 
  305. 155 5 40 14 1 1342373889 "button" "OK" 0 
  306. 155 21 40 14 2 1342373888 "button" "Cancel" 0 
  307. 68 34 80 8 7999 1342177280 "static" "" 0 
  308. 7 6 142 9 1006 1342177280 "static" "Change into the directory that contains" 0 
  309. 7 16 107 8 8007 1342177280 "static" "" 0 
  310. 00002171
  311.