Page 1 of 1

send hotkey to mouseclick

Posted: Thu Sep 26, 2013 9:47 am
by bwolfsohn
trying to click a button on a dialog..
oInternetButton is a DCPUSHBUTTON
F9 is working; wtf pops up..

but, the button is not clicked..

suggestions ??

DCHOTKEY xbeK_F9 ;
ACTION {||(wtf 'here'). PostAppEvent(xbeM_LbClick,,,oInternetButton)} ;
GROUP 'HOTKEYS'

Re: send hotkey to mouseclick

Posted: Thu Sep 26, 2013 11:52 am
by Wolfgang Ciriack
Try it with PostAppEvent( xbeP_Activate,,, oInternetButton ) .

Re: send hotkey to mouseclick

Posted: Thu Sep 26, 2013 12:20 pm
by bwolfsohn
Wolfgang Ciriack wrote:Try it with PostAppEvent( xbeP_Activate,,, oInternetButton ) .
ding! ding! ding! We have a winner!!!

I was in the right church., just the wrong pew..

thanks so much..

Re: send hotkey to mouseclick

Posted: Fri Sep 27, 2013 5:17 am
by c-tec
Hi,
I use the ACCELKEY clause, this works for me
regards
Rudolf

Re: send hotkey to mouseclick

Posted: Fri Sep 27, 2013 5:35 am
by Tom
You don't need to send events to a pushbutton if you want the button's action to be initiated. Just do this:

Code: Select all

Eval(oButton:Activate)
This will evaluate the action codeblock of the button, as if the button was clicked.