>>This probably sounds ridiculous, but every once in a while I scroll up through the history in the Command Window to review something I have done recently. I would be nice (for me anyway) if there was a way to drop a Date stamp into it once a day so I could zero in on what I'm looking for a little easier. I've spent a few minutes trying to do this with no success.
>>
>>Short of typing in the date as a comment in the command box each morning, I can't figure out a way to do it.
>>
>>If anyone has any ideas on this I'd appreciate it.
>>
>>Thanks,
>>Larry
>
>Suppose you have a drive U: with lots of utility programs in the root, add there 2CLIPAST.PRG:
>
lparameter tcCommentstring
>
>private pcCommentstring
>
>pcCommentstring = iif( pcount() = 0, '*', tcCommentstring )
>
>_CLIPTEXT = ;
> pcCommentstring + ;
> chr(9) + ;
> padl( day( date() ), 2, '0' ) + ;
> '/' + ;
> lower( left( cmonth( date() ), 3 ) ) + ;
> '/' + ;
> str( year( date() ), 4 ) + ;
> chr(9) + ;
> getenv('username') + ;
> chr(9) + ;
> iif( at( '&', pcCommentstring ) > 0, '-' + chr(9), '' )
>
>keyboard "{ctrl+v}"
>
>return
>
>Suppose you have a prg that redefines some keys, add these two lines.
>
>
on key label F4 do u:\2clipast with '*'
>on key label SHIFT+F4 do u:\2clipast with '&'+'&'
>
>In this example the F4 and SHIFT+F4 keys have been redefined and can be used anywhere, so also in the Command Window.
Better to do it without using the _cliptext variable, though. Try to do it directly.
The macro idea is good.
If it's not broken, fix it until it is.
My Blog