Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Yesterday's command window
Message
De
26/04/1999 16:09:39
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
 
 
À
23/04/1999 16:34:31
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00211647
Message ID:
00212293
Vues:
49
>>Hi Daniel,
>>
>>You could write a short program to do and execute it each day. Try this:
>>m.whandle = _WFindTitl('Command')
>>IF m.whandle > 0
>>  * Make sure that the Command Window is selected
>>  = _WSetPort(m.whandle)
>>  KEYBOARD "{CTRL+A}" PLAIN
>>  KEYBOARD "{CTRL+C}" PLAIN
>>  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)
>>ENDIF
>>Note that it does require that Foxtools be loaded before execution.
>
>Hi George,
> That's cool stuff. Thanks. Now one final question. Do you know any way to get that stuff back into the command window, the next time I start up, so that it is like I am just continuing the session?
>
>Thanks.
>
>Daniel

To restore yesterday's command window without actually executing all the commands, try running a program like this:

* Assumes yesterday's command lines are stored in command.txt

LOCAL lnFile,lcText
lnFile=FOPEN("command.txt")
DO WHILE !FEOF(lnFile)
lcText=FGETS(lnFile)
KEYBOARD "*!* "+lcText+'{ENTER}'
ENDDO
=FCLOSE(lnFile)
Elyse Pomerantz
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform