AutoHotkey Community

It is currently May 27th, 2012, 5:28 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Faster Mouse Clicks
PostPosted: February 20th, 2011, 5:13 pm 
Offline

Joined: July 27th, 2008, 7:31 am
Posts: 47
Location: England
I've got a (very) simple code which makes the left mouse button click repeatedly in the same place:

Code:
S::
Loop
{
Click
}
E:: ExitApp
F:: Reload


Having tested it, I'm able to 'click' the left mouse 32 times a second. Is there any way of making it even faster?

Thanks

_________________
All scripts are untested unless otherwise mentioned.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2011, 5:24 pm 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
setmousedelay -1
setbatchlines -1

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2011, 10:49 pm 
Offline

Joined: July 27th, 2008, 7:31 am
Posts: 47
Location: England
Thanks for the reply, I fortunately managed to work that out but came across another issue. -1 obviously means no wait at all, and 0 means as little wait as possible. If I set both of these to -1 my computer freezes up. However, it works if one is 0 and one is -1, or if both are 0. How can I stop setmousedelay -1 setbatchlines -1 freezing my computer? Is it the hardware (do I need a better processor for example) or is it always going to be buggy for me? If there are any ideas out there it'd be much appreciated.

_________________
All scripts are untested unless otherwise mentioned.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 9:36 am 
Offline
User avatar

Joined: September 5th, 2009, 2:06 pm
Posts: 1713
Location: Somewhere near you
Robbo wrote:
do I need a better processor for example

I think so.. Faster is better :D

_________________
Image
The quick onyx goblin jumps over the lazy dwarf


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 9:47 am 
Offline

Joined: February 2nd, 2011, 4:21 am
Posts: 247
You Can Also Use MouseClick Instead of Click.
Code:
MouseClick , Left, X, Y,, .50
Don't Think You'll Need SetBatchLine or SetMouseDelay.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 9:52 am 
Offline
User avatar

Joined: September 5th, 2009, 2:06 pm
Posts: 1713
Location: Somewhere near you
Do you really want a super fast mouse click?
But I doubt your computer will stand against the script... It'll make your PC stops responding
:shock:

_________________
Image
The quick onyx goblin jumps over the lazy dwarf


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 9:56 am 
Offline

Joined: February 2nd, 2011, 4:21 am
Posts: 247
Yeahh I Had To Log Off Testing This Lol.. It Wouldn't ExitApp Because It Was So Fast.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 10:09 am 
Offline
User avatar

Joined: September 5th, 2009, 2:06 pm
Posts: 1713
Location: Somewhere near you
DethKlok wrote:
Yeahh I Had To Log Off Testing This Lol.. It Wouldn't ExitApp Because It Was So Fast.

:lol:

What's the result you get with MouseClick in 1 second?

_________________
Image
The quick onyx goblin jumps over the lazy dwarf


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 10:14 am 
Offline

Joined: February 2nd, 2011, 4:21 am
Posts: 247
I Couldn't Stop It because I Was Using a 2 button Hotkey For ExitApp/Reload. Changed It To A 1 Button And It Works With 0 Seconds. Let Alone 1.
My Fault lol. After 3 Log Off's :roll:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 10:31 am 
Offline
User avatar

Joined: September 5th, 2009, 2:06 pm
Posts: 1713
Location: Somewhere near you
Test your clicking speed with Ace Coder's script
Taken from this thread

Code:
Count=0
Gui,Font,S25 CDefault Bold,Arial
Gui,Add,Text,VText x0 y5 w250 h40 +Center,%Count%
Gui,Font,S14 W550,Arial
Gui,Add,Button,GClick x12 y40 w225 h40,Click me!
Gui,Add,Button,GReset X12 y85 w225 h40,Reset
Gui,Add,Button,GExit x12 y130 w225 h40,Exit
Gui,Show,w250 h190,Tester
Return

Exit:
GuiClose:
ExitApp

Click:
Count++
GuiControl,Text,Text,%Count%
Return

Reset:
Count=0
GuiControl,Text,Text,%Count%
Return

_________________
Image
The quick onyx goblin jumps over the lazy dwarf


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 10:47 am 
Offline

Joined: February 2nd, 2011, 4:21 am
Posts: 247
They Are The Same Speeds I Tested This Out..
Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Count=0
Gui,Font,S25 CDefault Bold,Arial
Gui,Add,Text,VText x0 y5 w250 h40 +Center,%Count%
Gui,Font,S14 W550,Arial
Gui,Add,Button,GClick x12 y40 w225 h40,Click me!
Gui,Add,Button,GReset X12 y85 w225 h40,Reset Count
Gui,Add,Button,GReload x12 y130 w225 h40,Reload Script
Gui,Show,w250 h190,Tester
Return

Reload:
GuiClose:
Reload

Click:
Count++
GuiControl,Text,Text,%Count%
Return

Reset:
Count=0
GuiControl,Text,Text,%Count%
Return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
setmousedelay -1
setbatchlines -1

^c::  ; The First Way..
Loop
{
Click
}
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
^v::  ; My Way..
Loop
{
MouseClick , Left, X, Y,, 0
}
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
F4::Reload
F5::ExitApp

_________________
Reality cannot be altered because others might get lost.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 11:23 am 
Offline

Joined: July 27th, 2008, 7:31 am
Posts: 47
Location: England
Thanks for all of the responses. I made an even simpler test script (not as good but less chance of it crashing) and closed all unnecessary programs to boost performance. I managed ~ 750 clicks a second when one was -1 and the other was 0. To answer the above question, no I really don't need a super fast mouse click if it is going to be faster than that! Would however be interesting to know whether the world's fastest computer could handle -1 -1.

_________________
All scripts are untested unless otherwise mentioned.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 11:46 am 
Offline

Joined: February 2nd, 2011, 4:21 am
Posts: 247
What's Your Script For 750 a Second?

_________________
Reality cannot be altered because others might get lost.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 3:51 pm 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
My Netbook is able to handle setbatchlines -1 and setmousedelay -1.

I used this script and it handles it just fine.

7212.880142 clicks per second.
24192 clicks total.
3354 MS total.

Code:
setmousedelay -1
setbatchlines -1
Count = 0
Stop = 0
Return

A::
ST := A_TickCount
Loop
{
   Click
   Count++
}
Return

Z::
ET := A_TickCount - ST
Clicks_Second := Count / (ET / 1000)
MsgBox %Clicks_Second% clicks per second.`n%Count% clicks total.`n%ET% MS total.
Exitapp
Return

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2011, 4:16 pm 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Very related: Fast Mouse Control

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], HotkeyStick, rbrtryn and 79 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group