How Do I Make a Macro to Click Left Click Continuously

  • Members
  • 6 posts
  • Last active: Sep 27 2007 11:46 PM
  • Joined: 26 Sep 2007

Hi all, I'm new of this program.. I'm trying to create a script that will make my mouse singleclick continous..

SetMouseDelay, -1
^C::Send {LButton}

That's it..

I've 2 problems:

1) There is a delay between first click and the after clicks (that are continous) how I can resolve it? The mouse does TIC-TICTICTICTICTICTIC... I wanna remove this delay between the first and the second..

2) I wanna use ^{LButton} (ctrl+leftbutton) to do this macro.. But if I use ^{LButton} the click that the mouse do became only one.. Why?

3) It's possible to enable or disable the script with one key (ctrl for example) just to use the normal click when I don't need autoclick, and then pressing CTRL without holding it, use the simply left mouse button to do the autoclick?

Thank you and sorry If I was boring :roll: :oops:

  • Back to top

tic

  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007
SendInput {LButton Down}

will continually hold down left click until you press a button

  • Back to top

engunneer

  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005

also try $^LButton::

  • Back to top

zozzone

  • Members
  • 6 posts
  • Last active: Sep 27 2007 11:46 PM
  • Joined: 26 Sep 2007

SetMouseDelay, -1
$^LButton::SendInput {LButton Down}

It's right?

  • Back to top

zozzone

  • Members
  • 6 posts
  • Last active: Sep 27 2007 11:46 PM
  • Joined: 26 Sep 2007
SendInput {LButton Down}

will continually hold down left click until you press a button

Thanks..

But I need to continually click, not to hold it down.. With this code the button doesn't release.. And my click is only one TIC

  • Back to top

tic

  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007

<!-- m -->http://www.autohotke... ... highlight=<!-- m -->

my last post on there does that. when the scroll lock is on and you click, it will then continually click until you turn scroll lock off i believe

  • Back to top

zozzone

  • Members
  • 6 posts
  • Last active: Sep 27 2007 11:46 PM
  • Joined: 26 Sep 2007

http://www.autohotkey.com/forum/viewtopic.php?t=22726&highlight=

my last post on there does that. when the scroll lock is on and you click, it will then continually click until you turn scroll lock off i believe

Thanks! It works!

But when I click the continous click is unstoppable (I can only disactivate scroll lock to stop it).. How can I do to make it stop when I release the leftclick button?

  • Back to top

tic

  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007

perhaps something like this?

~LButton::  Loop {  	    GetKeyState, LButtonState, LButton, P    If LButtonState = U    Break    Else    Send {LButton}    Sleep, 20 } Return

the problem with it is though that you could only use it in the situation you speak of, as it will be annoying in windows if every time you hold left click too long it continuously clicks.

Edit: I've added in that you can turn it off with scroll lock being off:

~LButton::  Loop {  	    GetKeyState, LButtonState, LButton, P    GetKeyState, ScrollState, ScrollLock, T    If (LButtonState = "U") || (ScrollState = "U")    Break    Else    Send {LButton}    Sleep, 20 } Return

  • Back to top

zozzone

  • Members
  • 6 posts
  • Last active: Sep 27 2007 11:46 PM
  • Joined: 26 Sep 2007

Thanks! It works nicely! :)

  • Back to top

zozzone

  • Members
  • 6 posts
  • Last active: Sep 27 2007 11:46 PM
  • Joined: 26 Sep 2007

What are T and P after LBUTTON and SCROLLLOCK?

  • Back to top

tic

  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007

you should check the helpfile :?

but T checks the toggle state, as scroll lock is a toggle key, and P checks the physical state of the key, so that the send command doesnt retrigger the hotkey again, meaning that $ doesnt need to be used with the hotkey.

  • Back to top

Rikinky

  • Guests
  • Last active:
  • Joined: --

I'm interested in learning how to program, and i thought this software would be an interesting place to start.
How do I make the script:

~LButton::

Loop
{
GetKeyState, LButtonState, LButton, P
GetKeyState, ScrollState, ScrollLock, T
If (LButtonState = "U") || (ScrollState = "U")
Break
Else
Send {LButton}
Sleep, 20
}
Return

Into an executable file?
I've tried using notepad and saving it as "clontinuous_click.exe" and tried different encodings but it doesnt work...
what's wrong?
Do I need somethign else other than ".exe"??
thnx for ur help

  • Back to top

Z_Gecko

  • Guests
  • Last active:
  • Joined: --

Do I need somethign else other than ".exe"??
thnx for ur help

yes indeed. exe-files are much more than renamed text-files (open an existing exe-file in notepad to see).
fortunately ahk has a compiler:
select "Convert ahk. to exe." from the Startmenu to start the compiler.

but when ahk is anstalled, you don´t need to compile your scripts.

  • Back to top

sidd

  • Guests
  • Last active:
  • Joined: --

how 2 give command?????????? to the mouse or com. watever

  • Back to top

mdevkun

  • Guests
  • Last active:
  • Joined: --

What if i want to leave f9 press continuously ? how do i do that?

  • Back to top

castiglionethenobel.blogspot.com

Source: https://www.autohotkey.com/board/topic/21794-mouse-continuous-click/

0 Response to "How Do I Make a Macro to Click Left Click Continuously"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel