Please help with script?

Get help with using AutoHotkey and its commands and hotkeys
CallmeCity
Posts: 9
Joined: 06 Mar 2017, 19:22

Please help with script?

06 Mar 2017, 19:28

Hey guys!

I am a complete noob, so i just wanted to get that out of the way first. What i need help with, is a script that will rapid click the left mouse button.

I was able to create a script that successfully did this, but the problem I am having, is that i need to also hold down control, and right mouse button, and THEN when i hold down left click, for it to auto rapid click it.


So for example, the script i made, if i am holding down right mouse click, and then hold down left mouse click, it works perfect and rapidly click left button. The issue, is if i am also holding down the left control button, it does not work. Can anyone please help with this? Would be greatly appreciated!
User avatar
Spawnova
Posts: 370
Joined: 08 Jul 2015, 00:12
Contact:

Re: Please help with script?

06 Mar 2017, 23:08

It would help if you posted what you currently have.

You may want to also take a look at Symbols, specifically the * symbol. When used with a hotkey it will trigger regardless of any modifiers being held down.

Code: Select all

^f1::   ;^ = control, so this hotkey fires if control is held down only when f1 is pressed
msgbox this works with only control being held down
return
f2::
msgbox this will not work with control/shift/alt being held down
return
*f3::
msgbox this ignores all modifiers and will trigger whenever f3 is pressed
return
Some of my AHK programs: Platformer Game - Langton's Ant - Raycast light/Pixel Water - Creating HD map of any game
Or check out my Youtube for these plus many more projects! :D
CallmeCity
Posts: 9
Joined: 06 Mar 2017, 19:22

Re: Please help with script?

07 Mar 2017, 01:09

Hey man, you are so right! Sorry about that...Below is the script that im using...it works when i press right click and hold down left click, but when i hold down control first, it does not. How can i fix this?


Ins::Suspend
LButton::
Loop
{
SetMouseDelay 30
Click
If (GetKeyState("LButton","P")=0)
Break
}
CallmeCity
Posts: 9
Joined: 06 Mar 2017, 19:22

Re: Please help with script?

07 Mar 2017, 01:16

Wow, you are literally a genius my friend! I put the * symbol before the 2nd line, and it works perfectly! You are a boss! Thanks again!
CallmeCity
Posts: 9
Joined: 06 Mar 2017, 19:22

Re: Please help with script?

07 Mar 2017, 01:16

Wow, you are literally a genius my friend! I put the * symbol before the 2nd line, and it works perfectly! You are a boss! Thanks again!
CallmeCity
Posts: 9
Joined: 06 Mar 2017, 19:22

Re: Please help with script?

07 Mar 2017, 09:55

Ok so, just incase i havent said this already, this is for a PC game that i play, just to make it easier to shoot....The problem is, the guns shoot at a weird rate. Like, it will shoot 1 time, then a slight pause, and then shoot 3-4 times very fast, then just 1 time again after another pause.

This is the script im using. Any ideas what to change?

Ins::Suspend
*LButton::
Loop
{
SetMouseDelay 0
Click
If (GetKeyState("LButton","P")=0)
Break
}
MaxAstro
Posts: 557
Joined: 05 Oct 2016, 13:00

Re: Please help with script?

07 Mar 2017, 11:18

That is most likely something to do with the game, rather than AHK. I would guess the game is not expecting to receive mouse clicks that fast and doesn't know how to handle it. Or it may even have built in "anti-cheat" that is working against you.

The first thing I would try would actually be slowing down the rate of mouse clicks, and see if that becomes more reliable. If it does, slowly tweak the speed until you find the fastest speed that doesn't glitch.

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, boiler, DavidP, Google [Bot], HiSoKa, ixxcomadrejarojaxxi, mgroen, RubbeH, sofamat and 52 guests