Creating an application that can control an existing application.

J

Jay Dee

I was wondering how hard it is to create an application that can
control an existing application.

The application is used to input text data into a large back end
database that I have no other means of accessing.

The original application in question is many years old and difficult
to operate. Main input is using the keyboard entering characters one
line as a time, I carnet even type of the end of a line onto the line
below, I have to manually use the arrow keys to move the curser to the
start of the next line before continuing to type.

It is not possible to set the position of the curser with the mouse
although it is possible to use the mouse to highlight text and click a
button to copy it to the clipboard, although shortcuts like (Ctrl)(C)
for copy do not work.

I can create stand alone applications using CSharp and understand most
functionality of the language but I have never attempted to use COM or
anything of that level before.

Any suggestions or pointers as to a means to overcome this issue would
be much appreciated

Thank you

Jay Dee
 
I

Ignacio Machin ( .NET/ C# MVP )

I was wondering how hard it is to create an application that can
control an existing application.

The application is used to input text data into a large back end
database that I have no other means of accessing.

The original application in question is many years old and difficult
to operate. Main input is using the keyboard entering characters one
line as a time, I carnet even type of the end of a line onto the line
below, I have to manually use the arrow keys to move the curser to the
start of the next line before continuing to type.

It is not possible to set the position of the curser with the mouse
although it is possible to use the mouse to highlight text and click a
button to copy it to the clipboard, although shortcuts like (Ctrl)(C)
for copy do not work.

I can create stand alone applications using CSharp and understand most
functionality of the language but I have never attempted to use COM or
anything of that level before.

Any suggestions or pointers as to a means to overcome this issue would
be much appreciated

Thank you

Jay Dee

what control you want to have over the application?

You could try to send windows messages to the app. It would work as if
it was the user was using the keyboard.
 
D

Dude

I was wondering how hard it is to create an application that can
control an existing application.

The application is used to input text data into a large back end
database that I have no other means of accessing.

The original application in question is many years old and difficult
to operate. Main input is using the keyboard entering characters one
line as a time, I carnet even type of the end of a line onto the line
below, I have to manually use the arrow keys to move the curser to the
start of the next line before continuing to type.

It is not possible to set the position of the curser with the mouse
although it is possible to use the mouse to highlight text and click a
button to copy it to the clipboard, although shortcuts like (Ctrl)(C)
for copy do not work.

I can create stand alone applications using CSharp and understand most
functionality of the language but I have never attempted to use COM or
anything of that level before.

Any suggestions or pointers as to a means to overcome this issue would
be much appreciated

Thank you

Jay Dee

Is it a console application? If so, it should be pretty easy.

Just start it using

System.Diagnostics.Process

Then it exposes the Standard input and standard output streams.
 
J

Jay Dee

I would be tempted to say no it is not a console application as it has
a row of button along the top for thinks like copy/past and I think
console apps are all text.

Windows messages would probably work if it is possible to send
keyboard and mouse tringers while the application is at least
minimised, if not hidden.

Do you think it will be possible to send mouse/keyboard requests to
the application even if it is not visible (minimised, preferably
hidden)

For example mimic:
Set the mouse to the top/left corner of the app.
Click and hold left mouse button
Drag to bottom/left
Release mouse button
Move mouse over copy/past button
Click button to copy text to clipboard

Then I could easily process the text before firing keyboard triggers
to the app to make modifications.

This probably sounds stupid and useless to most but I have to input/
modify a lot of text using this app and am thinking a week or to
diversion to do this could prove invaluable.

Thank you for your help

Jay Dee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top