J
John Dalberg
I have an app that keeps popping up a windows with a 'Yes' or 'OK' button
on it. I am trying to write a little app that automates hitting the enter
key so I don't have to do it myself.
I used the FindWindow method to get a handle of the window and then issued:
SendMessage(hwnd, 273, 0, IntPtr.Zero)
to send an ENTER key to it but it didn't work.
If I need to get the handle of the 'OK' button, how do I do it? (How do you
loop through the buttons and find the handle you need?) If I just need to
send an ENTER key to the window, is the method above correct. hwnd is the
handle of the popup window and 273 is the decimal value for ENTER (0x111).
Thanks.
John Dalberg
on it. I am trying to write a little app that automates hitting the enter
key so I don't have to do it myself.
I used the FindWindow method to get a handle of the window and then issued:
SendMessage(hwnd, 273, 0, IntPtr.Zero)
to send an ENTER key to it but it didn't work.
If I need to get the handle of the 'OK' button, how do I do it? (How do you
loop through the buttons and find the handle you need?) If I just need to
send an ENTER key to the window, is the method above correct. hwnd is the
handle of the popup window and 273 is the decimal value for ENTER (0x111).
Thanks.
John Dalberg