Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Command Window and _Command.prg
Message
 
To
10/08/2005 12:16:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01039904
Message ID:
01039918
Views:
17
>Hi
>
>Does anyone know how to force the writing of the Command window content to the _Command.prg progamatically. I find it is a problem in my AppStart add-on.

Greg,

If I do:
lcSafety	= Set("Safety")
lcCmdFile	= Addbs(Justpath(Sys(2005)))+"_command.prg"
set safety off
Strtofile('* Test' + chr(13), 'c:\fox\_command.prg', 1)
set safety &lcSafety
modify file (lcCmdFile)
Then I see the changes in the command file, but, the problem is that if you have set resources on, the file will be overritten when you issue quit, and then you'll lose the changes, you will see that it works if you issue a set resources off prior to quitting.
"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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform