Im trying to play some android games on PC, but in FPS games you need to click and hold to move camera with your mouse.
I dont want to always hold the mouse button, so how to do a script to always click and hold?
I just want something to when I press the mouse 1 the button will keep pressed and if i press again stop pressing.
Thanks
How to do a always clicking and holding script?
-
- Posts: 1
- Joined: 19 May 2017, 19:24
Re: How to do a always clicking and holding script?
If you want it to be held down, use Click down or Send {LButton down}. Then when you want it to be released, just use Click up or Send {LButton up}. If you want the same key to do either, you can use variable:=!variable - let me explain that bit. variable is a custom variable, almost any name you want. The :=! bit is a sequence of two operators - the := (assign) and ! (logical-not) operators. What all of that together does is change the value of variable from true to false or false to true. You can then use an if statement like If variable, and if variable's value is true, then the if statement is true. Using an If statement (and in this case with an else) let's your hotkey take different actions.
It wasn't clear to me what Hotkey you want, but I think you wanted your LButton:: to be the hotkey.
It wasn't clear to me what Hotkey you want, but I think you wanted your LButton:: to be the hotkey.