home *** CD-ROM | disk | FTP | other *** search
INI File | 1992-06-16 | 7.4 KB | 452 lines |
- [ver]
- 4
- [sty]
- _MACRO.STY
- [files]
- [charset]
- 82
- ANSI (Windows, IBM CP 1252)
- [revisions]
- 0
- [prn]
- PostScript Printer
- [port]
- LPT1:
- [lang]
- 1
- [desc]
- View - Displays word count, etc.
- Lotus WPD Marketing
- Intermediate
- EvalFields
- Autorun
- 708732860
- 15
- 695279825
- 279
- 3
- 347
- 2718
- 7
- 9
-
-
-
-
-
-
- 0
- [fopts]
- 0
- 1
- 0
- 0
- [lnopts]
- 2
- Body Text
- 1
- [docopts]
- 5
- 2
- [GramStyle]
-
- [ParaNum]
- 1
- [l1]
- 0
- [pg]
- 3
- 44 0 24 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
- 94 0 41 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
- 100 0 10 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
- [edoc]
- @Function@<:#293,9360>'Declares and defines
-
- <:#284,9360>declare onmenu(p1, p2);
-
- <:#284,9360>'This stuff defines the Title Bar message (TitleBarMsg) stuff and is not necessary
-
- <:#284,9360>define GetActiveWindow() DllCall("user,GetActiveWindow,H")
-
- <:#284,9360>define SetWindowText() DllCall("user,SetWindowText,IHC", %1, %2)
-
- <:#284,9360>define TitleBarMsg() SetWindowText(GetActiveWindow(), %1)
-
- <:#284,9360>define GetWindowText() DllCall("user,GetWindowText,HHFH", %1, %2, %3)
-
- <:#284,9360>'functions
-
- @Function@<:#293,9360>FUNCTION PutOnMenu()
-
- <:#284,9360>rmac=GetRunningMacroFile$()
-
- <:#284,9360>item="Display Word &Count..."
-
- <:#284,9360>menu="&View"
-
- <:#284,9360>running=onmenu(menu, item)
-
- <:#284,9360>if running = 1
-
- <:#284,9360> call filestats()
-
- <:#284,9360>else
-
- StatusBarMsg("Installing a new menu item to the View menu")
-
- 'pause(008)
-
- <:#284,9360> deletemenuitem(1, menu, item)
-
- <:#568,9360> addmenuitem(1, menu, item, "{rmac}!filestats", "Displays word count and other file statistics for the document.")
-
- StatusBarMsg("")
-
- <:#284,9360>endif
-
- <:#284,9360>END FUNCTION
-
- @Function@<:#293,9360>FUNCTION filestats()
-
- <:#284,9360>count=getopenfilecount()
-
- <:#284,9360>if count =0
-
- <:#284,9360> message("You must have a file open to use this feature.")
-
- <:#284,9360> exit function
-
- <:#284,9360>endif
-
- <:#284,9360>StatusBarMsg("Counting words, one moment please...")
-
- <:#284,9360>hourglass(1)
-
- <:#284,9360>words=EvalField("NumWords")
-
- <:#284,9360>if words<<2
-
- <:#284,9360> wplural=""
-
- <:#284,9360>else
-
- <:#284,9360> wplural="s"
-
- <:#284,9360>endif
-
- <:#284,9360>pages=EvalField("NumPages")
-
- <:#284,9360>if pages<<2
-
- <:#284,9360> pplural=""
-
- <:#284,9360>else
-
- <:#284,9360> pplural="s"
-
- <:#284,9360>endif
-
- <:#284,9360>if GetOpenFileName$()=""
-
- <:#284,9360> if Filechanged(0,0) = 0
-
- <:#284,9360> savestat="Untitled file is unchanged since it was created:"
-
- <:#284,9360>else
-
- <:#284,9360> savestat="Untitled file has changed since it was created:"
-
- <:#284,9360>endif
-
- <:#284,9360>size="n/a"
-
- <:#240,9360>else
-
- <:#240,9360> if Filechanged(0,0) = 0
-
- <:#284,9360> savestat="Displayed file is unchanged as of last save:"
-
- <:#240,9360>else
-
- <:#284,9360> savestat="Displayed file has changed since last save:"
-
- <:#240,9360>endif
-
- <:#240,9360>size=strcat$(EvalField("FileSize"), "K")
-
- <:#240,9360>endif
-
- <:#240,9360>savedate=formatDate$(EvalField("EditDate"), "a")
-
- <:#240,9360>diff=datediff((formatdate$(now(), "a")), savedate)
-
- <:#240,9360>if diff=0
-
- <:#240,9360> savedate="today"
-
- <:#240,9360>elseif diff=1
-
- <:#240,9360> savedate="yesterday"
-
- <:#240,9360>endif
-
- <:#240,9360>savetime=formatTime$(EvalField("EditDate"), "8")
-
- <:#284,9360>savedatetime="{savedate} at {savetime}"
-
- <:#240,9360>StatusBarMsg("")
-
- <:#240,9360>hourglass(0)
-
- <:#240,9360>filledit(1006, words)
-
- <:#240,9360>filledit(1007, pages)
-
- <:#240,9360>filledit(1008, size)
-
- <:#240,9360>filledit(1009, savestat)
-
- <:#240,9360>filledit(1010, savedatetime)
-
- <:#240,9360>box=dialogbox(".", "WordCount")
-
- <:#240,9360>statusbarmsg("")
-
- <:#240,9360>END FUNCTION
-
- @Function@<:#240,9360>FUNCTION onmenu(menu, item)
-
- <:#240,9360>rmac=getrunningmacrofile$()
-
- <:#480,9360>result=checkmenuitem(1, menu, item, 1) ' Must checkmenuitem twice so it gets
-
- <:#480,9360>result=checkmenuitem(1, menu, item, 0) ' correct value without altering item
-
- <:#240,9360>if result=8
-
- <:#240,9360> onmenu= 1
-
- <:#240,9360>elseif
-
- <:#240,9360> onmenu= 0
-
- <:#240,9360>endif
-
- <:#240,9360>END FUNCTION
-
- @Function@<:#240,9360>DIALOG WordCount
-
- <:#240,9360>-2134376448 9 57 47 174 72 "" "" "Word Count"
-
- <:#240,9360>FONT 8 "Helv"
-
- <:#240,9360>0 7 76 10 1000 1342177282 "static" "Number of Words:" 0
-
- <:#240,9360>88 7 37 10 1006 1342177280 "static" "" 0
-
- <:#240,9360>0 22 76 10 1001 1342177282 "static" "Number of Pages:" 0
-
- <:#284,9360>88 22 40 8 1007 1342177280 "static" "" 0
-
- <:#240,9360>22 33 54 10 1002 1342177282 "static" "File size:" 0
-
- <:#240,9360>88 33 40 10 1008 1342177280 "static" "" 0
-
- <:#240,9360>6 48 164 10 1009 1342177280 "static" "" 0
-
- <:#240,9360>20 58 122 10 1010 1342177280 "static" "" 0
-
- <:#240,9360>130 2 40 14 1 1342373889 "button" "OK" 0
-
- <:#284,9360>END DIALOG
-
- >
-
- [Embedded]
- 00005082
- >
- [macsum] 4
- PutOnMenu 0 0 5 8
- filestats 366 0 13 23
- onmenu 1610 2 3 77
- WordCount 1794 0 -1 87
- [macse]
- 14 PutOnMenu
- 0 802
- 13
- 8 1
- 7 "Display Word &Count..."
- 8 2
- 7 "&View"
- 8 3
- 16 onmenu "{3}" "{2}"
- 13
- 8 4
- 6 4
- 5 1
- 18 0
- 11 00000167
- 16 filestats
- 10 00000354
- 0 789 "Installing a new menu item to the View menu"
- 0 520 1 "{3}" "{2}"
- 0 516 1 "{3}" "{2}" "{1}!filestats" "Displays word count and other file statistics for the document."
- 0 789 ""
- 6 0
- 15
- 9
- 14 filestats
- 0 1050
- 13
- 8 1
- 6 1
- 5 0
- 18 0
- 11 00000126
- 0 3 "You must have a file open to use this feature."
- 6 0
- 15
- 9
- 0 789 "Counting words, one moment please..."
- 0 296 1
- 0 1289 "NumWords"
- 13
- 8 2
- 6 2
- 5 2
- 18 5
- 11 00000262
- 7 ""
- 8 3
- 10 00000274
- 7 "s"
- 8 3
- 0 1289 "NumPages"
- 13
- 8 4
- 6 4
- 5 2
- 18 5
- 11 00000355
- 7 ""
- 8 5
- 10 00000367
- 7 "s"
- 8 5
- 0 267
- 13
- 7 ""
- 18 0
- 11 00000598
- 0 34 0 0
- 13
- 5 0
- 18 0
- 11 00000513
- 7 "Untitled file is unchanged since it was created:"
- 8 6
- 10 00000571
- 7 "Untitled file has changed since it was created:"
- 8 6
- 7 "n/a"
- 8 7
- 10 00000804
- 0 34 0 0
- 13
- 5 0
- 18 0
- 11 00000704
- 7 "Displayed file is unchanged as of last save:"
- 8 6
- 10 00000758
- 7 "Displayed file has changed since last save:"
- 8 6
- 0 1289 "FileSize"
- 13
- 0 16 [X] "K"
- 13
- 8 7
- 0 1289 "EditDate"
- 13
- 0 770 [X] "a"
- 13
- 8 8
- 0 772
- 13
- 0 770 [X] "a"
- 13
- 0 769 [X] "{8}"
- 13
- 8 9
- 6 9
- 5 0
- 18 0
- 11 00000965
- 7 "today"
- 8 8
- 10 00001014
- 6 9
- 5 1
- 18 0
- 11 00001014
- 7 "yesterday"
- 8 8
- 0 1289 "EditDate"
- 13
- 0 773 [X] "8"
- 13
- 8 10
- 7 "{8} at {10}"
- 8 11
- 0 789 ""
- 0 296 0
- 0 31 1006 "{2}"
- 0 31 1007 "{4}"
- 0 31 1008 "{7}"
- 0 31 1009 "{6}"
- 0 31 1010 "{11}"
- 0 26 "." "WordCount"
- 13
- 8 12
- 0 789 ""
- 6 0
- 15
- 9
- 14 onmenu
- 0 802
- 13
- 8 3
- 0 518 1 "{0}" "{1}" 1
- 13
- 8 4
- 0 518 1 "{0}" "{1}" 0
- 13
- 8 4
- 6 4
- 5 8
- 18 0
- 11 00000143
- 5 1
- 8 2
- 10 00000172
- 6 2
- 5 0
- 18 0
- 11 00000172
- 6 2
- 15
- 9
- DIALOG WordCount
- -2134376448 9 57 47 174 72 "" "" "Word Count"
- FONT 8 "Helv"
- 0 7 76 10 1000 1342177282 "static" "Number of Words:" 0
- 88 7 37 10 1006 1342177280 "static" "" 0
- 0 22 76 10 1001 1342177282 "static" "Number of Pages:" 0
- 88 22 40 8 1007 1342177280 "static" "" 0
- 22 33 54 10 1002 1342177282 "static" "File size:" 0
- 88 33 40 10 1008 1342177280 "static" "" 0
- 6 48 164 10 1009 1342177280 "static" "" 0
- 20 58 122 10 1010 1342177280 "static" "" 0
- 130 2 40 14 1 1342373889 "button" "OK" 0
- 00005107
-