home *** CD-ROM | disk | FTP | other *** search
/ Program Metropolis - Software Boutique 95 / SOFTWARECD.iso / camipro3 / macros.cmz / NOTES.SMM < prev    next >
Encoding:
INI File  |  1994-08-14  |  5.7 KB  |  349 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     _macro.sty
  5. [files]
  6. [charset]
  7.     82
  8.     CHINESEBIG5 (Windows)
  9. [revisions]
  10.     0
  11. [prn]
  12.     PostScript Printer
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [desc]
  18.     ╕ⁿñJ Lotus Notes
  19.     Lotus WPD Marketing
  20.     Beginner
  21.     Exec, ActivateApp
  22.     NoAutorun
  23.     773104695
  24.     21
  25.     677631022
  26.     125
  27.     2
  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. [ParaNum]
  54.     1
  55. [l1]
  56.     0
  57. [pg]
  58.     2
  59.     49 0 12 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
  60.     76 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
  61. [edoc]
  62. <:#293,9025>Macro by <+!>Charlie Pappas<-!>
  63.  
  64. <:#284,9025>
  65.  
  66. <:#284,9025>function execsuite()
  67.  
  68. <:#284,9025>app = "notes.exe"
  69.  
  70. <:#284,9025>appname = "Lotus Notes"
  71.  
  72. <:#284,9025>defdir = "c:\notes"
  73.  
  74. <:#284,9025>ignorekeyboard(2)
  75.  
  76. <:#284,9025>declare missouri(xapp) ' <:f200,QCourier,0,0,255>declare user defined functions
  77.  
  78. <:#284,9025>declare getprofile(xappname)
  79.  
  80. <:#284,9025>declare writeprofile(path, xappname)
  81.  
  82. <:#284,9025>declare tryit(path, xapp)
  83.  
  84. <:#284,9025>defstr path;
  85.  
  86. <:#284,9025>
  87.  
  88. <:#284,9025>if appisrunning(appname) ' <:f200,QCourier,0,0,255>first see if app is already running
  89.  
  90. <:#284,9025>    activateapp(appname) ' <:f200,QCourier,0,0,255>if the app is running, just activate it
  91.  
  92. <:#284,9025>    apprestore(appname) ' <:f200,QCourier,0,0,255>make sure it is not minimized<:f>
  93.  
  94. <:#284,9025>    return 1
  95.  
  96. <:#284,9025>endif
  97.  
  98. <:#284,9025>if 0 = doschdir(defdir) ' <:f200,QCourier,0,0,255>try and change to the default directory for launch
  99.  
  100. <:#284,9025>    if tryit("", app) <;> 31
  101.  
  102. <:#284,9025>        return 1
  103.  
  104. <:#284,9025>    endif
  105.  
  106. <:#284,9025>endif
  107.  
  108. <:#284,9025>if tryit(getprofile(appname), app) <;> 31 ' <:f200,QCourier,0,0,255>if we launch, get out<:f>
  109.  
  110. <:#284,9025>    return 1
  111.  
  112. <:#284,9025>endif
  113.  
  114. <:#284,9025>again:
  115.  
  116. <:#284,9025>if assign(&path, missouri(app)) <<<;> 0 ' <:f200,QCourier,0,0,255>show me where the exe is
  117.  
  118. <:#284,9025>    if tryit(path, app) <;> 31
  119.  
  120. <:#284,9025>        writeprofile(path, appname)
  121.  
  122. <:#284,9025>    else
  123.  
  124. <:#284,9025>        goto again
  125.  
  126. <:#284,9025>    endif
  127.  
  128. <:#284,9025>endif
  129.  
  130. <:#284,9025>end function
  131.  
  132. <:#284,9025>
  133.  
  134. @Function@<:#293,9025>function tryit(path, app) ' <:f200,QCourier,0,0,255>this function attemts to exec the app
  135.  
  136. <:#284,9025>doschdir(path)
  137.  
  138. <:#284,9025>return exec(strcat$(path, app), "")
  139.  
  140. <:#284,9025>end function
  141.  
  142. <:#284,9025>
  143.  
  144. @Function@<:#293,9025>function writeprofile(path, appname) ' <:f200,QCourier,0,0,255>save the path if exec works
  145.  
  146. <:#284,9025>writeprofilestring("LotusApps", appname, path, "amipro2.ini")
  147.  
  148. <:#284,9025>end function
  149.  
  150. <:#284,9025>
  151.  
  152. @Function@<:#293,9025>function getprofile(appname) ' <:f200,QCourier,0,0,255>get the path of successful exec
  153.  
  154. <:#284,9025>defstr path;
  155.  
  156. <:#284,9025>if assign(&path, getprofilestring$("LotusApps", appname, "amipro2.ini")) <<<;> ""
  157.  
  158. <:#284,9025>    return path
  159.  
  160. <:#284,9025>endif
  161.  
  162. <:#284,9025>return getprofilestring$("LotusApps", appname, "amipro.ini")
  163.  
  164. <:#284,9025>end function
  165.  
  166. <:#284,9025>
  167.  
  168. @Function@<:#293,9025>function missouri(app) ' <:f200,QCourier,0,0,255>ask user for location of exe
  169.  
  170. <:#284,9025>defstr box;
  171.  
  172. <:#284,9025>filledit(9001, "*.exe")
  173.  
  174. <:#284,9025>filledit(8007, app)
  175.  
  176. <:#284,9025>if assign(&box, dialogbox(".", "findapp")) <<<;> 1
  177.  
  178. <:#284,9025>    return 0
  179.  
  180. <:#284,9025>endif
  181.  
  182. <:#284,9025>return getcurrentdir$()
  183.  
  184. <:#284,9025>end function
  185.  
  186. <:#284,9025>
  187.  
  188. <:#284,9025>
  189.  
  190. @Function@<:#293,9025>DIALOG findapp
  191.  
  192. <:#284,9025>-2134376448 7 70 35 200 97 "" "" "Find Application"
  193.  
  194. <:#284,9025>FONT 8 "Helv"
  195.  
  196. <:#284,9025>7 34 59 8 1000 1342177280 "static" "&Program path:" 0 
  197.  
  198. <:#284,9025>6 45 60 44 9001 1352728579 "listbox" "" 0 
  199.  
  200. <:#284,9025>155 5 40 14 1 1342373889 "button" "OK" 0 
  201.  
  202. <:#284,9025>155 21 40 14 2 1342373888 "button" "Cancel" 0 
  203.  
  204. <:#284,9025>68 34 80 8 7999 1342177280 "static" "" 0 
  205.  
  206. <:#284,9025>7 6 142 9 1006 1342177280 "static" "Change into the directory that contains" 0 
  207.  
  208. <:#284,9025>7 16 107 8 8007 1342177280 "static" "" 0 
  209.  
  210. <:#284,9025>END DIALOG
  211.  
  212. <:#284,9025>
  213.  
  214. >
  215.  
  216. [Embedded]
  217. 00004167
  218. >
  219. [macsum] 6
  220. execsuite 0 0 5 2
  221. tryit 522 2 1 36
  222. writeprofile 603 2 1 41
  223. getprofile 677 1 2 45
  224. missouri 851 1 2 53
  225. findapp 1008 0 -1 64
  226. [macse]
  227. 14 execsuite
  228. 7 "notes.exe"
  229. 8 1
  230. 7 "Lotus Notes"
  231. 8 2
  232. 7 "c:\notes"
  233. 8 3
  234. 0 32 2
  235. 0 1032 "{2}"
  236. 13
  237. 11 00000152
  238. 0 38 "{2}"
  239. 0 1031 "{2}"
  240. 5 1
  241. 15
  242. 9
  243. 5 0
  244. 0 781 "{3}"
  245. 13
  246. 18 0
  247. 11 00000253
  248. 16 tryit "" "{1}"
  249. 13
  250. 5 31
  251. 18 3
  252. 11 00000253
  253. 5 1
  254. 15
  255. 9
  256. 16 getprofile "{2}"
  257. 13
  258. 16 tryit [X] "{1}"
  259. 13
  260. 5 31
  261. 18 3
  262. 11 00000339
  263. 5 1
  264. 15
  265. 9
  266. 16 missouri "{1}"
  267. 13
  268. 0 805 &4 [X]
  269. 13
  270. 5 0
  271. 18 1
  272. 11 00000510
  273. 16 tryit "{4}" "{1}"
  274. 13
  275. 5 31
  276. 18 3
  277. 11 00000497
  278. 16 writeprofile "{4}" "{2}"
  279. 10 00000510
  280. 10 00000339
  281. 6 0
  282. 15
  283. 9
  284. 14 tryit
  285. 0 781 "{0}"
  286. 0 16 "{0}" "{1}"
  287. 13
  288. 0 22 [X] ""
  289. 13
  290. 15
  291. 9
  292. 6 2
  293. 15
  294. 9
  295. 14 writeprofile
  296. 0 287 "LotusApps" "{1}" "{0}" "amipro2.ini"
  297. 6 2
  298. 15
  299. 9
  300. 14 getprofile
  301. 0 286 "LotusApps" "{0}" "amipro2.ini"
  302. 13
  303. 0 805 &2 [X]
  304. 13
  305. 7 ""
  306. 18 1
  307. 11 00000113
  308. 6 2
  309. 15
  310. 9
  311. 0 286 "LotusApps" "{0}" "amipro.ini"
  312. 13
  313. 15
  314. 9
  315. 6 1
  316. 15
  317. 9
  318. 14 missouri
  319. 0 31 9001 "*.exe"
  320. 0 31 8007 "{0}"
  321. 0 26 "." "findapp"
  322. 13
  323. 0 805 &2 [X]
  324. 13
  325. 5 1
  326. 18 1
  327. 11 00000127
  328. 5 0
  329. 15
  330. 9
  331. 0 290
  332. 13
  333. 15
  334. 9
  335. 6 1
  336. 15
  337. 9
  338. DIALOG findapp
  339. -2134376448 7 70 35 200 97 "" "" "Find Application" 
  340. FONT 8 "Helv" 
  341. 7 34 59 8 1000 1342177280 "static" "&Program path:" 0 
  342. 6 45 60 44 9001 1352728579 "listbox" "" 0 
  343. 155 5 40 14 1 1342373889 "button" "OK" 0 
  344. 155 21 40 14 2 1342373888 "button" "Cancel" 0 
  345. 68 34 80 8 7999 1342177280 "static" "" 0 
  346. 7 6 142 9 1006 1342177280 "static" "Change into the directory that contains" 0 
  347. 7 16 107 8 8007 1342177280 "static" "" 0 
  348. 00004192
  349.