home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 18 / 18.iso / w / w252 / 4.ddi / MACROS.CMZ / 123W.SMM next >
Encoding:
INI File  |  1991-08-19  |  3.7 KB  |  312 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.     Link this macro to the 123W Icon to run 123 for Windows.
  17.     Lotus WPD Marketing
  18.     Beginner
  19.     Exec, ActivateApp
  20.     
  21.     682670875
  22.     13
  23.     674329275
  24.     39
  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 = "123w.exe"
  58.  
  59. appname = "1-2-3 for Windows"
  60.  
  61. defdir = "c:\123w"
  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.  
  189. [Embedded]
  190. 00002207
  191. >
  192. [macsum] 6
  193. execsuite 0 0 5 2
  194. tryit 526 2 1 36
  195. writeprofile 607 2 1 41
  196. getprofile 680 1 1 45
  197. missouri 756 1 2 49
  198. findapp 913 0 -1 60
  199. [macse]
  200. 14 execsuite
  201. 7 "123w.exe"
  202. 8 1
  203. 7 "1-2-3 for Windows"
  204. 8 2
  205. 7 "c:\123w"
  206. 8 3
  207. 0 32 1
  208. 0 1032 "{2}"
  209. 13
  210. 11 00000156
  211. 0 38 "{2}"
  212. 0 1031 "{2}"
  213. 5 1
  214. 15
  215. 9
  216. 5 0
  217. 0 781 "{3}"
  218. 13
  219. 18 0
  220. 11 00000257
  221. 16 tryit "" "{1}"
  222. 13
  223. 5 31
  224. 18 3
  225. 11 00000257
  226. 5 1
  227. 15
  228. 9
  229. 16 getprofile "{2}"
  230. 13
  231. 16 tryit [X] "{1}"
  232. 13
  233. 5 31
  234. 18 3
  235. 11 00000343
  236. 5 1
  237. 15
  238. 9
  239. 16 missouri "{1}"
  240. 13
  241. 0 805 &4 [X]
  242. 13
  243. 5 0
  244. 18 1
  245. 11 00000514
  246. 16 tryit "{4}" "{1}"
  247. 13
  248. 5 31
  249. 18 3
  250. 11 00000501
  251. 16 writeprofile "{4}" "{2}"
  252. 10 00000514
  253. 10 00000343
  254. 6 0
  255. 15
  256. 9
  257. 14 tryit
  258. 0 781 "{0}"
  259. 0 16 "{0}" "{1}"
  260. 13
  261. 0 22 [X] ""
  262. 13
  263. 15
  264. 9
  265. 6 2
  266. 15
  267. 9
  268. 14 writeprofile
  269. 0 287 "LotusApps" "{1}" "{0}" "amipro.ini"
  270. 6 2
  271. 15
  272. 9
  273. 14 getprofile
  274. 0 286 "LotusApps" "{0}" "amipro.ini"
  275. 13
  276. 15
  277. 9
  278. 6 1
  279. 15
  280. 9
  281. 14 missouri
  282. 0 31 9001 "*.exe"
  283. 0 31 8007 "{0}"
  284. 0 26 "." "findapp"
  285. 13
  286. 0 805 &2 [X]
  287. 13
  288. 5 1
  289. 18 1
  290. 11 00000127
  291. 5 0
  292. 15
  293. 9
  294. 0 290
  295. 13
  296. 15
  297. 9
  298. 6 1
  299. 15
  300. 9
  301. DIALOG findapp
  302. -2134376448 7 70 35 200 97 "" "" "Find Application" 
  303. FONT 8 "Helv" 
  304. 7 34 59 8 1000 1342177280 "static" "&Program path:" 0 
  305. 6 45 60 44 9001 1352728579 "listbox" "" 0 
  306. 155 5 40 14 1 1342373889 "button" "OK" 0 
  307. 155 21 40 14 2 1342373888 "button" "Cancel" 0 
  308. 68 34 80 8 7999 1342177280 "static" "" 0 
  309. 7 6 142 9 1006 1342177280 "static" "Change into the directory that contains" 0 
  310. 7 16 107 8 8007 1342177280 "static" "" 0 
  311. 00002232
  312.