Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Imhotep, opm), 785 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Mouse_Left - any way to emulate? #479934
05/05/20 19:04
05/05/20 19:04
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
I think this is something that should be easy, and I am somehow just missing it ... or it's something so difficult that I would have to write some kind of custom dll to get it to happen.

Is there an way to emulate a mouse click? I can move the mouse pointer with a controller, but I cannot make it so it can click on buttons.

I actually used this code:
Code
if(joy_1)
{
     mouse_left = 1;
}


I know it's not meant to be used that way, but surprisingly it did not crash, and the mouse buttons did respond to it, but just the buttons, it did not call the function.


Last edited by Dooley; 05/05/20 19:04.
Re: Mouse_Left - any way to emulate? [Re: Dooley] #479936
05/05/20 21:20
05/05/20 21:20
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
Just include windows.h and use these lines

Code
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
wait(1); //this is mandatory
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);



Last edited by alibaba; 05/05/20 21:20.

Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Mouse_Left - any way to emulate? [Re: alibaba] #479937
05/06/20 03:25
05/06/20 03:25
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Oh, awesome! Thanks for that. I have never been able to wrap my head around that windows.h thing fully. I should get used to looking into it.


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