Jump to content

AutoIt and UI management via c#


Mudoch
 Share

Recommended Posts

So first let me describe my challenge.

I use an external windows application to process an XML file. the process provide a result XML file and a printed output both of which is needed by the enduser. 

The application is maintained by a company that offers 2 solutions for the process a desktop application and an API.  The API is very limited and requires the use of the application for many functions. The API also limits the printed output, it's the API design or the highway. The Application allows the end user modifications to printed output.

I've been using the Application for years but recently the manufacture has changed hands and of course changed focus. Recent changes has changed the desktop application to require a limited user interaction and that presents an issue with required output.  I've reported this "glitch" and it's taken 40 hours of calls to support with no answer as to a fix to work as documented.

Recently I've cobbled together using AutoITX.DLL a patch to my VBA class project that does this work.  

My goal and the reason for this post, I want to port to C# and .net core that vba Class.

Here's what the VBA app does:

 

Link to comment
Share on other sites

Sorry about that somehow the message got posted while I was typing.....

The original VBA app worked as follows and used only VBA Functions/Methods to control the External app as follows:

*     Creates XML request

 *    Starts external Application

*     Looks for Output File to be exclusively accessible

*    Processes return XML for for results

The current version creates the result file immediately and releases it, then prompts operator to press OK then re-write the file.

in the VBA class I now use AutoIT to look for the window with the prompt and to confirm the OK button exists, it does not until the process is finished. I then send Enter to window and then begin to validate the output file is accessible exclusively.

As I said I want to port this functionality to C# Class.  So I'm a bit stuck with the use of AutoIt under .net as I've seen a post or two regarding not able to find child windows and controls.  Any sample c# code available to get me started?

I've got 80% of the class written and was about to finish off the external app launch and control when they released the latest "glitch".

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...