Capturing Batch File or Command Line apps output in *my* app....

Capturing Batch File or Command Line apps output in *my* app....

Post by jim conalle » Tue, 26 Mar 1996 04:00:00



How does one do it?

I would like to write an app that will execute another app and capture it's stdout (and possibly feed
its stdin).

Any ideas? pointers?
--
jim conallen, techno-geek for hire             computer programmer, n.; a device for

http://www.wp.com/ConallenSoftware

 
 
 

1. Close or control any windows app from command line or batch file by calling WinAPI

WinAPI Suite (http://junior.apk.net/~leonid/guiless/wainfo.htm) includes
FindWindow.exe, SendMessage.exe and DropFiles.exe, with extended set of
command line parameters, allowing piping output results of one to another. I
was really amazed on how much you can do with just these three utilities -
pretty much anything! And combined with Batch Server
(http://junior.apk.net/~leonid/guiless/wainfo.htm) you can run it on any
remote computer through TCP/IP!

Hell, I was actually able to run and control GUI application on NT as a
service - hard to debug, because you can't see anything, but it does work! I
believe NT uses some virtual desktop for services, so now it IS possible to
run GUI app as a service!

Even if you are not too keen with WinAPI - you still can benefit. The
website has several tutorials with sample batch files from simple (closing
Notepad) to advanced (creating and sending new mail with attachment in
Outlook Express). Finally, if you can't figure out how to automate the
task, you are always welcome to drop me a line - most likely, I'll be able
to help you.

I actually programmed this tool originally for myself, because I like to
automate any routine work on computer. Starting a windows app is not a
problem, but terminating one often is. Then I needed to automate sound
converter, which claimed to support batch conversion, but after I bought it,
I discovered it needs some clicking and typing - big disappointment! That's
when I decided to write something generic that allows me to control/script
any GUI app. Keyboard macro inherently unsafe, they depend on what windows
open, in which order and where the focus is.

The result - WinAPI Suite! check it out at www.guiless.com

Get GUI-less!
Leonid
---

http://www.guiless.com
Guiless - Batch Suite Home

2. Searching Quickdraw3d

3. MFC and DOS apps - Redirecting console output to an MFC app (Newbie)

4. Anyone using Ricoh CDR with NT?

5. Opening apps and multiple files from command line

6. web servers

7. need app to automatic/batch capture still frames

8. Apache, ASP and database

9. Capturing console app output?

10. Java app calling Java app through command.com loses env vars

11. *.PIF files for DOS apps and batch files

12. Can eVB be run to build apps from the command line?

13. Anyone have a simple wxBase command line app?