Page 1 of 1

Counter Strike GO Script

Posted: 08 Nov 2015, 10:57
by HoreaM
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?

Re: Counter Strike GO Script

Posted: 08 Nov 2015, 11:35
by MasterFocus
Perhaps something like:

Code: Select all

*$RButton::
*$RButton Up::
    Click right
    KeyWait, RButton
Return
(untested!)

Re: Counter Strike GO Script

Posted: 08 Nov 2015, 11:46
by HoreaM
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).

Re: Counter Strike GO Script

Posted: 08 Nov 2015, 12:03
by HoreaM
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.

Re: Counter Strike GO Script

Posted: 09 Nov 2015, 23:54
by MasterFocus
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. ;)