0

I have a third party program that I can not modify. It is Calypso for a CMM machine. It can automatically run parts to be checked for defects. The measurements it makes will be spat out as a PDF file that can be set to automatically print.

When Calypso outputs the Save As box to save it to the predefined folder, the File Name box is empty.

I'm trying to make a simple program that has a button on the second monitor that when it is pressed, will generate the time and date to be placed into the File Name box then saved.

I can do everything except I can't seem to get my program to be able to select and enter keys into the File Name box.

From my research I believe I need to use something to FindWindow and SendKeys.

All the examples I have found of it are kinda confusing.

If anyone can give insight into how I could do this, it would be greatly appreciated.

Thank you,

JonMotz
  • 9
  • 2
  • 1
    This sounds like a good use-case for [AutoHotKey](https://www.autohotkey.com/). If you really want to use C#, [here](https://stackoverflow.com/a/5712959/772086) is a good example of `FindWindow`. – Mike Feb 22 '19 at 23:01
  • 1
    I'll take a look into this AutoHotKey. From a brief look, it looks a lot better than trying to use C#. – JonMotz Feb 22 '19 at 23:05
  • AutoIt might need a mention where AutoHotKey is also mentioned ;) – Josh Gust Feb 22 '19 at 23:29

1 Answers1

0

After reading the two comments about simpler solutions to my issue compared to the unreliable nature of C# and UI automation, I went ahead and chose to use AutoHotKey.

Reason being is that the syntax is simpler then AutoIt and easier to learn what I need in order to accomplish my simple task.

Link to AutoHotKey : autohotkey.com Link to AutoIt : https://www.autoitscript.com/site/

JonMotz
  • 9
  • 2