Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Multiple click script?


  • Please log in to reply
10 replies to this topic
MrWorld
  • Members
  • 4 posts
  • Last active: Jun 28 2014 06:04 AM
  • Joined: 26 Jun 2014

Hi I am fairly new to AutoHotKey and I am looking for a script that makes a set of keys for example (Ctlr+Rbutton) to right click 35 times instantaneously or as close to it. 

 

Please give me a script for this :D



Oldman
  • Members
  • 2475 posts
  • Last active: Feb 18 2015 04:57 PM
  • Joined: 01 Dec 2013

Like this ?

 

^RButton::Click 35 right
 


Si ton labeur est dur et que tes résultats sont minces, souviens toi du grand chêne qui avant n'était qu'un gland....comme toi ! (anonyme) ;)

L'art de lire, c'est l'art de penser avec un peu d'aide. (É. Faguet)

Windows 3.1. Collector's Edition.     (www.avaaz.org)


MrWorld
  • Members
  • 4 posts
  • Last active: Jun 28 2014 06:04 AM
  • Joined: 26 Jun 2014

Thankyou :D



MrWorld
  • Members
  • 4 posts
  • Last active: Jun 28 2014 06:04 AM
  • Joined: 26 Jun 2014

umm I am having a problem, when I ctrl+rightclick it only clicks 3 times? I am using this for a minecraft prison server where you sell by right clicking and it takes ages to sell a full inventory so is there a way to fix this problem?



Masonjar13
  • Members
  • 1517 posts
  • Last active:
  • Joined: 16 Sep 2012

The problem would be on the (lack of) delay. Here's one possible solution:

Loop 35
{
    SendInput {LButton down}
    Sleep 10  ; increase sleep if it's still not working.
    SendInput {LButton up}
    ; insert sleep if there are still problems.
}

OS: Windows 7 Ultimate / Windows 8.1 Pro | Editor: Notepad++


MrWorld
  • Members
  • 4 posts
  • Last active: Jun 28 2014 06:04 AM
  • Joined: 26 Jun 2014

so replace Lbutton with Rbutton?



Masonjar13
  • Members
  • 1517 posts
  • Last active:
  • Joined: 16 Sep 2012

Yes, sorry I had over-looked that.


OS: Windows 7 Ultimate / Windows 8.1 Pro | Editor: Notepad++


lynnfigg
  • Members
  • 3 posts
  • Last active: Dec 23 2015 09:25 PM
  • Joined: 30 Jun 2014

Hi im just looking for a simple multiple left mouse click for a facebook game, where im currently having to click literally hundreds of times to achieve a simple goal. I tried the above solution changing it to RButton::Click 50 left but this just reloads the page and does not do a mouse click (I did use the little uparrow at the start of the string, but it wont let me copy and paste in this text box and I cannot find it on my stupid keyboard). Any suggestions gratefully received. Im sure this is a very simple solution for most people but im a grandmother and not overly computer literate.



Masonjar13
  • Members
  • 1517 posts
  • Last active:
  • Joined: 16 Sep 2012

RButton is the right-mouse button, as the name suggests. LButton is the left-mouse button.


OS: Windows 7 Ultimate / Windows 8.1 Pro | Editor: Notepad++


RHCP
  • Members
  • 1228 posts
  • Last active: Apr 08 2017 06:17 PM
  • Joined: 29 May 2006

  (I did use the little uparrow at the start of the string, but it wont let me copy and paste in this text box and I cannot find it on my stupid keyboard). 

^RButton::Click 35 right

This will control click the right mouse button 35 times. The "^" represents the control key.

^RButton::sendInput {Click 35 right}

This will right click the mouse 35 times.

 

By default the send command will release modifiers keys (these include the control key) before sending the keys.

 

If that doesn't help sometimes a delay is required

^RButton::
loop 35
{
	sendInput {Click} ; clicks the left mouse at its current location
	sleep 20
}
return 



lynnfigg
  • Members
  • 3 posts
  • Last active: Dec 23 2015 09:25 PM
  • Joined: 30 Jun 2014

Thank you so much RHCP that works perfectly!!