Posted By: Toon
Simple way to simulate mouse-click with a key - 03/16/12 15:33
Is there a simple way to 'simulate' a mouse-click (for clicking buttons) by pressing a key on the keyboard?
Btw; I understand that if I check the selected button with button-over event and start the function based on that it is possible too, but I want it the simple way
if possible...
Thanks for reading.
Posted By: Wjbender
Re: Simple way to simulate mouse-click with a key - 03/16/12 18:35
Im no expert ,thinking send a windows message maby sys_message or how bout butten_state
Posted By: Espér
Re: Simple way to simulate mouse-click with a key - 03/16/12 20:54
hmm.. you can activate the function with a key Hit, when you give the function to key_set.
and inside the function you ask FIRST if the mouse if over the button coordinates. If NO, return it.
Posted By: PadMalcom
Re: Simple way to simulate mouse-click with a key - 03/22/12 16:15
Use sys_message(STRING* message);
Posted By: Ch40zzC0d3r
Re: Simple way to simulate mouse-click with a key - 03/22/12 16:52
Noone heard somethignfrom windows apis? ^^
Try them.
mouse_event(MOUSEEVENT_LEFTDOWN, x, y, 100, 100));
mouse_event(MOUSEEVENT_LEFTDOWN, x, y, 200, 200));
Posted By: Rei_Ayanami
Re: Simple way to simulate mouse-click with a key - 03/22/12 19:37
What should that 100, 100 / 200, 200 do? 0,0 would be correct I think
(Also, there is one bracket to much ;))
Posted By: WretchedSid
Re: Simple way to simulate mouse-click with a key - 03/22/12 20:06
You probably also want to send a MOUSEEVENT_LEFTUP event afterwards =/