Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running another program in Fox

Status
Not open for further replies.

intel2000

MIS
Jan 22, 2003
25
US
Within my program I have a command that executes another program. After this program is executed it askes for a name, i manually enter in the name, a report is generated, and returns back to my original program.....

Now this name that its asking for, is already a variable that I have set in FOX. So is there a way for to get Fox to automatically inter that name for me?

Ross Lund
 
Ross,
I believe this is more a question to the developer of that other application. Does it take a commandline parameter? Is it a standard Windows program that would take a user message from SendMessage() to satisfy the input requirement?

Rick
 
It is unix sco version 5.//the other program is written by scr solutions and is encoded, not alterable.

When this program is executed it is asking for a file name. It runs a simple report based on the name you enter, and it outputs the report to a .zon file. From there that program ends, which puts me back to the original program. My original program then grabs that outputed file and copies it to disk.

I would guess fox may be able to automaticall spit out that file name, but how would it be able to insert that name? Isnt the original program halted while the new program runs?
I'm not sure at all what the commands would be to do something like this.
 
Ross,
Am I to understand that you are running FoxPro for UNIX? If so, I haven't a clue - I've been "stuck" in the Windows world since Win 3.0!

Rick
 
Somewhat following Rick's response above, you might try:

AppCtrl - Controlling external Windows Apps
This library of functions provides the ability to interact with other top level Windows applications.

* aWindows returns an array (title and window handle) of all top level Windows applications.
* xFindWin returns the window handle of other Windows apps based on partial/contained strings.
* SetFocus activates other Windows apps by window handle.
* SendKeys sends keystrokes to the active Windows app with using a DLL implementation of the VB SendKeys command.

From:

I ran across this and have not tried it.
I have no idea if your Unix app will accept it or not. Who knos, perhaps it might work for you.

Good Luck,
JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top