Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date stamp in Command Window
Message
De
13/01/2008 10:38:20
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/01/2008 08:12:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01281107
Message ID:
01281456
Vues:
9
>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.

Now you will hate us for doing this in so many different ways... here's my intellisense script I use for commenting my code - and it works in the command window as well. Not the same as having the timestamp inserted automatically at launch, but close:
lparam oFoxCode
oFoxCode.ValueType="V"
lnHours=SET("Hours")
set hours to 24
lcSetDate=set("date")
set century on
set date ymd
lcReturn= "*["+ttoc(datetime())+"] " +getwordnum(sys(0),2, " #")+ " -"
set hours to lnHours
set date to (lcSetDate)
return lcReturn
As you see, most of it is to set the date and time to American Standard format.

Alternately, if you have a "command=Do xxx" line in your config.fpw, you can add this line to xxx.prg:
STRTOFILE(TEXTMERGE("*--<<DATETIME()>> - <<SYS(0)>> ")+0h0d, HOME()+"_command.prg",1)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform