gmcl_mouseclick

Noticed gmod had no default functions for doing this and wrapped this together at a request. Figured someone could use it.
Useful if you want to simulate clicks on derma panels and the like.

Functions:



mouse.Click(MouseCode)
mouse.Press(MouseCode)
mouse.Release(MouseCode)


Mouse Codes:



MOUSE_LEFT
MOUSE_RIGHT
MOUSE_MIDDLE


Put gmcl_mouseclick.dll in lua/includes/modules

Example:
Do I even need one?
[lua]
require “mouseclick”

mouse.Click(MOUSE_MIDDLE)
[/lua]

mouse.Press holds the button until mouse.Release is called.

Cool.

Who’s the dumbass rating everyone dumb in this section?

some guy made a script

what

Auto Dumb rate script

We’re dumb D:

that truly did deserve the script to tag you

Exactly. But I didn’t add 4 and 5. Those are hardly used outside the game.

Why stop at mouse though? Why not do the whole keyboard =p

Nice. This will prove to be useful someday.

How about mousecontrol so you can set the mouse position in the screen? :buddy:

gui.MousePos handles that. I don’t know if it gets positions outside the game screen. I don’t really see a need for that.

Came in handy for me once

Oh, you said set.

gui.SetMousePos

Oh never seen that before, thanks :3:

Haha, fanny module^^

Yea thanks again Sippeangelo this came in handy. I can now use my wired xbox 360 controller to totally control gmod (except chat)