Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I simulate the command window in an application
Message
 
 
To
01/11/2002 13:57:45
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00717951
Message ID:
00717969
Views:
18
Yes, there are several ways to do what you want...
The simpliest is to create a form with a textbox in wich you write the VFP's command and a coomandbutton with the macrosubstitution for the textbox´s value..

The commandbutton must have in the click() event:
******************************************************
_macrox=thisform.textbox1.text
if !empty(_macrox)
&_macrox
else
thisform.release
endif
******************************************************

for example if you write WAIT WINDOW 'This is a test' in the textbox and press the commandbuton, it will evaluate and execute the content of the textbox..

There is another way, you can see the thread # 687079 message # 689009, there is mentioned the link to http://www.cycla.com/software/codeblock.htm

Hope this helps...





>I have several compiled applications running on computers that have only the FoxPro6 runtime files installed. Occasionally I would like to get in and fix something. If I had full FoxPro installed, I could fix from the command window.
>
>I have prepared a small app that I use to open files and browse tables that are not readily viewable in the application. I can modify records one at a time, create and delete index tags, reindex, pack, zap, etc because I have build those specific functions into my utility app. It would give me much more capability in the utility app if I could simply type a valid FoxPro command into a text field and then someway execute that command. For instance, if I had a series of records with the wrong date I could do something like:
> Replace all trandate with date()-5 for trandate = date()-4
>to simply move the date in those records back one day.
>
>Is something like this even possible in a compiled application? Obviously I would have to use the utmost discretion with this power.
Previous
Reply
Map
View

Click here to load this message in the networking platform