cmd with FoxPro
cmd with FoxPro
Hello there. I have a Problem and hope someone can help me. I want to open CMD from the Fox Pro programm and put in an command. This works fine with sendkey - order. But I want the result of the Order in a Variable back in VFP. How can I do this?
cmd with FoxPro
Hello,
Another simple solution would be to save the result of your DOS program in e.g. %TEMP% as a file with a name you use to read the saved content in the Windows program.
Dick
I do not know Foxpro but in general it is possible to start a CMD line program and get output in the Windows Clipboard. See for example this link: https://stackoverflow.com/questions/308 ... -clipboardneewbee wrote:Hello there. I have a Problem and hope someone can help me. I want to open CMD from the Fox Pro programm and put in an command. This works fine with sendkey - order. But I want the result of the Order in a Variable back in VFP. How can I do this?
Another simple solution would be to save the result of your DOS program in e.g. %TEMP% as a file with a name you use to read the saved content in the Windows program.
Dick
-
- Posts: 200
- Joined: Wed Oct 09, 2019 6:51 pm
cmd with FoxPro
There were a few code snippets to open a "command window" on a program even in runtime. You must search old toolboxes from nineties - vfp3 to 6 probably. Or ask on one of vfp targeting sites. You still have to anchor those in code. Might be better to restrict such use cases to those already coding in vfp and having access to developer IDE including debugger (which probably would be even better for said use case!) and not depend on runtime add-on.neewbee wrote:Hello there. I have a Problem and hope someone can help me. I want to open CMD from the Fox Pro programm and put in an command. This works fine with sendkey - order. But I want the result of the Order in a Variable back in VFP. How can I do this?
my 0.02€
thomas
cmd with FoxPro
What is an 'Order' in this scenario? A number, string, object ?
There are many ways to do this from Visual Foxpro depending on the requirement and how much control you have over the external process you want to run.
You could use Windows Scripting Host, Windows kernel CreateProcessEX ... it depends.
There are many ways to do this from Visual Foxpro depending on the requirement and how much control you have over the external process you want to run.
You could use Windows Scripting Host, Windows kernel CreateProcessEX ... it depends.
cmd with FoxPro
I want the answer in a String like "File mit found"
I Open cmd over FoxPro and send command with sendkey Funktion.
And dir that I Neef the answer AS a String ti Work with ir in my programa.
I Open cmd over FoxPro and send command with sendkey Funktion.
And dir that I Neef the answer AS a String ti Work with ir in my programa.
-
- Posts: 200
- Joined: Wed Oct 09, 2019 6:51 pm
cmd with FoxPro
Google "foxpro command window runtime leafe", probably Github link to Ed's code for a foxpro command window, not a Dos/Cmd/Command window. Or just a form with a texbox to read a form.Or loop in Wait Window, build String, until CR is read....neewbee wrote:I want the answer in a String like "File mit found"
I Open cmd over FoxPro and send command with sendkey Funktion.
And dir that I Neef the answer AS a String ti Work with ir in my programa.
cmd with FoxPro
Hi long time ago there was pocketfox, which includes also a scripting engine. To run it, it needs a VFP runtime.
Maybe it’s still there on the web.
Another good source is vfpx at github.
HTH
Rainer
Maybe it’s still there on the web.
Another good source is vfpx at github.
HTH
Rainer