home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Bonus / WSTAR2 / DISK4 / LOADLAST.WM_ / LOADLAST.bin
Encoding:
Text File  |  1994-02-28  |  7.8 KB  |  67 lines

  1. REM Description: Loads the last file that was edited.
  2. REM WSWin Macro File: loadlast.wmc
  3. REM Created by: Steven Wylie - 11/22/93
  4.  
  5. REM To automatically load the last file edited when you start WSWin, rename this
  6. REM macro to ONSTART.WMC.
  7.  
  8. REM Use the Windows function instead of internal.
  9. DECLARE FUNCTION GetPrivateProfileString LIB "kernel" (lpApplicationName AS STRING, lpKeyName AS STRING, lpDefault AS STRING, lpReturnedString AS STRING, nSize As WORD, lpFileName AS STRING) As Integer 
  10.  
  11. CONST IniFile$ = "wsw.ini"
  12. CONST Section$ = "Document History"
  13. CONST Key$ = "WorkDoc1"
  14.  
  15. cmdLine$ = GetCommandLine$()
  16.  
  17. IF cmdLine$ = "" THEN
  18.     REM See if there's an entry for the first Workdoc.
  19.     ret% = GetPrivateProfileString(Section$, Key$, default$, lastDoc$, I2W(255), IniFile$)
  20.     REM If there isn't a workdoc entry, then get the first document from the document history.
  21.     IF lastDoc$ = "" THEN ret% = GetPrivateProfileString(Section$, "Document1", default$, lastDoc$, I2W(255), IniFile$)
  22.     IF lastDoc$ <> "" THEN 
  23.         FileOpen lastDoc$
  24.     ELSE
  25.         REM If all else fails, just open the default template.
  26.         ret% = GetPrivateProfileString("Preferences", "Template", default$, lastDoc$, I2W(255), IniFile$)
  27.         FileNew lastDoc$
  28.     ENDIF
  29. ELSE
  30.     WSWinCommandLine cmdLine$
  31. ENDIF
  32.  
  33.  
  34. 
  35. *****  WARNING *****
  36. This is a WSWin macro file.
  37. Subsequent data is binary information and should not be modified.
  38. # MF # 1.0None762570464ä┤ ╓
  39. 8     ìÄ
  40. 8
  41.     ÅÉ
  42. 8
  43.     æÆ
  44. 8öòû    ôò
  45. 8
  46. âôÿÖâ
  47. 8ƒ₧
  48. ¥ƒáíàÅæ¢£áìÜ
  49. 8
  50. â£ÿúâ
  51. 8Ññª₧
  52. ¥ªº¿àÅÑ¢£ºìÜ
  53. 8 â£ÿ¬â
  54. 8½£¼⌐
  55. 8»¡░«▒₧
  56. ¥▒▓│à»░¢£▓ìÜ
  57. 8┤£╡ù
  58. 8╢ô╖║~╩(╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣╣.O`.O`.O` .O`-.O`5.O`;.O`A.O`N.O`^.O`    l.O`
  59. z.O` ê.O` û.O`
  60. ñ.O`▓.O`╢.O`╣.O`╜.O`└.O`┬.O`─.O`╞.O`╔.O`╠.O`╧.O`╥.O`╘.O`╓.O`┌.O`▄.O`▐.O`α.O` Γ.O`!Σ.O`"Θ.O`#∞.O`$≡.O`%⌡.O`&ⁿ.O`'/O`(
  61. /O`)/O`*/O`+/O`,"/O`-(/O`.-/O`/3/O`06/O`1;/O`2@/O`3B/O`4E/O`5J/O`6N/O`7T/O`8Y/O`9`/O`:g/O`;l/O`<o/O`=w/O`>y/O`?{/O`@/O`Aê/O`Bî/O`CÅ/O`Dù/O`E₧/O`Fú/O`G¡/O`H┤/O`I╣/O`J╜/O`K┬/O`L╟/O`M═/O`N╤/O`O╒/O`P▄/O`Qπ/O`RΩ/O`S≡/O`T≈/O`U0O`V
  62. 0O`W0O`X$0O`Y10O`Z:0O`[G0O`\P0O`]X0O`^`0O`_h0O``q0O`av0O`b{0O`cÇ0O`dç0O`eÄ0O`fö0O`g¢0O`h¥0O`ió0O`j¿0O`k«0O`l╡0O`m╛0O`n╟0O`o╦0O`p╙0O`q╫0O`r▄0O`sΓ0O`tΦ0O`uε0O`v⌠0O`w∙0O`x■0O`y1O`z1O`{1O`|1O`}╧_  ╧_+╧_+    ╧_╧_╧_  ╧_ ╧_çBå8╧_A╧_S╧_]╧_g╧_x╧_~╧_ë╧_
  63.           Æ╧_+      £╧_
  64.           Ñ╧_+      ╕╧_
  65.           ╜╧_+      ╚╧_
  66.           ╤╧_
  67. ëß╧_      µ╧_     δ╧_  f≡╧_+      ≤╧_  T°╧_          ²╧_
  68.           ╧_
  69.           ╧_à╧_+   ╧_  ╧_  !╧_     &╧_  ╪+╧_  ╪0╧_+      <╧_      A╧_  F╧_  K╧_     Q╧_  PV╧_  [╧_A d╧_     j╧_+      x╧_+      â╧_      ë╧_      Å╧_  ò╧_  ¢╧_     í╧_A⌐╧_     »╧_A└╧_     ╞╧_╚╧_????01CANCELERRORNUM[T1]
  70. GETPRIVATEPROFILESTRING"kernel"LPAPPLICATIONNAMELPKEYNAMELPDEFAULTLPRETURNEDSTRINGNSIZELPFILENAMEINIFILE$"wsw.ini"SECTION$"Document History"KEY$"WorkDoc1"CMDLINE$GETCOMMANDLINE$[T2][T3][L1]""[L2]RET%DEFAULT$LASTDOC$I2W255[T4][T5][T6][L3][L4]"Document1"[T7][T8][T9][T10][L5][L6]FILEOPEN[T11]"Preferences""Template"[T12][T13][T14][T15][T16]FILENEW[T17]WSWINCOMMANDLINE[T18]
  71.