Auto/Rapid Clicker

Ask gaming related questions (AHK v1.1 and older)
LovingRoMc
Posts: 8
Joined: 20 Apr 2021, 19:57

Auto/Rapid Clicker

20 Apr 2021, 20:06

I haven't learned how to script yet and was looking for a script to auto click on a game like Roblox while the window is in the background can anyone help me out?
Attachments
REE.png
REE.png (25.25 KiB) Viewed 1204 times
User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Auto/Rapid Clicker

21 Apr 2021, 05:19

Try ControlSend. Examples are at the bottom of the page. See WinTitle, too. Finally, if you search the forum for Roblox, you may find additional helpful examples. Post any of your scripts if you need feedback about them.
LovingRoMc
Posts: 8
Joined: 20 Apr 2021, 19:57

Re: Auto/Rapid Clicker

21 Apr 2021, 10:39

@mikeyww

b::
SetKeyDelay, 2
if WinExist("Roblox")
WinActivate, ahk_exe RobloxPlayerBeta.exe
ControlClick, x680 y371, Rolox,,,, Pos
Return

did i do that right?
Last edited by LovingRoMc on 21 Apr 2021, 11:02, edited 1 time in total.
User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Auto/Rapid Clicker

21 Apr 2021, 11:02

It if worked, then it's right!

Some possibilities are below.

Code: Select all

ControlSend,, Z, ahk_exe RobloxPlayerBeta.exe

Code: Select all

ControlClick, x680 y371, ahk_exe RobloxPlayerBeta.exe
LovingRoMc
Posts: 8
Joined: 20 Apr 2021, 19:57

Re: Auto/Rapid Clicker

21 Apr 2021, 11:04

It's not working on my end but I think the code is right.
Just to be sure:

^s::
SetKeyDelay, 2
if WinExist("Roblox")
WinActivate, ahk_exe RobloxPlayerBeta.exe
ControlClick, x680 y371, ahk_exe RobloxPlayerBeta.exe
Return

Also how do I add like a keybind to disable it?
User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Auto/Rapid Clicker

21 Apr 2021, 11:13

Coordinates are relative to the target window's top left corner. The command might not work in all windows.

If you plan to activate the window, then you can use MouseClick or Click instead of ControlClick with coordinates. It might improve reliability.

Code: Select all

F3::
on := !on
SoundBeep, 1000 + 500 * on
Return

#If WinExist("ahk_exe RobloxPlayerBeta.exe") && on
b::
WinActivate
MouseClick,, 680, 371
Return
#If
LovingRoMc
Posts: 8
Joined: 20 Apr 2021, 19:57

Re: Auto/Rapid Clicker

21 Apr 2021, 11:16

Ok so I don't want to activate the window so I'll remove that but I have this

^s::
on := !on
SoundBeep, 1000 + 500 * on
Return

#If WinExsist("ahk_exe RobloxPlayerBeta.exe")
F3::
ControlClick,, 680, 371, ahk_exe RobloxPlayerBeta.exe
Return
#If
Last edited by LovingRoMc on 21 Apr 2021, 11:21, edited 1 time in total.
User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Auto/Rapid Clicker

21 Apr 2021, 11:21

Could try:

Code: Select all

wTitle = ahk_exe RobloxPlayerBeta.exe

^s::
on := !on
SoundBeep, 1000 + 500 * on
Return

#If on
F3::ControlClick, X680 Y371, %wTitle%
#If
LovingRoMc
Posts: 8
Joined: 20 Apr 2021, 19:57

Re: Auto/Rapid Clicker

21 Apr 2021, 11:22

The F3 part doesn't seem to be working
User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Auto/Rapid Clicker

21 Apr 2021, 11:25

Test in Notepad (changing wTitle) or another program. This command specifically acts upon controls within the window. As noted, some windows might not respond. Test with the target window active. Issue a MouseMove to the coordinates of interest. You can also specify a particular control instead. If you run Window Spy, it will show you the controls' names.
LovingRoMc
Posts: 8
Joined: 20 Apr 2021, 19:57

Re: Auto/Rapid Clicker

21 Apr 2021, 11:28

Still didn't work
User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Auto/Rapid Clicker

21 Apr 2021, 11:35

Post your revised script. What happened when you ran it in Notepad? What was desired instead?
LovingRoMc
Posts: 8
Joined: 20 Apr 2021, 19:57

Re: Auto/Rapid Clicker

21 Apr 2021, 11:38

Nothing happened

Code: Select all

wTitle = ahk_exe notepad.exe
^s::
on := !on
SoundBeep, 1000 + 500 * on
Return

#If on
F3::ControlClick, X680 Y371, %wTitle%
#If
[Mod edit: [code][/code] tags added.]
LovingRoMc
Posts: 8
Joined: 20 Apr 2021, 19:57

Re: Auto/Rapid Clicker

21 Apr 2021, 11:46

Imma just not worry about it rn
User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Auto/Rapid Clicker

21 Apr 2021, 11:47

I cannot guarantee that it will work in your game. I suggest looking at other Roblox examples on the forum. The tips for games may also help. https://autohotkey.com/board/topic/111737-how-to-make-ahk-work-in-most-games-the-basics/

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 56 guests