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