CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2014
    Posts
    3

    Can This Be Automated With C# (Or Another Language)?

    I have to do a tedious manual process at work using a third party application. The task mainly involves selecting items with the mouse, entering a few numbers, and then clicking a few more times to generate a report. The items that are selected and the numbers that are entered are based on what's in an Excel document.

    I'm wondering if there is a coding language that will allow me to automate this task, and I figured I should consult with experts before going on a wild goose chase. A few notes: This is on Windows, and I won't be able to modify the third party application at all. I'll basically have to take the software as it is and create an application that interacts with it, assuming that's possible.

    Lastly...and this is my biggest concern, part of the process involves clicking items on a list. If you take a look at the attached screenshot, you'll see an item called "TVGN" highlighted (the full list has more codes, of course). I do this manually by just reading my Excel document and clicking the corresponding item within the program. Would I have any way of identifying that "TVGN" item using code? For instance, I know that you can send mouseclicks with C#, but where I send the mouseclicks depends on being able to read "TVGN" within the computer program.

    Any thoughts or advice would be greatly appreciated.

    Name:  PAL Screenshot.png
Views: 373
Size:  3.8 KB

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Can This Be Automated With C# (Or Another Language)?

    Look at Active Accessibility or UIAutomation in msdn.

  3. #3
    Join Date
    Jan 2014
    Posts
    3

    Re: Can This Be Automated With C# (Or Another Language)?

    Thanks. Will the issue I mentioned (see the screenshot) be a problem? I can't modify that third-party application I mentioned, and I doubt I'll be able to get in touch with its developers. Will that pose a problem for Active Accessibility or UI Automation?

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Can This Be Automated With C# (Or Another Language)?

    I'd look at the mfg's website to see if they have any API or SDK for the software. If it's a spreadsheet using Excel, it shouldn't be a problem.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jan 2014
    Posts
    3

    Re: Can This Be Automated With C# (Or Another Language)?

    Well, the spreadsheet would list the items that need to be found within the program. So, the spreadsheet would say "TVGN", and I'd like to write C# code that would read the spreadsheet, then access the third party application and find "TVGN" on its list, shown in the screenshot (and so on for other items in the spreadsheet).

    If I can't get access to an API or SDK, will this still be doable?

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Can This Be Automated With C# (Or Another Language)?

    Quote Originally Posted by kestefon View Post
    Thanks. Will the issue I mentioned (see the screenshot) be a problem? I can't modify that third-party application I mentioned, and I doubt I'll be able to get in touch with its developers. Will that pose a problem for Active Accessibility or UI Automation?
    I don't know. Download the Active Accessibility SDK http://www.microsoft.com/en-us/downl....aspx?id=21596.

    Then use the AccExplorer32 tool to see if it will identity the rows and/or cells. If it can, then you can use aa to read the data. If it can't, you are out of luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured