Click to See Complete Forum and Search --> : Outputing text to a separate console window


kfl
March 19th, 2001, 12:39 AM
Hi there,

I am trying to find out whether there is a possibility to do this. I have an existing console app that is running. Basically it keeps track of the inventory. However, because the system was designed so badly, you can only do manual key-ins. I am thinking of writing an separate application that can actually get data from an Excel spreadsheet (this is still OK), and pumps those values into the console app as if I am typing them from the keyboard.

Basically, I need an app that is able to simulate key-press and direct them to the console app instead of my own application.

Is anyone able to throw some light on this? The solution can be in VC++ or VB.

Thanks, people, I'm going crazy doing manual key-ins for 1000+ products.


kf

KF

ajayguru
March 19th, 2001, 10:26 AM
Well it depends on how you want do it. What I think could be a solution is to use ADO objects in either a VC++ or a VB Console Application to connect to the excel sheet and access its data. This data then can be shown on the screen the way you want with a time delay between two displays.
In case of VC++ it will be a Win32 Console Application and in case of VB it will be an application that has the start form as a Sub or Module.
I hope it helps!!

kfl
March 19th, 2001, 07:46 PM
Hi,

It was more difficult to explain than I first thought. OK, the console app that I was talking about has been written by somebody else. It allows a user to search for product using the product code, and thereafter you can change the figures on the page displayed and save them.

Because of the way it works, this whole process is largely manual. Imagine doing that for 1000+ products. Looking each one up using the product code, check the figures with the Excel sheet, and if it has changed, update the new figure into the console app.

So, I was thinking of writing an application that can read the Excel sheet (this is no problem at all), and then activate the console app (not writing a new console app of my own), and simulate key-presses as if someone is manually searching and keying in those new values.

My problem is that I have not been able to get a valid handle to the console app so that I can start simulating key-presses to it.

Wonder if any of you out there can help me? Thanks, people.



KF