Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to load command window from my _command.prg?
Message
 
À
21/05/2005 13:08:23
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01016487
Message ID:
01016514
Vues:
10
>I have a separate foxuser for each project, which helps me a lot by keeping MRU lists separate for each one of them. When I quit VFP, the _command.prg is saved to the directory where current foxuser is. However, since I'm using the "Task Pane Manager - Environment Manager" to navigate between projects, VFP always reads the home()+"_command.prg" into the command window, so whatever I had in the local _command.prg is pretty much lost. I know I could modi comm _command and see what I did last time, but I wish there was something I could do in the Environment Manager to make it happen automatically.
>
>So, does anyone know how to load text into command window without actually executing it?

Well, I did something similar to this, each time we start VFP, I save a copy of _command in a backup folder (I keep in there 3 months (am I paranoid?) worth of _commands with a name format like _Command_UserName_Date), and I also add some customizable text to it, so when Foxpro starts, in the command window we have a text that looks like:
******************************************************
* Session started on (date) or (datetime)            *
******************************************************
First I read if the text exists, if it does, I do not add anything, so, if using just date, then we have only one entry for each date, but if using datetime, then each time VFP starts we get the entry, the text is table-driven so is configurable.

Now, the problem is.... I do not remember how I did it...

If I remember correctly, I created a prg that reads the _command.prg file, copies it to the backup folder with it's new name, then adds the customizable text and sets the resource on (its off in the config.sys). In the config sys, I have a line that runs this PRG, so when foxpro starts, the command history has the new entry that allows us to identify sessions (usually days), and I also know that I have a backup copy. Unfortunately, I think there was some trick to do either in the config or in the PRG, I can not remember, I can take a look on Tuesday...
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform