Gamestudio Links
Zorro Links
Newest Posts
Trouble getting data with IB Gateway
by richs. 07/16/20 13:04
Futures with IB
by jbhunter. 07/16/20 01:08
A9
by 3run. 07/15/20 19:07
Maximum Value
by AndrewAMD. 07/15/20 12:50
What are you working on?
by NeoDumont. 07/14/20 23:06
Engine window and DPI scaling
by Dooley. 07/14/20 20:27
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
8 registered members (Quad, AndrewAMD, 3run, richs, kvm, onoff, Michael_Schwarz, 20BN), 378 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Estripa, nowater, dasanc, DavidFdez, TraderKevin
18478 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: 747
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 747
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,108
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,108
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: 747
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 747
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