Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Yesterday's command window
Message
 
To
23/04/1999 17:07:04
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00211647
Message ID:
00211862
Views:
41
>Hi George,
> I was hoping to get it back into the command window without running through the commands again, just incase I did not want to to through them again. :)
>
>Isn't there a way to get foxpro to open and existing file as the command window, instead of creating a new one? Or at least, have the contents of an exiting file dumped into the new command file at startup? Thanks again.
>
Hi Daniel,

I thought I had posted what follows last night, but the following works for saving the command window on exit (yeah, I've tested this < g >). Again, you have to load FOXTOOLS. If you use ON SHUTDOWN to execute this program, the contents will be dumped in the file command.txt:
_CLIPTEXT = ""
m.start = 0
m.finish = 2 ^ 16 - 1
ACTIVATE WINDOW COMMAND
m.whandle = _WFindTitl('Command')
IF m.whandle > 0
  = _EdSelect(m.whandle, m.start, m.finish)
  = _EdCopy(m.whandle)
  m.words = Words(_CLIPTEXT, CHR(13))
  m.handle = FCREATE("Command.txt")
  FOR m.i = 1 TO m.words
    m.line = WordNum(_CLIPTEXT, m.i, CHR(13))
    = FPUTS(m.handle, m.line)
  NEXT
  = FCLOSE(m.handle)
  KEYBOARD "{ctrl+end}" PLAIN
ENDIF
ON SHUTDOWN
QUIT
Now, this is half the problem. The other half I haven't figured out yet, but I'll post back whether or not I succeed.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform