~LButton:: Loop { Sleep 1 GetKeyState, LButtonState, LButton, P if LButtonState = U MouseClick, Left } return Space::Pause, toggle
It works fine, but are there any ways I can make it faster?
I'm really new to this software.
~LButton:: Loop { Sleep 1 GetKeyState, LButtonState, LButton, P if LButtonState = U MouseClick, Left } return Space::Pause, toggle
~$LButton:: While ( GetKeyState("LButton") ) Click Return Space:: Pause, Toggle
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Antonio França -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org
Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.
sleep 1. Well it clicks about 29 times per second, but I've seen some that click around 50 times per second. Is it my computer not being able to pick up the clicks that fast or is it just people with more complex scripts than me?
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% ReturnCredit goes to Ace Coder
Have no idea what to do with that..Try it with this script
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% ReturnCredit goes to Ace Coder
You said that earlier, did you?Alright I have this script which clicks the mouse pretty fast
Yeah it works fine and all just seeing if somebody knows any ways to make it fasterYou said that earlier, did you?Alright I have this script which clicks the mouse pretty fast
Ah, nevermind =)
SendMouseLClick() { DllCall("mouse_event", "UInt", 2) ; left button down DllCall("mouse_event", "UInt", 4) ; left button up } F12:: Loop, 1000 SendMouseLClick() ReturnHow is that for a start? I get a score of 1000, with 8 second to go.
;--------------------------------------------------------------------------- SendMouse_LeftClick() { ; send fast left mouse clicks ;--------------------------------------------------------------------------- DllCall("mouse_event", "UInt", 0x02) ; left button down DllCall("mouse_event", "UInt", 0x04) ; left button up } ;--------------------------------------------------------------------------- SendMouse_RightClick() { ; send fast right mouse clicks ;--------------------------------------------------------------------------- DllCall("mouse_event", "UInt", 0x08) ; right button down DllCall("mouse_event", "UInt", 0x10) ; right button up } ;--------------------------------------------------------------------------- SendMouse_MiddleClick() { ; send fast middle mouse clicks ;--------------------------------------------------------------------------- DllCall("mouse_event", "UInt", 0x20) ; middle button down DllCall("mouse_event", "UInt", 0x40) ; middle button up } ;--------------------------------------------------------------------------- SendMouse_RelativeMove(x, y) { ; send fast relative mouse moves ;--------------------------------------------------------------------------- DllCall("mouse_event", "UInt", 0x01, "UInt", x, "UInt", y) ; move } ;--------------------------------------------------------------------------- SendMouse_AbsoluteMove(x, y) { ; send fast absolute mouse moves ;--------------------------------------------------------------------------- ; Absolute coords go from 0..65535 so we have to change to pixel coords ;----------------------------------------------------------------------- static SysX, SysY If (SysX = "") SysX := 65535//A_ScreenWidth, SysY := 65535//A_ScreenHeight DllCall("mouse_event", "UInt", 0x8001, "UInt", x*SysX, "UInt", y*SysY) } ;--------------------------------------------------------------------------- SendMouse_Wheel(w) { ; send mouse wheel movement, pos=forwards neg=backwards ;--------------------------------------------------------------------------- DllCall("mouse_event", "UInt", 0x800, "UInt", 0, "UInt", 0, "UInt", w) }
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Antonio França -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org
Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.
SetMouseDelay, 0 F12:: Loop, 1000 Click Return