Software Archive
Read-only legacy content
17061 Discussions

Need help with CONAGENT (console agent)

WSinc
New Contributor I
1,176 Views
When opening a console application, I get this very limited window with no scroll bar, which is rather awkward when you have a lot of debugging output. The output disappears after 10-15 lines. This means that the user has to put in lots of PAUSE statements to keep it from disappearing.

I have played around with making the font smaller, but that does not modify the number of lines. Ideally, I would like to have a BIG window with a small font, or at least have a scroll bar so I can access the disappeared text.

Actually another workaround is to be able to PIPE the disappeared text to an external file. With UNIX you can pipe standard output to a disk file but I don't think I can do that in Windows 98.

Perhaps there is an article you can point me to where this is covered in detail. I tried a search but got no results.
0 Kudos
9 Replies
Steven_L_Intel1
Employee
1,176 Views
Yes, you can pipe program output to a file - in fact, the syntax is pretty much the same as it is on UNIX:

progname.exe > file.txt

On Windows 98, you're limited to 50 lines of buffer. Switch to Windows NT/2000, and you can make the buffer as big as you want.

Steve
0 Kudos
WSinc
New Contributor I
1,176 Views
I tried fooling around with it some, but apparently CONAGENT can only be called by WINDOWS, not in a batch file. It is used by virtually all the Visual Studio languages and when you invoke an EXE (as in the DEBUG release) it is invoked there as well. In fact, the batch files in MS-DOS use it also, any console application.

The trouble is I can't control the properties of the console window before opening it, or at least there is no way to force it remember what I used last. Do you think there might be a Visual Studio guru there who knows the intimate secrets on how to do this?
0 Kudos
Steven_L_Intel1
Employee
1,176 Views
Find CONAGENT.EXE - in Windows or WindowsSystem - right click and select Properties. You can change the defaults there. Also look to see if there is a _DEFAULT.PIF on your system, and if so, change its properties too.

Again, under NT/2000, this is both easier and more flexible. I highly recommend moving to Windows 2000 if you're using your computer for more than the latest 3D games. Your programs will run faster, you'll have more features available, and the system will be more reliable.

Steve
0 Kudos
durisinm
Novice
1,176 Views
I support a large Fortran application that runs on Windows 9x/NT/2000. If you're stuck on Windows 9x, you can get scrollback functionality in MS-DOS console windows by using a utility program, PERUSE, written by Bob Flanders and Michael Holmes. See PC Magazine, "PERUSE Your 'Lost' Screen Data at Leisure,' April 12, 1994, p. 321. It's a free program as far as I know.

Mike Durisin
0 Kudos
WSinc
New Contributor I
1,176 Views
Thanks to Steve's help, I was able to get a large window and that relieved the problem to some extent. I could not redirect the output and still use the debugger though. Actually that approach causes one to lose the prompt information need to debut the application.

Do you think that magazine issue would still be available, or is there a way to contact the author(I)? Seven years is a long time.

Having been a "Fortranner" for over 30 years, I'm curious, what is your large application? If not classified, of course.
0 Kudos
Steven_L_Intel1
Employee
1,176 Views
The PERUSE utility is still available from the PC Magazine web site here.

Steve
0 Kudos
durisinm
Novice
1,176 Views
The application is SimuSolv*, a mathematical modeling and parameter estimation tool for use with systems of ordinary differential equations, algebraic differential equations, some simple partial differential equations, and others. At one time, Dow Chemical, my employer, sold the software externally. It stopped doing that in 1997, but Dow still uses it in-house.

Mike Durisin

*Trademark of The Dow Chemical Company
0 Kudos
WSinc
New Contributor I
1,176 Views
It seems like every company has their own version of something like that.
I used one for vehicle modelling (Titan IV, etc.) but we never got into partial differential equations. Where is your employer located?
I'm kind of surprised they haven't pushed into converting it to C++, even though I think Fortran is much better for this kind of application.

Anyway, I downloaded PERUSE, will try it sometime today.
Thanks very much for your suggestion.
0 Kudos
durisinm
Novice
1,176 Views
Dow Chemical has locations worldwide. I'm located in Midland, Michigan. The company HQ is also here.

Mike Durisin
0 Kudos
Reply