Counter Strike GO Script

Ask gaming related questions
HoreaM
Posts: 9
Joined: 08 Nov 2015, 10:52

Counter Strike GO Script

08 Nov 2015, 10:57

Hello guys, I just found out today about AutoHotkey and I find it really cool, I love hotkeys, always making my life easier :D So now I would like to use AutoHotkey for the following task, while playing CS:GO :

I would like to create let's say an illusion of transforming toggle aim into hold to aim this way:
First, when I press the right click of the mouse, it should right click, as usual, but when I hold it it should do the following:
1st it shouldn't register like I'm still pressing it, even if I'm holding it, the PC shouldn't register as me still right clicking
2nd on the release it should right click one more time

Is this possible to do?
User avatar
MasterFocus
Posts: 146
Joined: 01 Oct 2013, 09:47
GitHub: MasterFocus
Location: Rio de Janeiro - RJ - Brasil
Contact:

Re: Counter Strike GO Script

08 Nov 2015, 11:35

Perhaps something like:

Code: Select all

*$RButton::
*$RButton Up::
    Click right
    KeyWait, RButton
Return
(untested!)
Antonio França - git.io | github.com | ahk4.net | sites.google.com
Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.
Need help? Please post on the forum before sending me a PM.
HoreaM
Posts: 9
Joined: 08 Nov 2015, 10:52

Re: Counter Strike GO Script

08 Nov 2015, 11:46

MasterFocus wrote:Perhaps something like:

Code: Select all

*$RButton::
*$RButton Up::
    Click right
    KeyWait, RButton
Return
(untested!)
That looks to work on my desktop when I tested it, but for some reason doesn't work in-game :eh:
While the right click is pressed, does it get registered as being hold or not? Because it shouldn't, but it does in-game, and not sure, but I think it doesn't right click one more time when it's released either (in-game, as I said, desktop works fine with right clicking after release).
HoreaM
Posts: 9
Joined: 08 Nov 2015, 10:52

Re: Counter Strike GO Script

08 Nov 2015, 12:03

Ok, it partially works :D All I needed to do was switch to windowed fullscreen and now the script works. Thanks a lot :D
The only problems is, if I aim (press right click and hold) and I shoot (press left click a few times) after i release the right click, it doesn't click anymore. So yeah, do you have any idea how that could be fixed?
Also, what would I need to change to the script to make it do 2xright clicks on release?
Thanks a lot for your fast help, owe you one

LE: Seems like all that works now, all I need to know is this XD :
Also, what would I need to change to the script to make it do 2x right clicks on release?
I think it also needs a very small tiny delay on the 2nd right click on release (but would appreciate a version without it and whit it to test it out)
I really tried modifying the script to do this, but it doesn't do the right amount of clicks on release, I don't think I fully understand your code (I know it's very basic, but not that great at this)

Code: Select all

*$RButton::	
*$RButton Up::
	Click right
	sleep 50
	Click right
	KeyWait, RButton
Return
I managed to come up with this, but the problem is it's double clicking the right mouse 2 times when I press and another 2 times when I release. Is there a way to separate those two? I mean only press once as the right-click gets pressed, and 2 times at release.
User avatar
MasterFocus
Posts: 146
Joined: 01 Oct 2013, 09:47
GitHub: MasterFocus
Location: Rio de Janeiro - RJ - Brasil
Contact:

Re: Counter Strike GO Script

09 Nov 2015, 23:54

I used a fancy way to set the same actions for 2 hotkeys. So yes, you can separate those easily:

Code: Select all

*RButton::
	ToolTip, aaaaaa
Return
*RButton Up::
	ToolTip, bbbbbb
Return
Make sure you check the docs, so you can more easily tweak the code yourself as necessary. ;)
Antonio França - git.io | github.com | ahk4.net | sites.google.com
Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.
Need help? Please post on the forum before sending me a PM.

Return to “Gaming”

Who is online

Users browsing this forum: Raudys, tobsto occupied and 7 guests