Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 1,151 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Simple way to simulate mouse-click with a key #397211
03/16/12 15:33
03/16/12 15:33
Joined: Nov 2003
Posts: 433
The Netherlands
T
Toon Offline OP
Senior Member
Toon  Offline OP
Senior Member
T

Joined: Nov 2003
Posts: 433
The Netherlands
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 wink if possible...

Thanks for reading.

Re: Simple way to simulate mouse-click with a key [Re: Toon] #397223
03/16/12 18:35
03/16/12 18:35
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
Im no expert ,thinking send a windows message maby sys_message or how bout butten_state


Compulsive compiler
Re: Simple way to simulate mouse-click with a key [Re: Wjbender] #397243
03/16/12 20:54
03/16/12 20:54
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
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.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Simple way to simulate mouse-click with a key [Re: Espér] #397711
03/22/12 16:15
03/22/12 16:15
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Use sys_message(STRING* message);

Re: Simple way to simulate mouse-click with a key [Re: PadMalcom] #397713
03/22/12 16:52
03/22/12 16:52
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Noone heard somethignfrom windows apis? ^^
Try them.

mouse_event(MOUSEEVENT_LEFTDOWN, x, y, 100, 100));
mouse_event(MOUSEEVENT_LEFTDOWN, x, y, 200, 200));

Re: Simple way to simulate mouse-click with a key [Re: Ch40zzC0d3r] #397723
03/22/12 19:37
03/22/12 19:37
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
What should that 100, 100 / 200, 200 do? 0,0 would be correct I think wink

(Also, there is one bracket to much ;))

Re: Simple way to simulate mouse-click with a key [Re: Rei_Ayanami] #397726
03/22/12 20:06
03/22/12 20:06
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
You probably also want to send a MOUSEEVENT_LEFTUP event afterwards =/


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1