Page 1 of 1

Please help with script?

Posted: 06 Mar 2017, 19:28
by CallmeCity
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!

Re: Please help with script?

Posted: 06 Mar 2017, 23:08
by Spawnova
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

Re: Please help with script?

Posted: 07 Mar 2017, 01:09
by CallmeCity
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
}

Re: Please help with script?

Posted: 07 Mar 2017, 01:16
by CallmeCity
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!

Re: Please help with script?

Posted: 07 Mar 2017, 01:16
by CallmeCity
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!

Re: Please help with script?

Posted: 07 Mar 2017, 09:55
by CallmeCity
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
}

Re: Please help with script?

Posted: 07 Mar 2017, 11:18
by MaxAstro
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.