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:
00717967
Views:
15
Hi Alan,

I've seen Rick Strahl demo this over the internet, where he has a vfp app that sits as a com server in a server and he sends it short commands via a web front-end.

He simply does macro expansion and over the wire, and being a com object, I don't think he can do a browse, but it does work.

If you upgrade to vfp7 you can even use the ExecScript() function, which will let you type whole prg's as opposed to single commands.

I just tested it and it works very nicely. I have an app that has a single form. I added a textbox (called txtCommand) and a button next to it. The button's click has:
Local lcCommand

lcCommand = Alltrim( thisform.txtCommand.Value)

&lcCommand
Apparently that's all there is to it.

Have fun!

Alex


>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.
Low-carb diet not working? Try the Low-food diet instead!
Previous
Reply
Map
View

Click here to load this message in the networking platform