Topic: Insert Date and TIme (1 of 6), Read 90 times
Conf: Basic editing, Block operations
From: Paul Knudsen
Date: Tuesday, October 12, 1999 02:02 PM

Insert Date and Time does literally that. Shouldn't it honor the setting and allow overwriting?

 


Topic: Insert Date and TIme (2 of 6), Read 91 times
Conf: Basic editing, Block operations
From: Deleted User
Date: Wednesday, October 13, 1999 08:11 AM

Hi Paul! If you're referring to the keystroke macro in KEY-MAC.LIB, you can fairly easily make it honor the insert/overstrike setting by capturing the condition with the INSERT_MODE command, and then using an IF test, using or not using the OVERWRITE option on the Insert_text (IT) command, depending on whether you are in insert or overstrike mode.
Rich Hureau

 


Topic: Insert Date and TIme (3 of 6), Read 86 times
Conf: Basic editing, Block operations
From: Paul Knudsen
Date: Monday, October 18, 1999 04:00 PM

Hey Rich,

No, I haven't got into macros much yet.

What I was referring to is simply a drop-down from the User tab.

 


Topic: Insert Date and TIme (4 of 6), Read 92 times
Conf: Basic editing, Block operations
From: Deleted User
Date: Tuesday, October 19, 1999 07:42 AM

I forgot about the default User Menu. This is implemented by the USER.MNU file in your Vedit subdir. You can get the Insert-date-time to honor your insert mode by doing the following:
-Edit USER.MNU
-locate the line following "Insert Date and Time" in the macro (it starts with "Out_Ins() Date(NOCR)...")
-substitute the code below - make sure it is all on ONE LINE (copy it from here and then eliminate the linefeeds).
Here is the new code:
Out_Reg(103) Date(NOCR) Type_Space(2) Time(NOCR) Out_Reg(CLEAR)
if (Insert_mode){
Reg_Ins(103)} else {
Reg_Ins(103,OVERWRITE)
}

This macro stuff is actually pretty simple, once you get the hang of it. I think you can see what I've done by examining the original code and the new code, and by looking at the Help file to see how the commands work. The OUT_ commands are a bit arcane, but very handy.

Rich

 


Topic: Re: Insert Date and TIme (5 of 6), Read 104 times
Conf: Basic editing, Block operations
From: Ted Green
Date: Tuesday, October 19, 1999 09:46 AM

Richard Hureau's macro is really clever and much more elegant than the
solution I had in mind.

Yes, the Out_Reg() and Out_Ins() commands are arcane, but can often
simplify what would otherwise would be a very complex macro.

Here is my less elegant solution:

#103 = File_Size
Out_Ins() Date(NOCR) Type_Space(2) Time(NOCR) Out_Ins(CLEAR)
if ( !Insert_mode){
Del_Char( -(File_Size-#103) )
}

One problem with this is that it won't work with a file which is
in overwrite-only mode. Richard's solution will work even in
overwrite-only mode.

 


Topic: Insert Date and TIme (6 of 6), Read 49 times
Conf: Basic editing, Block operations
From: Christian Ziemski
Date: Thursday, May 06, 2004 08:48 AM

On 10/19/1999 7:42:31 AM, Richard Hureau suggested an improved command in the USER.MNU to honor the setting of the insert/overwrite mode:

> Out_Reg(103)
> Date(NOCR)
> Type_Space(2)
> Time(NOCR)
> Out_Reg(CLEAR)
> if (Insert_mode){
> Reg_Ins(103)} else {
> Reg_Ins(103,OVERWRITE)
> }

I think it's worth to go into the std. USER.MNU.


I simplified it a bit:

Out_Reg(120)
Date(NOCR)
Type_Space(2)
Time(NOCR)
Out_Reg(CLEAR)
Reg_Ins(120,OVERWRITE*!Insert_Mode)


Christian