home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
editors
/
amac41.arj
/
DATE13.QM
< prev
next >
Wrap
Text File
|
1991-07-12
|
26KB
|
557 lines
* DATE13.QM, v1.3a
* Written By Tom Hogshead
* With Macro Contributions By Tim Farley and Mel Hulse
* July 12, 1991
*
* ┌─────────────────────────── (Index ) ────────────────────────────────────┐
* │ @(1) Date in English <March 9, 1991> not <Sat 03-09-1991>
* │
* │ @(2) Time in Standard <5:26 pm>, not Military <17:26:37>
* │
* │*@(3) Date and time in following format (Tim Farley author)......
* │ <■ Written in Fairview, NJ ■ Friday, September 14th, 1990 at 9:50 pm.>
* │
* │ @(4) Name_date <Tom Hogshead, Thursday, April 11, 1991 at 4:01 pm>
* │
* │*@(5) Date in English <Sunday, March 31, 1991 at 4:43 pm> by M Hulse
* │
* │ @(h) Finds first word on cursor line marked in document below
* │
* │ ****** @3 and @5 commented out to fit 2k macro limititation ******
* │
* │ (Index) Use
* │ (Version) History
* │
* └────────[ be sure to leave at least one blank line at end of Index ]──────┘
* (Index) Use;
*
* To locate a macro or item in this file, press @h, place the cursor
* line on the desired item in the Index above, and press <enter>.
* See BOOKxx.QM for more details.
* ---------------------------------------------------------------------
* @(1) Date in English "March 9, 1991", not "Sat 03-09-1991"
* ---------------------------------------------------------------------
*
* This macro is based on the technique used by Tim Farley in his
* macro in message #2953 on SemWare ILink Conference 21, dated 9/17/90
* and included below as @3.
*
@1 MacroBegin
UnmarkBlock * Insert and mark date
DropAnchor InsertDate * "
DropAnchor * "
GotoBlockBeg DelRtWord * Remove day name
FindReplace "-" Return * Replace both "-" with "- "
"- " Return "LN" Return *
GotoBlockBeg * Put cursor on month #
Find Return Return * Find first dash
MarkColumn * Mark month number with "-"
CursorLeft CursorLeft CursorLeft* "
MarkColumn * "
FindReplace Return * Remove first dash
Delline Return "LN" Return * "
*------------- Replace Month number with Name ----------------*
FindReplace"01" Return "January" Return "LN" Return *Jtrue NODASH: |
FindReplace"02" Return "February" Return "LN" Return *Jtrue NODASH: |
FindReplace"03" Return "March" Return "LN" Return *Jtrue NODASH: |
FindReplace"04" Return "April" Return "LN" Return *Jtrue NODASH: |
FindReplace"05" Return "May" Return "LN" Return *Jtrue NODASH: |1.3
FindReplace"06" Return "June" Return "LN" Return *Jtrue NODASH: |
FindReplace"07" Return "July" Return "LN" Return *Jtrue NODASH: |
FindReplace"08" Return "August" Return "LN" Return *Jtrue NODASH: |
FindReplace"09" Return "September" Return "LN" Return *Jtrue NODASH: |
FindReplace"10" Return "October" Return "LN" Return *Jtrue NODASH: |
FindReplace"11" Return "November" Return "LN" Return *Jtrue NODASH: |
FindReplace"12" Return "December" Return "LN" Return
NODASH:
MarkLine
*--------- Replace Dash after Day Number with comma ----------*
FindReplace "-" Return "," Return "LN" Return
*--------- Remove Zero in Day Number -------------------------*
FindReplace " 0" Return " " Return "LN" Return
Find "," Return "LN" Return * Find comma
WordRight WordRight " " * Put 2 spaces after year |1.2
UnmarkBlock * Unmark
*
* 408 bytes Thu 03-21-1991 04:57:30
* 410 bytes Mon 04-01-1991 10:42:59 put 2 spaces after year
* 377 bytes Thu 04-11-1991 16:08:44 removed jtrue NODASH
* ----------------------------------------------------------------------
* @(2) Time in Standard '5:26 pm', not Military '17:26:37'
* ----------------------------------------------------------------------
*
* This macro is "lifted" from Tim Farley's @3 below with changes noted.
* It will work if run with cursor between text but spacing will be
* different than if not. This macro can be added to the end of @1 for
* 'April 1, 1991 10:59 am '.
*
@2 Macrobegin
UnMarkBlock InsertTime " " CursorLeft *| TH
Backspace Backspace Backspace Backspace
CursorLeft CursorLeft CursorLeft CursorLeft CursorLeft
DropAnchor DropAnchor
FindReplace "0" Return "0" Return "ln" Return
JFalse after10:
DelCh
Jump am:
after10:
CursorRight DropAnchor CursorLeft
FindReplace "10" Return "10" Return "ln" Return
JTrue am:
FindReplace "11" Return "11" Return "ln" Return
JTrue am:
FindReplace "13" Return "1" Return "ln" Return
FindReplace "14" Return "2" Return "ln" Return
FindReplace "15" Return "3" Return "ln" Return
FindReplace "16" Return "4" Return "ln" Return
FindReplace "17" Return "5" Return "ln" Return
FindReplace "18" Return "6" Return "ln" Return
FindReplace "19" Return "7" Return "ln" Return
FindReplace "20" Return "8" Return "ln" Return
FindReplace "21" Return "9" Return "ln" Return
FindReplace "22" Return "10" Return "ln" Return
FindReplace "23" Return "11" Return "ln" Return
Jump pm:
am:
WordRight WordRight " am " *| TH
Jump end:
pm:
WordRight WordRight " pm " *| TH
end:
UnmarkBlock
*
*265 bytes Mon 04-01-1991 10:47:26
* ---------------------------------------------------------------------
* @(3) Date and time in following format (Tim Farley author)......
* "■ Written in Fairview, NJ ■ Friday, September 14th, 1990 at 9:50 pm."
* ---------------------------------------------------------------------
* ======================================================================
* Date: 09-17-90 (14:08) Number: 2953 SemWare Support BBS
* To: JOE MARTELLA Refer#: 2945
* From: TIM FARLEY Read: YES
* Subj: Qedit and EZ-Reader Conf: (21) ILink
* ------------------------------------------------------------------------
* JM>Message Entered On Fri 09-14-1990 At 21:49:29
* JM>
* JM>The only problem with this method is personal taste. I like to
* JM>message to show the time in standard AM and PM (See Below),
* JM>rather than in military time.
*
* JM> ■ Written in Fairview, NJ ■ Friday, September 14th, 1990 at 9:50 pm.
*
* You could do this with some clever macro foolishness. Here is one of
* the longest macros I have ever written for anyone:
*
* *
* * Display the time in AM/PM format instead of Military
* *
* @3 MacroBegin
* *
* * Setup signature line:
* *
* EndFile AddLine BegLine
* " ■ Written in Fairview, NJ ■ "
* *
* * Rest of this is just to massage the date:
* *
* UnmarkBlock
* DropAnchor InsertDate DropAnchor
* GotoBlockBeg
* FindReplace "Mon" Return "Monday," Return "ln" Return
* FindReplace "Tue" Return "Tuesday," Return "ln" Return
* FindReplace "Wed" Return "Wednesday," Return "ln" Return
* FindReplace "Thu" Return "Thursday," Return "ln" Return
* FindReplace "Fri" Return "Friday," Return "ln" Return
* FindReplace "Sat" Return "Saturday," Return "ln" Return
* FindReplace "Sun" Return "Sunday," Return "ln" Return
* Find "-" Return Return
* CursorLeft CursorLeft CursorLeft
* FindReplace " 01-" Return " January " Return "ln" Return
* FindReplace " 02-" Return " February " Return "ln" Return
* FindReplace " 03-" Return " March " Return "ln" Return
* FindReplace " 04-" Return " April " Return "ln" Return
* FindReplace " 05-" Return " May " Return "ln" Return
* FindReplace " 06-" Return " June " Return "ln" Return
* FindReplace " 07-" Return " July " Return "ln" Return
* FindReplace " 08-" Return " August " Return "ln" Return
* FindReplace " 09-" Return " September " Return "ln" Return
* FindReplace " 10-" Return " October " Return "ln" Return
* FindReplace " 11-" Return " November " Return "ln" Return
* FindReplace " 12-" Return " December " Return "ln" Return
* DelCh
* FindReplace "-" Return "th, " Return "ln" Return
* GotoBlockEnd Backspace Backspace
* "at " UnMarkBlock
* InsertTime Backspace Backspace Backspace Backspace
* CursorLeft CursorLeft CursorLeft CursorLeft CursorLeft
* DropAnchor DropAnchor
* FindReplace "0" Return "0" Return "ln" Return
* JFalse after10:
* DelCh
* Jump am:
* after10:
* CursorRight DropAnchor CursorLeft
* FindReplace "10" Return "10" Return "ln" Return
* JTrue am:
* FindReplace "11" Return "11" Return "ln" Return
* JTrue am:
* FindReplace "13" Return "1" Return "ln" Return
* FindReplace "14" Return "2" Return "ln" Return
* FindReplace "15" Return "3" Return "ln" Return
* FindReplace "16" Return "4" Return "ln" Return
* FindReplace "17" Return "5" Return "ln" Return
* FindReplace "18" Return "6" Return "ln" Return
* FindReplace "19" Return "7" Return "ln" Return
* FindReplace "20" Return "8" Return "ln" Return
* FindReplace "21" Return "9" Return "ln" Return
* FindReplace "22" Return "10" Return "ln" Return
* FindReplace "23" Return "11" Return "ln" Return
* Jump pm:
* am:
* EndLine " am."
* Jump end:
* pm:
* EndLine " pm."
* end:
* UnmarkBlock
* *
* 966 bytes Mon 09-17-1990 19:23:56 (added TH)
*
* This macro is too big for QCONFIG, you must use QMAC. It's also too big
* to use the /E parameter to autoexec it---you will have to hit the key
* manually. But it does the job. You'll need QEdit 2.1 to handle this
* macro.
*
* The only weirdness is that it always puts "th" after the date, which is
* weird on some dates. You might just want to take that part out.
*
* --Tim Farley
* SemWare Technical Support
* ==============================================================================
* Date: 04-07-91 (01:43) Number: 2337 SemWare Support BBS
* To: TOM HOGSHEAD Refer#: NONE
* From: MEL HULSE Read: NO
* Subj: Date/Time in a Macro #1 Conf: (22) RelayNet
* ------------------------------------------------------------------------
* Joe Morlan asked for a date/time macro. We have deluged him with
* the developing fancy macro. I promised the complete thing this
* weekend. Here it is. Two messages long! Try it out.
*
*
* * ---------------------------------------------------------------------
* * @(5) Date in English "Sunday, March 31, 1991 at 4:43 pm",
* * not "Sun 03-31-1991 16:43:38 "
* * Start with cursor where you want the date and time to begin.
* * Rev 1.2 by Mel Hulse
* * ---------------------------------------------------------------------*
* *
* * This macro is based on the techniques used by Tim Farley.
* * and uploaded by Patrick Pluto
* *
* @5 MacroBegin * Change @5 to key you want
* UnmarkBlock * Housekeeping
* DefaultWordSet * "
* InsertDate * Places system date at the cursor position
* PrevPosition * Goto front of date string
* *------ vvvv If you don't want day spelled out, DELETE FROM HERE ----*
* MarkWord * Mark the abreviated day
* *------ Replace Day with spelled out name within the marked block----*
* FindReplace"Mon" Return "Monday, " Return "LN" Return *Jtrue Month:
* FindReplace"Tue" Return "Tuesday, " Return "LN" Return *Jtrue Month:
* FindReplace"Wed" Return "Wednesday, " Return "LN" Return *Jtrue Month:
* FindReplace"Thu" Return "Thursday, " Return "LN" Return *Jtrue Month:
* FindReplace"Fri" Return "Friday, " Return "LN" Return *Jtrue Month:
* FindReplace"Sat" Return "Saturday, " Return "LN" Return *Jtrue Month:
* FindReplace"Sun" Return "Sunday, " Return "LN" Return
* Month: * Target for jump
* *--------------------------------------------------------------------*
* GotoBlockEnd * Goto the 2 spaces after the day
* *------ ^^^^ TO HERE, ----------------------------------------------*
* DelRtWord * Delete spaces if Q is configured to...
* * delete following white space...
* * (Delete day, if your not using it)
* UnmarkBlock * Un mark
* MarkWord
* *------ Replace Month number with Name -----------------------------*
* FindReplace"01" Return "January " Return "LN" Return
* FindReplace"02" Return "February " Return "LN" Return
* FindReplace"03" Return "March " Return "LN" Return
* FindReplace"04" Return "April " Return "LN" Return
* FindReplace"05" Return "May " Return "LN" Return
* FindReplace"06" Return "June " Return "LN" Return
* FindReplace"07" Return "July " Return "LN" Return
* FindReplace"08" Return "August " Return "LN" Return
* FindReplace"09" Return "September " Return "LN" Return
* FindReplace"10" Return "October " Return "LN" Return
* FindReplace"11" Return "November " Return "LN" Return
* FindReplace"12" Return "December " Return "LN" Return
* GotoBlockEnd * Go to the space after month
* UnmarkBlock * Un mark
* Delch * Delete hyphen
* *------ Remove Zero in Day Number -----------------------------------*
* CursorLeft * Ready for 2 character find...
* DropAnchor * Mark 1st...
* CursorRight * and second...
* DropAnchor * characters
* GotoBlockBeg * And go to block's start
* FindReplace " 0" Return " " Return "LN" Return * Find a "0" and delete it
* GoToBlockEnd * Go toward hyphen
* UnmarkBlock * Un mark
* CursorRight * And one character more
* Delch ", " * Delete hyphen & add comma and space
* *--------------------------------------------------------------------*
* MarkWord * Mark the year
* GotoBlockEnd * Go to the space after the year
* UnmarkBlock * Un mark
* DelCh * Delete 1 character at years end
* *------- Delete after here if time not wanted -----------------------*
* * Time: "12:36 pm ", not "12:36:18 "
* * -------------------------------------------------------------------*
* AltWordSet * Housekeeping - Turn back to DefaultWordSet ....
* " at "
* InsertTime * Insert the time
* Backspace * Backspaces...
* Backspace * over...
* Backspace * the...
* Backspace * seconds
* CursorLeft * Go to the end of time
* MarkWord * Mark time
* GotoBlockBeg * Go to the beginning of time
* UnmarkBlock * Un mark
* CursorLeft * And 1 character before time
* DropAnchor * Mark the...
* CursorRight * 1st 2 characters...
* DropAnchor * of the hour
* CursorLeft * See if it's a "0" and delete it
* FindReplace " 0" Return " " Return "ln" Return JTrue am:
* GoToBlockEnd * Otherwise, convert the hour
* UnmarkBlock * Un mark the find block
* DropAnchor * Mark...
* CursorLeft * the...
* DropAnchor * hour
* CursorLeft * Go past 1st character
* * Look for each 2 digit hour, 11 or less & go to "am"...
* FindReplace "10" Return "10" Return "ln" Return JTrue am:
* FindReplace "11" Return "11" Return "ln" Return JTrue am:
* * ...or convert it to the 12 hour clock
* FindReplace "13" Return "1" Return "ln" Return
* FindReplace "14" Return "2" Return "ln" Return
* FindReplace "15" Return "3" Return "ln" Return
* FindReplace "16" Return "4" Return "ln" Return
* FindReplace "17" Return "5" Return "ln" Return
* FindReplace "18" Return "6" Return "ln" Return
* FindReplace "19" Return "7" Return "ln" Return
* FindReplace "20" Return "8" Return "ln" Return
* FindReplace "21" Return "9" Return "ln" Return
* FindReplace "22" Return "10" Return "ln" Return
* FindReplace "23" Return "11" Return "ln" Return
* Jump pm: * ...and go to "pm"
* am: * Target
* GotoBlockEnd * Get past time
* UnmarkBlock * Un mark the find block
* MarkWord GotoBlockEnd UnmarkBlock * Go to the end of time
* " am" * Enter "am"
* Jump end: * Quit
* pm: * Target
* GotoBlockEnd * Get past time
* UnmarkBlock * Un mark the find block
* MarkWord GotoBlockEnd UnmarkBlock * Go to the end of time
* " pm" * Enter "pm"
* end: * Quit target
* CursorRight * Put the cursor where user wants it
* DefaultWordSet * Put it back where it probably was
* *
* * 861 bytes, Sunday, April 7, 1991 at 12:41 am
* * 861 bytes Thu 04-11-1991 15:59:52 check thh
*
* * Enjoy!
*
* * » Saturday, April 6, 1991 at 11:39 pm ■ .\\É£ ╟│u£se, Silicon Valley «
* * ---
* * ■ SLMR 1.05 #356 ■ Reward for a job well done: more work.
*
* * PCRelay:COMPEASE -> #90 RelayNet (tm)
* * 4.10 *Comp-U-Ease* CA. 408-286-8332 HST/V.32/VSM
* ----------------------------------------------------------------------
* @(4) Tom Hogshead, Thursday, April 11, 1991 at 11:12 pm
* ----------------------------------------------------------------------
*
* This macro is based on @5 above by Mel Hulse.
*
@4 MacroBegin * Change @5 to key you want
UnmarkBlock * Housekeeping
DefaultWordSet * "
* ----------------------- insert name and date -----------------------*
"Tom Hogshead," **** change to your name ****
cursorright *
cursorright *
cursorright *
InsertDate * Places system date at the cursor position
PrevPosition * Goto front of date string
*------ vvvv If you don't want day spelled out, DELETE FROM HERE ----*
MarkWord * Mark the abreviated day
*------ Replace Day with spelled out name within the marked block----*
FindReplace"Mon" Return "Monday, " Return "LN" Return *Jtrue Month:
FindReplace"Tue" Return "Tuesday, " Return "LN" Return *Jtrue Month:
FindReplace"Wed" Return "Wednesday, " Return "LN" Return *Jtrue Month:
FindReplace"Thu" Return "Thursday, " Return "LN" Return *Jtrue Month:
FindReplace"Fri" Return "Friday, " Return "LN" Return *Jtrue Month:
FindReplace"Sat" Return "Saturday, " Return "LN" Return *Jtrue Month:
FindReplace"Sun" Return "Sunday, " Return "LN" Return
Month: * Target for jump
*--------------------------------------------------------------------*
GotoBlockEnd * Goto the 2 spaces after the day
*------ ^^^^ TO HERE, ----------------------------------------------*
DelRtWord * Delete spaces if Q is configured to...
* delete following white space...
* (Delete day, if your not using it)
UnmarkBlock * Un mark
MarkWord
*------ Replace Month number with Name -----------------------------*
FindReplace"01" Return "January " Return "LN" Return
FindReplace"02" Return "February " Return "LN" Return
FindReplace"03" Return "March " Return "LN" Return
FindReplace"04" Return "April " Return "LN" Return
FindReplace"05" Return "May " Return "LN" Return
FindReplace"06" Return "June " Return "LN" Return
FindReplace"07" Return "July " Return "LN" Return
FindReplace"08" Return "August " Return "LN" Return
FindReplace"09" Return "September " Return "LN" Return
FindReplace"10" Return "October " Return "LN" Return
FindReplace"11" Return "November " Return "LN" Return
FindReplace"12" Return "December " Return "LN" Return
GotoBlockEnd * Go to the space after month
UnmarkBlock * Un mark
Delch * Delete hyphen
*------ Remove Zero in Day Number -----------------------------------*
CursorLeft * Ready for 2 character find...
DropAnchor * Mark 1st...
CursorRight * and second...
DropAnchor * characters
GotoBlockBeg * And go to block's start
FindReplace " 0" Return " " Return "LN" Return * Find a "0" and delete it
GoToBlockEnd * Go toward hyphen
UnmarkBlock * Un mark
CursorRight * And one character more
Delch ", " * Delete hyphen & add comma and space
*--------------------------------------------------------------------*
MarkWord * Mark the year
GotoBlockEnd * Go to the space after the year
UnmarkBlock * Un mark
DelCh * Delete 1 character at years end
*------- Delete after here if time not wanted -----------------------*
* Time: "12:36 pm ", not "12:36:18 "
* -------------------------------------------------------------------*
AltWordSet * Housekeeping - Turn back to DefaultWordSet ....
" at "
InsertTime * Insert the time
Backspace * Backspaces...
Backspace * over...
Backspace * the...
Backspace * seconds
CursorLeft * Go to the end of time
MarkWord * Mark time
GotoBlockBeg * Go to the beginning of time
UnmarkBlock * Un mark
CursorLeft * And 1 character before time
DropAnchor * Mark the...
CursorRight * 1st 2 characters...
DropAnchor * of the hour
CursorLeft * See if it's a "0" and delete it
FindReplace " 0" Return " " Return "ln" Return JTrue am:
GoToBlockEnd * Otherwise, convert the hour
UnmarkBlock * Un mark the find block
DropAnchor * Mark...
CursorLeft * the...
DropAnchor * hour
CursorLeft * Go past 1st character
* Look for each 2 digit hour, 11 or less & go to "am"...
FindReplace "10" Return "10" Return "ln" Return JTrue am:
FindReplace "11" Return "11" Return "ln" Return JTrue am:
* ...or convert it to the 12 hour clock
FindReplace "13" Return "1" Return "ln" Return
FindReplace "14" Return "2" Return "ln" Return
FindReplace "15" Return "3" Return "ln" Return
FindReplace "16" Return "4" Return "ln" Return
FindReplace "17" Return "5" Return "ln" Return
FindReplace "18" Return "6" Return "ln" Return
FindReplace "19" Return "7" Return "ln" Return
FindReplace "20" Return "8" Return "ln" Return
FindReplace "21" Return "9" Return "ln" Return
FindReplace "22" Return "10" Return "ln" Return
FindReplace "23" Return "11" Return "ln" Return
Jump pm: * ...and go to "pm"
am: * Target
GotoBlockEnd * Get past time
UnmarkBlock * Un mark the find block
MarkWord GotoBlockEnd UnmarkBlock * Go to the end of time
" am" * Enter "am"
Jump end: * Quit
pm: * Target
GotoBlockEnd * Get past time
UnmarkBlock * Un mark the find block
MarkWord GotoBlockEnd UnmarkBlock * Go to the end of time
" pm" * Enter "pm"
end: * Quit target
CursorRight * Put the cursor where user wants it
DefaultWordSet * Put it back where it probably was
*
* 861 bytes, Sunday, April 7, 1991 at 12:41 am (@5 macro)
* 890 bytes Thu 04-11-1991 23:13:32 added name
* ----------------------------------------------------------------------
* @(h) Finds first word on cursor line marked in document below
* ----------------------------------------------------------------------
*
* Press @ and h at the same time. Cursor down to desired line in Index.
* Press <enter> to locate the desired item from the Index. See
* Bookxx.Qm in AMACxx.Zip for more discussion.
*
@h macrobegin
begfile
unmarkblock
markline markline
pause
wordright
markword
copy
endpara
find "(" paste ")" return return
begline
*
* 22 bytes Tue 04-09-1991 16:23:53
* (Version) History
* 1.0 - Initial
* 1.1 - Internal
* 1.2 - Changed @2 key to @3
* - Put 2 spaces after year in @1.
* - Added @2 for Standard Time '5:26 pm', not Military '17:26:37'
* 1.3 - Shortened @1 33 bytes.
* - Added @5 by Mel Hulse.
* - Added @4 and @h.
* 1.3a- Minor documentation changes.
*
*
* Tom Hogshead, Friday, July 12, 1991 at 10:26 am (entered with @4)