|
-
September 18th, 2007, 09:43 AM
#1
SendNotifyMessage - Controlling another process?
I'm trying to automate Acrobat Pro 7 with the SendNotifyMessage win32 api command from my C# app. I created a .net windows service which watches a folder for a specific file. With the correct file the service launches the acrobat process via Process.Start() then uses SendNotifyMessage to simulate keypresses to get to the correct menu option.
The problem Im having is the SendNotifyMessage(hwnd_main,Win32.WM_COMMAND,0x19f3,0) infrequently works. At times the command is issued and the Enable Comment Save As dialog box appears as expected but other times its as if the command silently fails and nothing happens on the main window.
Is there something i can do to get more of a consistency when sending messages to another process? Better win32 api commands to check out?
I am using SendNotifyMessage because the resulting dialog box would normally not return control back to my app until it was closed down; this win32 function is async and so allows me continued control over the running process, and i also like the fact that i can specify a specific windows rather than relying on the current window with focus.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|