0

Hi. How can i get handle of button if i don't know it's id? I tried to get it's id with AutoIt and i failed. AoutIt Windows Info doesn't reconsie it as button. I mean i moved cursor on the button and nothing appeared in control tab. Maybe i can send 'ENTER' to window? Because that button is deafault button. Any ideas?
Thank you

Edited by lukename: n/a

2
Contributors
4
Replies
6
Views
7 Years
Discussion Span
Last Post by lukename
0

I tried

PostMessage(hWnd, WM_KEYDOWN, VK_RETURN, 1);
PostMessage(hWnd, WM_KEYUP, VK_RETURN, 1);

but it's not working. Please help me guys

Edited by lukename: n/a

0

Also tried

SetFocus(hWnd);
keybd_event(VK_RETURN, 1, 0, 0);
keybd_event(VK_RETURN, 1, KEYEVENTF_KEYUP, 0);

Fail again. Please someone... I really need it

Edited by lukename: n/a

0

PostMessage will send the message to the hWnd not to the button. To make myself clear, consider this: PostMessage can send keys to an inactive window.
And IIRC the 2nd arg to keybd_event() is I guess the Scan key code.

0

I changed ScanCode to 28 and now it works. Sometimes... I made button wich i need to press to send ENTER to other program. If i press that button one time nothing happens, but if i press that button lots of times it send lots of ENTER. Any ideas?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.