Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[V 2.4] Rapid fire script - Burst fire - Dual Wield


  • Please log in to reply
40 replies to this topic
target001
  • Members
  • 1 posts
  • Last active: Feb 03 2012 03:16 AM
  • Joined: 03 Feb 2012

Rapid fire with text-to-speech (to announce mouse delay, help etc) for fullscreen. Also has a cross-hair, and no-recoil.

<!-- m -->https://ahknet.autoh... ... idFire.ahk<!-- m -->

Help (commands - in order of appearance):

Application:
CTRL + SHIFT + S: Temporarily suspends the application
CTRL + SHIFT + E: Exits the application
ALT + SHIFT + S: Toggles TTS (text-to-speech)
CTRL + SHIFT + U: Checks for updates
CTRL + SHIFT + RButton: Toggle right mouse button for rapid fire
CTRL + SHIFT + LButton: Toggle left mouse button for rapid fire

Mouse delay settings:
CTRL + SHIFT + D: Says the current mouse delay through TTS.
CTRL + SHIFT + UP: Increases the mouse delay.
CTRL + SHIFT + DOWN: Decreases the mouse delay.

Burst settings:
CTRL + SHIFT + B: Toggles burst fire.
ALT + SHIFT + B: Says the current burst amount
ALT + SHIFT + UP: Increases the burst amount by one
ALT + SHIFT + DOWN: Decreases the burst amount by one

No recoil settings:
CTRL + SHIFT + N: Toggles no recoil mode
CTRL + SHIFT + M: Says the no recoil amount (idk what to call it lol)
WIN KEY + SHIFT + UP: Increases the no recoil amount
WIN KEY + SHIFT + DOWN: Decreases the no recoil amount

Crosshair settings:
CTRL + SHIFT + C: Toggles the crosshair
WIN KEY + SHIFT + C: Opens the "change color" dialog.

Misc. commands:
CTRL + SHIFT + H: Help

I'm not saying it's any better than any one elses, I'm just posting it because I'm proud of myself :)

Low memory version:

enabled = true
F6::
if(enabled == "true") {
	enabled = false
} else {
	enabled = true
}
return

#if enabled == "true"
LButton::
	Loop {
		SetMouseDelay 30
		Click
		If(GetKeyState("LButton", "P")=0)
			break
	}



laxman10100
  • Guests
  • Last active:
  • Joined: --
Hey, whenever I try to run the script, I get an error saying:

"Error at line 39.

#include file 'AutomaticUpdate.ahk' cannot be opened.

The program will exit."

Any help with this error? Obviously it's something with the Autoupdate.... But I don't know anything about creating scripts so I can't fix the issue on my own... :cry:

  • Guests
  • Last active:
  • Joined: --
Yeah, I'm getting the same error too

Kraut
  • Guests
  • Last active:
  • Joined: --
So delete Line 39?

n00bs

If you can't code, you shouldn't be downloading 3rd party apps

FMZ
  • Guests
  • Last active:
  • Joined: --
Comment out that line (39) and other lines with references to "check4update" and it should start up for you. I don't have any games to test it out, though, so I can't say if it works beyond doing the text-to-speech thing and loading a help web page.

bobby
  • Guests
  • Last active:
  • Joined: --
can u set it to only use no recoil without the burst i cant get get the no recoil to work without burst :S

Dungeon
  • Guests
  • Last active:
  • Joined: --
I have had a play with this and was suffering from the same errors as everyone else. After a quick look i tracked the issue down to the script not creating the config file required for it to store the variable values. Quick fix really, i added an admin check to the script and then set the config location to an absolute path on your HDD. First i was gonna use My Documents but the #NOENV prevents this from working correctly so i have made the script create an AHKScript folder on your C drive root where the config is stored. I also removed the autoupdate stuff (even though you only had to download the autoupdate script from this very site and place it in the same folder as this script to fix the issue).

Haven't bothered changing the version number as its essentially the same script, i just forced it to create the config file properly.

heres the script for y'all.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                                                               ;;;
;;; This program was made by Magestickown, with help from users of AutoHotKey.com ;;;
;;; Including: Engunneer, Lazslo, Jake4 (?is that his name?), Leef me             ;;;
;;; and much more                                                                 ;;;
;;;                                                                               ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

if not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
   ExitApp
}

config =
(
[MDelaySettings]
mouseDelay=30
minMouseDelay=10
[MButtonSettings]
RButtonEnabled=false
LButtonEnabled=true
[BurstSettings]
BurstFire=false
burst=3
[NoRecoilSettings]
norecoil=false
movedown=2
[CrossHairSettings]
crosshairColor=000000
[VersionInfo]
major=1
minor=8
)

IfNotExist c:\AHKScript\config.ini
	FileCreateDir, C:\AHKScript
	FileAppend %config%, c:\AHKScript\config.ini

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Constants Includes ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
#InstallKeybdHook
#InstallMouseHook
;; Version info ;;
major := getIni("c:\AHKScript\config.ini", "VersionInfo", "major")
minor := getIni("c:\AHKScript\config.ini", "VersionInfo", "minor")
version := major "." minor
tfVersion := major " point " minor

ini := "c:\AHKScript\config.ini"
;; TTS ;;
ttsEnabled = true
ttsVol = 100

SetWinDelay 0
Coordmode Mouse, Screen
OldX := -1, OldY := -1

;;;;;;;;;;;;;;;;;
;;; Functions ;;;
;;;;;;;;;;;;;;;;;
SAPI := ComObjCreate("SAPI.SpVoice")
SAPI.volume := 100

say(msg) { ;Text to speech using integrated COM
	global ttsEnabled
	if(ttsEnabled == "true") {
		global SAPI
		SAPI.speak(msg,1)
	}
}

MouseMoveDown(movedownRate) {
	MouseGetPos x, y
	MouseMove x, y+movedownRate
}

getIni(config, section, key) {
	IniRead value, %config%, %section%, %key%
	return value
}

OldX := -1, OldY := -1

ID1 := Box(1,1,A_ScreenHeight)
ID2 := Box(2,A_ScreenWidth,1)

Box(n,w,h) { ;;By Lazslo from autohotkey.com
	Gui %n%:-Caption +ToolWindow +E0x20 ; No title bar, No taskbar button, Transparent for clicks
	Gui %n%: Show, X0 Y0 W%w% H%h%      ; Show it
	cColor := getIni("config.ini", "CrossHairSettings", "crosshairColor")
	Gui 1:Color, %cColor%
	Gui 2:Color, %cColor%
	WinGet ID, ID, A                    ; ...with HWND/handle ID
	Winset AlwaysOnTop,ON,ahk_id %ID%   ; Keep it always on the top
	WinSet Transparent,255,ahk_id %ID%  ; Opaque
	Return ID
}

RGBtoHEX(R, G, B) {
	SetFormat, integer, hex
	R += 0 ; Convert from decimal to hex.
	G += 0
	B += 0
	RGB := (R*0x10000) + (G*0x100) + (B*0x1)
	return %RGB%
}

;;;;;;;;;;;;;;;;;;;;;;;
;;; Startup message ;;;
;;;;;;;;;;;;;;;;;;;;;;;
welcomeMsg = Universal Rapid Fire version %tfVersion% has finished loading. You can get help by pressing CONTROL PLUS SHIFT PLUS H
say(welcomeMsg) ;Loading message

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Variables and configuration ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Mouse delay settings ;;
mouseDelay := getIni("c:\AHKScript\config.ini", "MDelaySettings", "mouseDelay")
minMouseDelay := getIni("c:\AHKScript\config.ini", "MDelaySettings", "minMouseDelay")
;; Mouse button settings ;;
RButtonEnabled := getIni("c:\AHKScript\config.ini", "MButtonSettings", "RButtonEnabled")
LButtonEnabled := getIni("c:\AHKScript\config.ini", "MButtonSettings", "LButtonEnabled")
;; Burst settings ;;
BurstFire := getIni("c:\AHKScript\config.ini", "BurstSettings", "BurstFire")
burst := getIni("c:\AHKScript\config.ini", "BurstSettings", "burst")
;; No recoil settings ;;
norecoil := getIni("c:\AHKScript\config.ini", "NoRecoilSettings", "norecoil")
movedown := getIni("c:\AHKScript\config.ini", "NoRecoilSettings", "movedown")
;; Crosshair settings ;;
crosshairColor := getIni("c:\AHKScript\config.ini", "CrossHairSettings", "crosshairColor")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Application settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
^+s:: ;Temporarily suspends the application
	Suspend, Toggle
return

^+e:: ;Exits the application
	GoSub ExitSub
return

!+s:: ;Toggle TTS
	if(ttsEnabled == "false") {
		ttsEnabled = true
		say("Text to speech has been enabled")
	} else {
		say("Text to speech has been disabled")
		ttsEnabled = false
	}
return


^+RButton::
	if(RButtonEnabled == "false") {
		RButtonEnabled = true
		say("Right mouse button is now rapid fire enabled")
	} else {
		RBUttonEnabled = false
		say("Right mouse button is now rapid fire disabled")
	}
return

^+LButton::
	if(LButtonEnabled == "false") {
		LButtonEnabled = true
		say("Left mouse button is now rapid fire enabled")
	} else {
		LBUttonEnabled = false
		say("Left mouse button is now rapid fire disabled")
	}	
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Mouse delay settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
^+d:: ;Says the current mouse delay
	msg = Your current mouse delay is %mouseDelay%.
	say(msg)
return

^+up:: ;Increase the mouse delay
	mouseDelay := mouseDelay + 10
return

^+down:: ;Decrease the mouse delay
	if(mouseDelay > minMouseDelay) {
		mouseDelay := mouseDelay - 10
	} else {
		msg = The mouse delay cannot go below %minMouseDelay%.
		say(msg)
	}
return

;;;;;;;;;;;;;;;;;;;;;;
;;; Burst settings ;;;
;;;;;;;;;;;;;;;;;;;;;;
^+b:: ;Toggles burst fire (x-shots/30ms)
	if(BurstFire == "false") {
		BurstFire = true
	} else {
		BurstFire = false
	}
return

!+b:: ;Says the current burst amount
	msg = Your current burst amount is %burst%.
	say(msg)
return

!+up:: ;Increase burst amount
	burst := burst + 1
return

!+down:: ;Decrease burst amount
	if(burst > 1) {
		burst := burst - 1
	} else {
		msg = The burst amount cannot go below 1
		say(msg)
	}
return

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; No recoil settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
^+n::
	if(norecoil == "false") {
		norecoil = true
		say("No recoil has been enabled")
	} else {
		norecoil = false
		say("No recoil has been disabled")
	}
return

^+m::
	msg = No recoil: %movedown%
	say(msg)
return

#+up::
	movedown := movedown + 1
return

#+down::
	movedown := movedown - 1
return

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Crosshair settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
^+c:: ;Toggles crosshair
	If OldX = -1
	   SetTimer crosshair, 1
	Else
	{
	   SetTimer crosshair, Off
	   Gui 1: Show, X0 Y0
	   Gui 2: Show, X0 Y0
	   ToolTip
	   OldX := -1, OldY := -1
	}
return

#+c:: ;Crosshair color
	InputBox, R, Color selection, Please enter the amount of red to use
	InputBox, G, Color selection, Please enter the amount of green to use
	InputBox, B, Color selection, Please enter the amount of blue to use

	crosshairColor := RGBtoHEX(R, G, B)
	
	Gui 1:Color, %crosshairColor%
	Gui 2:Color, %crosshairColor%
	msgbox The crosshair color has been changed to %crosshairColor%
return

;;;;;;;;;;;;;;;;;;;;;;
;;; Misc. commands ;;;
;;;;;;;;;;;;;;;;;;;;;;
^+h::
	Run, http://www.autohotkey.com/forum/viewtopic.php?p=477703#477703
return

;;;;;;;;;;;;;;;;;;;;
;;; Key bindings ;;;
;;;;;;;;;;;;;;;;;;;;
^+MButton:: ;Make a 360 degree turn (lol trick shots)
	MouseGetPos x, y
	MouseMove X+790, Y
return


#if LButtonEnabled == "true"
~$LButton:: ;Left mouse button rapid fire
	if(BurstFire == "false") {
		Loop {
			SetMouseDelay mouseDelay
			Click
			if (norecoil == "true")
				MouseMoveDown(movedown)
			if (GetKeyState("LButton", "P")=0)
				break
		}
	} else {
		Loop %burst% {
			Click
			Sleep 30
		}
		Sleep 300
	}
return

#if RButtonEnabled == "true"
~$RButton:: ;Right mouse button rapid fire
	if(BurstFire == "false") {
		Loop {
			SetMouseDelay mouseDelay
			Click right
			if (norecoil == "true")
				MouseMoveDown(movedown)
			if (GetKeyState("RButton", "P")=0)
				break
		}
	} else {
		Loop %burst% {
			Click right
			Sleep 30
		}
		Sleep 300
	}
return

crosshair:
   MouseGetPos RulerX, RulerY
   If (OldX <> RulerX) {
       OldX := RulerX
       WinMove ahk_id %ID1%,, %RulerX%
   }
   If (OldY <> RulerY) {
       OldY := RulerY
       WinMove ahk_id %ID2%,,,%RulerY%
   }
Return

#Persistent
OnExit, ExitSub
return

ExitSub:
IniWrite %mouseDelay%, c:\AHKScript\config.ini, MDelaySettings, mouseDelay
IniWrite %minMouseDelay%, c:\AHKScript\config.ini, MDelaySettings, minMouseDelay
IniWrite %RButtonEnabled%, c:\AHKScript\config.ini, MButtonSettings, RButtonEnabled
IniWrite %LButtonEnabled%, c:\AHKScript\config.ini, MButtonSettings, LButtonEnabled
IniWrite %BurstFire%, c:\AHKScript\config.ini, BurstSettings, BurstFire
IniWrite %burst%, c:\AHKScript\config.ini, BurstSettings, burst
IniWrite %norecoil%, c:\AHKScript\config.ini, NoRecoilSettings, norecoil
IniWrite %movedown%, c:\AHKScript\config.ini, NoRecoilSettings, movedown
IniWrite %crosshairColor%, c:\AHKScript\config.ini, crosshairSettings, CrosshairColor
IniWrite %VersionInf%, c:\AHKScript\config.ini, VersionInf, ver
ExitApp
Return

Enjoy :)

Dungeon
  • Guests
  • Last active:
  • Joined: --
Oooppppssss, the script above has an error in it, sorry. I removed the #NOENV, heres the correct one

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                                                               ;;;
;;; This program was made by Magestickown, with help from users of AutoHotKey.com ;;;
;;; Including: Engunneer, Lazslo, Jake4 (?is that his name?), Leef me             ;;;
;;; and much more                                                                 ;;;
;;;                                                                               ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

if not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
   ExitApp
}

config =
(
[MDelaySettings]
mouseDelay=30
minMouseDelay=10
[MButtonSettings]
RButtonEnabled=false
LButtonEnabled=true
[BurstSettings]
BurstFire=false
burst=3
[NoRecoilSettings]
norecoil=false
movedown=2
[CrossHairSettings]
crosshairColor=000000
[VersionInfo]
major=1
minor=8
)

IfNotExist c:\AHKScript\config.ini
	FileCreateDir, C:\AHKScript
	FileAppend %config%, c:\AHKScript\config.ini

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Constants Includes ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
#InstallKeybdHook
#InstallMouseHook
#NoEnv
;; Version info ;;
major := getIni("c:\AHKScript\config.ini", "VersionInfo", "major")
minor := getIni("c:\AHKScript\config.ini", "VersionInfo", "minor")
version := major "." minor
tfVersion := major " point " minor

ini := "c:\AHKScript\config.ini"
;; TTS ;;
ttsEnabled = true
ttsVol = 100

SetWinDelay 0
Coordmode Mouse, Screen
OldX := -1, OldY := -1

;;;;;;;;;;;;;;;;;
;;; Functions ;;;
;;;;;;;;;;;;;;;;;
SAPI := ComObjCreate("SAPI.SpVoice")
SAPI.volume := 100

say(msg) { ;Text to speech using integrated COM
	global ttsEnabled
	if(ttsEnabled == "true") {
		global SAPI
		SAPI.speak(msg,1)
	}
}

MouseMoveDown(movedownRate) {
	MouseGetPos x, y
	MouseMove x, y+movedownRate
}

getIni(config, section, key) {
	IniRead value, %config%, %section%, %key%
	return value
}

OldX := -1, OldY := -1

ID1 := Box(1,1,A_ScreenHeight)
ID2 := Box(2,A_ScreenWidth,1)

Box(n,w,h) { ;;By Lazslo from autohotkey.com
	Gui %n%:-Caption +ToolWindow +E0x20 ; No title bar, No taskbar button, Transparent for clicks
	Gui %n%: Show, X0 Y0 W%w% H%h%      ; Show it
	cColor := getIni("config.ini", "CrossHairSettings", "crosshairColor")
	Gui 1:Color, %cColor%
	Gui 2:Color, %cColor%
	WinGet ID, ID, A                    ; ...with HWND/handle ID
	Winset AlwaysOnTop,ON,ahk_id %ID%   ; Keep it always on the top
	WinSet Transparent,255,ahk_id %ID%  ; Opaque
	Return ID
}

RGBtoHEX(R, G, B) {
	SetFormat, integer, hex
	R += 0 ; Convert from decimal to hex.
	G += 0
	B += 0
	RGB := (R*0x10000) + (G*0x100) + (B*0x1)
	return %RGB%
}

;;;;;;;;;;;;;;;;;;;;;;;
;;; Startup message ;;;
;;;;;;;;;;;;;;;;;;;;;;;
welcomeMsg = Universal Rapid Fire version %tfVersion% has finished loading. You can get help by pressing CONTROL PLUS SHIFT PLUS H
say(welcomeMsg) ;Loading message

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Variables and configuration ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Mouse delay settings ;;
mouseDelay := getIni("c:\AHKScript\config.ini", "MDelaySettings", "mouseDelay")
minMouseDelay := getIni("c:\AHKScript\config.ini", "MDelaySettings", "minMouseDelay")
;; Mouse button settings ;;
RButtonEnabled := getIni("c:\AHKScript\config.ini", "MButtonSettings", "RButtonEnabled")
LButtonEnabled := getIni("c:\AHKScript\config.ini", "MButtonSettings", "LButtonEnabled")
;; Burst settings ;;
BurstFire := getIni("c:\AHKScript\config.ini", "BurstSettings", "BurstFire")
burst := getIni("c:\AHKScript\config.ini", "BurstSettings", "burst")
;; No recoil settings ;;
norecoil := getIni("c:\AHKScript\config.ini", "NoRecoilSettings", "norecoil")
movedown := getIni("c:\AHKScript\config.ini", "NoRecoilSettings", "movedown")
;; Crosshair settings ;;
crosshairColor := getIni("c:\AHKScript\config.ini", "CrossHairSettings", "crosshairColor")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Application settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
^+s:: ;Temporarily suspends the application
	Suspend, Toggle
return

^+e:: ;Exits the application
	GoSub ExitSub
return

!+s:: ;Toggle TTS
	if(ttsEnabled == "false") {
		ttsEnabled = true
		say("Text to speech has been enabled")
	} else {
		say("Text to speech has been disabled")
		ttsEnabled = false
	}
return


^+RButton::
	if(RButtonEnabled == "false") {
		RButtonEnabled = true
		say("Right mouse button is now rapid fire enabled")
	} else {
		RBUttonEnabled = false
		say("Right mouse button is now rapid fire disabled")
	}
return

^+LButton::
	if(LButtonEnabled == "false") {
		LButtonEnabled = true
		say("Left mouse button is now rapid fire enabled")
	} else {
		LBUttonEnabled = false
		say("Left mouse button is now rapid fire disabled")
	}	
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Mouse delay settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
^+d:: ;Says the current mouse delay
	msg = Your current mouse delay is %mouseDelay%.
	say(msg)
return

^+up:: ;Increase the mouse delay
	mouseDelay := mouseDelay + 10
return

^+down:: ;Decrease the mouse delay
	if(mouseDelay > minMouseDelay) {
		mouseDelay := mouseDelay - 10
	} else {
		msg = The mouse delay cannot go below %minMouseDelay%.
		say(msg)
	}
return

;;;;;;;;;;;;;;;;;;;;;;
;;; Burst settings ;;;
;;;;;;;;;;;;;;;;;;;;;;
^+b:: ;Toggles burst fire (x-shots/30ms)
	if(BurstFire == "false") {
		BurstFire = true
	} else {
		BurstFire = false
	}
return

!+b:: ;Says the current burst amount
	msg = Your current burst amount is %burst%.
	say(msg)
return

!+up:: ;Increase burst amount
	burst := burst + 1
return

!+down:: ;Decrease burst amount
	if(burst > 1) {
		burst := burst - 1
	} else {
		msg = The burst amount cannot go below 1
		say(msg)
	}
return

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; No recoil settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
^+n::
	if(norecoil == "false") {
		norecoil = true
		say("No recoil has been enabled")
	} else {
		norecoil = false
		say("No recoil has been disabled")
	}
return

^+m::
	msg = No recoil: %movedown%
	say(msg)
return

#+up::
	movedown := movedown + 1
return

#+down::
	movedown := movedown - 1
return

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Crosshair settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
^+c:: ;Toggles crosshair
	If OldX = -1
	   SetTimer crosshair, 1
	Else
	{
	   SetTimer crosshair, Off
	   Gui 1: Show, X0 Y0
	   Gui 2: Show, X0 Y0
	   ToolTip
	   OldX := -1, OldY := -1
	}
return

#+c:: ;Crosshair color
	InputBox, R, Color selection, Please enter the amount of red to use
	InputBox, G, Color selection, Please enter the amount of green to use
	InputBox, B, Color selection, Please enter the amount of blue to use

	crosshairColor := RGBtoHEX(R, G, B)
	
	Gui 1:Color, %crosshairColor%
	Gui 2:Color, %crosshairColor%
	msgbox The crosshair color has been changed to %crosshairColor%
return

;;;;;;;;;;;;;;;;;;;;;;
;;; Misc. commands ;;;
;;;;;;;;;;;;;;;;;;;;;;
^+h::
	Run, http://www.autohotkey.com/forum/viewtopic.php?p=477703#477703
return

;;;;;;;;;;;;;;;;;;;;
;;; Key bindings ;;;
;;;;;;;;;;;;;;;;;;;;
^+MButton:: ;Make a 360 degree turn (lol trick shots)
	MouseGetPos x, y
	MouseMove X+790, Y
return


#if LButtonEnabled == "true"
~$LButton:: ;Left mouse button rapid fire
	if(BurstFire == "false") {
		Loop {
			SetMouseDelay mouseDelay
			Click
			if (norecoil == "true")
				MouseMoveDown(movedown)
			if (GetKeyState("LButton", "P")=0)
				break
		}
	} else {
		Loop %burst% {
			Click
			Sleep 30
		}
		Sleep 300
	}
return

#if RButtonEnabled == "true"
~$RButton:: ;Right mouse button rapid fire
	if(BurstFire == "false") {
		Loop {
			SetMouseDelay mouseDelay
			Click right
			if (norecoil == "true")
				MouseMoveDown(movedown)
			if (GetKeyState("RButton", "P")=0)
				break
		}
	} else {
		Loop %burst% {
			Click right
			Sleep 30
		}
		Sleep 300
	}
return

crosshair:
   MouseGetPos RulerX, RulerY
   If (OldX <> RulerX) {
       OldX := RulerX
       WinMove ahk_id %ID1%,, %RulerX%
   }
   If (OldY <> RulerY) {
       OldY := RulerY
       WinMove ahk_id %ID2%,,,%RulerY%
   }
Return

#Persistent
OnExit, ExitSub
return

ExitSub:
IniWrite %mouseDelay%, c:\AHKScript\config.ini, MDelaySettings, mouseDelay
IniWrite %minMouseDelay%, c:\AHKScript\config.ini, MDelaySettings, minMouseDelay
IniWrite %RButtonEnabled%, c:\AHKScript\config.ini, MButtonSettings, RButtonEnabled
IniWrite %LButtonEnabled%, c:\AHKScript\config.ini, MButtonSettings, LButtonEnabled
IniWrite %BurstFire%, c:\AHKScript\config.ini, BurstSettings, BurstFire
IniWrite %burst%, c:\AHKScript\config.ini, BurstSettings, burst
IniWrite %norecoil%, c:\AHKScript\config.ini, NoRecoilSettings, norecoil
IniWrite %movedown%, c:\AHKScript\config.ini, NoRecoilSettings, movedown
IniWrite %crosshairColor%, c:\AHKScript\config.ini, crosshairSettings, CrosshairColor
IniWrite %VersionInf%, c:\AHKScript\config.ini, VersionInf, ver
ExitApp
Return


major1010
  • Members
  • 7 posts
  • Last active: Mar 11 2012 06:36 PM
  • Joined: 01 Mar 2012
Hi.I can't compile Code ;/
i have ''Error at line 64'' Pls upload for me shis Auto Hotkey in file.big thanks.

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
You're running the outdated AutoHotkey Basic, and this script requires AutoHotkey_L. You can find it on the top of the downloads page.

armageddon665
  • Members
  • 11 posts
  • Last active: Apr 01 2012 04:44 PM
  • Joined: 29 Oct 2011
What features does this script do?


Oooppppssss, the script above has an error in it, sorry. I removed the #NOENV, heres the correct one

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                                                               ;;;
;;; This program was made by Magestickown, with help from users of AutoHotKey.com ;;;
;;; Including: Engunneer, Lazslo, Jake4 (?is that his name?), Leef me             ;;;
;;; and much more                                                                 ;;;
;;;                                                                               ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

if not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
   ExitApp
}

config =
(
[MDelaySettings]
mouseDelay=30
minMouseDelay=10
[MButtonSettings]
RButtonEnabled=false
LButtonEnabled=true
[BurstSettings]
BurstFire=false
burst=3
[NoRecoilSettings]
norecoil=false
movedown=2
[CrossHairSettings]
crosshairColor=000000
[VersionInfo]
major=1
minor=8
)

IfNotExist c:\AHKScript\config.ini
	FileCreateDir, C:\AHKScript
	FileAppend %config%, c:\AHKScript\config.ini

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Constants Includes ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
#InstallKeybdHook
#InstallMouseHook
#NoEnv
;; Version info ;;
major := getIni("c:\AHKScript\config.ini", "VersionInfo", "major")
minor := getIni("c:\AHKScript\config.ini", "VersionInfo", "minor")
version := major "." minor
tfVersion := major " point " minor

ini := "c:\AHKScript\config.ini"
;; TTS ;;
ttsEnabled = true
ttsVol = 100

SetWinDelay 0
Coordmode Mouse, Screen
OldX := -1, OldY := -1

;;;;;;;;;;;;;;;;;
;;; Functions ;;;
;;;;;;;;;;;;;;;;;
SAPI := ComObjCreate("SAPI.SpVoice")
SAPI.volume := 100

say(msg) { ;Text to speech using integrated COM
	global ttsEnabled
	if(ttsEnabled == "true") {
		global SAPI
		SAPI.speak(msg,1)
	}
}

MouseMoveDown(movedownRate) {
	MouseGetPos x, y
	MouseMove x, y+movedownRate
}

getIni(config, section, key) {
	IniRead value, %config%, %section%, %key%
	return value
}

OldX := -1, OldY := -1

ID1 := Box(1,1,A_ScreenHeight)
ID2 := Box(2,A_ScreenWidth,1)

Box(n,w,h) { ;;By Lazslo from autohotkey.com
	Gui %n%:-Caption +ToolWindow +E0x20 ; No title bar, No taskbar button, Transparent for clicks
	Gui %n%: Show, X0 Y0 W%w% H%h%      ; Show it
	cColor := getIni("config.ini", "CrossHairSettings", "crosshairColor")
	Gui 1:Color, %cColor%
	Gui 2:Color, %cColor%
	WinGet ID, ID, A                    ; ...with HWND/handle ID
	Winset AlwaysOnTop,ON,ahk_id %ID%   ; Keep it always on the top
	WinSet Transparent,255,ahk_id %ID%  ; Opaque
	Return ID
}

RGBtoHEX(R, G, B) {
	SetFormat, integer, hex
	R += 0 ; Convert from decimal to hex.
	G += 0
	B += 0
	RGB := (R*0x10000) + (G*0x100) + (B*0x1)
	return %RGB%
}

;;;;;;;;;;;;;;;;;;;;;;;
;;; Startup message ;;;
;;;;;;;;;;;;;;;;;;;;;;;
welcomeMsg = Universal Rapid Fire version %tfVersion% has finished loading. You can get help by pressing CONTROL PLUS SHIFT PLUS H
say(welcomeMsg) ;Loading message

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Variables and configuration ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Mouse delay settings ;;
mouseDelay := getIni("c:\AHKScript\config.ini", "MDelaySettings", "mouseDelay")
minMouseDelay := getIni("c:\AHKScript\config.ini", "MDelaySettings", "minMouseDelay")
;; Mouse button settings ;;
RButtonEnabled := getIni("c:\AHKScript\config.ini", "MButtonSettings", "RButtonEnabled")
LButtonEnabled := getIni("c:\AHKScript\config.ini", "MButtonSettings", "LButtonEnabled")
;; Burst settings ;;
BurstFire := getIni("c:\AHKScript\config.ini", "BurstSettings", "BurstFire")
burst := getIni("c:\AHKScript\config.ini", "BurstSettings", "burst")
;; No recoil settings ;;
norecoil := getIni("c:\AHKScript\config.ini", "NoRecoilSettings", "norecoil")
movedown := getIni("c:\AHKScript\config.ini", "NoRecoilSettings", "movedown")
;; Crosshair settings ;;
crosshairColor := getIni("c:\AHKScript\config.ini", "CrossHairSettings", "crosshairColor")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Application settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
^+s:: ;Temporarily suspends the application
	Suspend, Toggle
return

^+e:: ;Exits the application
	GoSub ExitSub
return

!+s:: ;Toggle TTS
	if(ttsEnabled == "false") {
		ttsEnabled = true
		say("Text to speech has been enabled")
	} else {
		say("Text to speech has been disabled")
		ttsEnabled = false
	}
return


^+RButton::
	if(RButtonEnabled == "false") {
		RButtonEnabled = true
		say("Right mouse button is now rapid fire enabled")
	} else {
		RBUttonEnabled = false
		say("Right mouse button is now rapid fire disabled")
	}
return

^+LButton::
	if(LButtonEnabled == "false") {
		LButtonEnabled = true
		say("Left mouse button is now rapid fire enabled")
	} else {
		LBUttonEnabled = false
		say("Left mouse button is now rapid fire disabled")
	}	
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Mouse delay settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
^+d:: ;Says the current mouse delay
	msg = Your current mouse delay is %mouseDelay%.
	say(msg)
return

^+up:: ;Increase the mouse delay
	mouseDelay := mouseDelay + 10
return

^+down:: ;Decrease the mouse delay
	if(mouseDelay > minMouseDelay) {
		mouseDelay := mouseDelay - 10
	} else {
		msg = The mouse delay cannot go below %minMouseDelay%.
		say(msg)
	}
return

;;;;;;;;;;;;;;;;;;;;;;
;;; Burst settings ;;;
;;;;;;;;;;;;;;;;;;;;;;
^+b:: ;Toggles burst fire (x-shots/30ms)
	if(BurstFire == "false") {
		BurstFire = true
	} else {
		BurstFire = false
	}
return

!+b:: ;Says the current burst amount
	msg = Your current burst amount is %burst%.
	say(msg)
return

!+up:: ;Increase burst amount
	burst := burst + 1
return

!+down:: ;Decrease burst amount
	if(burst > 1) {
		burst := burst - 1
	} else {
		msg = The burst amount cannot go below 1
		say(msg)
	}
return

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; No recoil settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
^+n::
	if(norecoil == "false") {
		norecoil = true
		say("No recoil has been enabled")
	} else {
		norecoil = false
		say("No recoil has been disabled")
	}
return

^+m::
	msg = No recoil: %movedown%
	say(msg)
return

#+up::
	movedown := movedown + 1
return

#+down::
	movedown := movedown - 1
return

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Crosshair settings ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
^+c:: ;Toggles crosshair
	If OldX = -1
	   SetTimer crosshair, 1
	Else
	{
	   SetTimer crosshair, Off
	   Gui 1: Show, X0 Y0
	   Gui 2: Show, X0 Y0
	   ToolTip
	   OldX := -1, OldY := -1
	}
return

#+c:: ;Crosshair color
	InputBox, R, Color selection, Please enter the amount of red to use
	InputBox, G, Color selection, Please enter the amount of green to use
	InputBox, B, Color selection, Please enter the amount of blue to use

	crosshairColor := RGBtoHEX(R, G, B)
	
	Gui 1:Color, %crosshairColor%
	Gui 2:Color, %crosshairColor%
	msgbox The crosshair color has been changed to %crosshairColor%
return

;;;;;;;;;;;;;;;;;;;;;;
;;; Misc. commands ;;;
;;;;;;;;;;;;;;;;;;;;;;
^+h::
	Run, http://www.autohotkey.com/forum/viewtopic.php?p=477703#477703
return

;;;;;;;;;;;;;;;;;;;;
;;; Key bindings ;;;
;;;;;;;;;;;;;;;;;;;;
^+MButton:: ;Make a 360 degree turn (lol trick shots)
	MouseGetPos x, y
	MouseMove X+790, Y
return


#if LButtonEnabled == "true"
~$LButton:: ;Left mouse button rapid fire
	if(BurstFire == "false") {
		Loop {
			SetMouseDelay mouseDelay
			Click
			if (norecoil == "true")
				MouseMoveDown(movedown)
			if (GetKeyState("LButton", "P")=0)
				break
		}
	} else {
		Loop %burst% {
			Click
			Sleep 30
		}
		Sleep 300
	}
return

#if RButtonEnabled == "true"
~$RButton:: ;Right mouse button rapid fire
	if(BurstFire == "false") {
		Loop {
			SetMouseDelay mouseDelay
			Click right
			if (norecoil == "true")
				MouseMoveDown(movedown)
			if (GetKeyState("RButton", "P")=0)
				break
		}
	} else {
		Loop %burst% {
			Click right
			Sleep 30
		}
		Sleep 300
	}
return

crosshair:
   MouseGetPos RulerX, RulerY
   If (OldX <> RulerX) {
       OldX := RulerX
       WinMove ahk_id %ID1%,, %RulerX%
   }
   If (OldY <> RulerY) {
       OldY := RulerY
       WinMove ahk_id %ID2%,,,%RulerY%
   }
Return

#Persistent
OnExit, ExitSub
return

ExitSub:
IniWrite %mouseDelay%, c:\AHKScript\config.ini, MDelaySettings, mouseDelay
IniWrite %minMouseDelay%, c:\AHKScript\config.ini, MDelaySettings, minMouseDelay
IniWrite %RButtonEnabled%, c:\AHKScript\config.ini, MButtonSettings, RButtonEnabled
IniWrite %LButtonEnabled%, c:\AHKScript\config.ini, MButtonSettings, LButtonEnabled
IniWrite %BurstFire%, c:\AHKScript\config.ini, BurstSettings, BurstFire
IniWrite %burst%, c:\AHKScript\config.ini, BurstSettings, burst
IniWrite %norecoil%, c:\AHKScript\config.ini, NoRecoilSettings, norecoil
IniWrite %movedown%, c:\AHKScript\config.ini, NoRecoilSettings, movedown
IniWrite %crosshairColor%, c:\AHKScript\config.ini, crosshairSettings, CrosshairColor
IniWrite %VersionInf%, c:\AHKScript\config.ini, VersionInf, ver
ExitApp
Return



Duck
  • Members
  • 8 posts
  • Last active: May 03 2011 02:29 PM
  • Joined: 01 May 2011

Low memory version:

enabled = true
F6::
if(enabled == "true") {
	enabled = false
} else {
	enabled = true
}
return

#if enabled == "true"
LButton::
	Loop {
		SetMouseDelay 30
		Click
		If(GetKeyState("LButton", "P")=0)
			break
	}


What does the # do in: #if enabled == "true" ?

xxOrpheus
  • Members
  • 134 posts
  • Last active: Jul 21 2014 12:15 AM
  • Joined: 27 Sep 2011
Hey guys. I'm back! I abandoned AHK for a while (I'm so sorry :(). I will be updating my scripts soon.. The URL seems to have vanished which is unfortunate. I'll take care of this soon, I have backups :)

@Above poster
That's for checking if it's rapid-fire is enabled before allowing the left mouse button to function :p

Ahoy
  • Members
  • 22 posts
  • Last active: --
  • Joined: 12 Mar 2012
Oh im glad your back buddy.

I wanted to ask if you ever had an error on line 65?

It recently started to kick up this error:
Error at line 65.
The following variable name contains an illegal character:
"SAPIvolume"

Im running Win7 and the latest AHK (downloaded this morn)

A.

Ahoy
  • Members
  • 22 posts
  • Last active: --
  • Joined: 12 Mar 2012
Just adding a notifier to this thread.

A.