tags:

views:

25

answers:

1

Hi my program launches a 3rd party program with a few switches to update itself. Once these updates are complete I need to manually click save from the applications menu. This can be done via the keyboard (Alt Gr + M then Alt Gr + S)

The application will take several seconds to load at which point the application will open maximised and the save option will be enabled.

Can anyone suggest a method or example for doing such a thing? Monitoring a lauched process? Macro?

Thanks.

A: 

I imagine that the most stable way of achieving this is to try to find out which message that is posted to the window when the save command is invoked. Then you can p/invoke SendMessage to send that message to the application window. That way you will not rely on that window being active for the command to be carried out properly.

Fredrik Mörk
I'm currently starting the application as a process and using "System.Windows.Forms.SendKeys" to send the Alt Gr + M then Alt Gr + S to initiate the save. Although I noticed there is no Alt Gr (Right Alt) option in SendKeys!
madlan