Make Mouse Click

BlitzPlus Forums/BlitzPlus Programming/Make Mouse Click

Arem(Posted 2006) [#1]
Any way to make a mouse click event? I want the program to click the mouse, not the user.


Grey Alien(Posted 2006) [#2]
This is only possible with Windows API calls where you place an event in the event chain. I've done it with keys before. Or find a different solution to the problem that doesn't involve an auto-mouse click.


Arem(Posted 2006) [#3]
I kind of figured. But, do you know the API calls?


Grey Alien(Posted 2006) [#4]
you need to use Mouse_event(). Don't know how exactly. Here's a thread to get you started:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=393122&SiteID=1


Regular K(Posted 2006) [#5]
DECLS
mouse_event%(flags%,x%,y%,data%,extra%)

EXAMPLE
mouse_event(2,0,0,0,0)
mouse_event(4,0,0,0,0)


Mess around with the parameters to control how long it clicks, if it clicks down then releases, etc. Its a bit tricky.