AutoHotkey Community

It is currently May 27th, 2012, 12:57 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: February 3rd, 2012, 6:44 am 
Offline

Joined: February 3rd, 2012, 4:13 am
Posts: 1
xxOrpheus wrote:
Rapid fire with text-to-speech (to announce mouse delay, help etc) for fullscreen. Also has a cross-hair, and no-recoil.

http://www.autohotkey.net/~magestickown ... idFire.ahk

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:

Code:
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
   }


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Not working?
PostPosted: February 4th, 2012, 4:38 am 
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:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2012, 5:54 am 
Yeah, I'm getting the same error too


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2012, 5:27 am 
So delete Line 39?

n00bs

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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2012, 7:37 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2012, 7:09 pm 
can u set it to only use no recoil without the burst i cant get get the no recoil to work without burst :s


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2012, 9:59 pm 
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.

Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                                                               ;;;
;;; 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 :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2012, 10:02 pm 
Oooppppssss, the script above has an error in it, sorry. I removed the #NOENV, heres the correct one

Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                                                               ;;;
;;; 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


Report this post
Top
  
Reply with quote  
 Post subject: reup
PostPosted: March 1st, 2012, 3:31 pm 
Offline

Joined: March 1st, 2012, 3:28 pm
Posts: 7
Hi.I can't compile Code ;/
i have ''Error at line 64'' Pls upload for me shis Auto Hotkey in file.big thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2012, 4:55 pm 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
You're running the outdated AutoHotkey Basic, and this script requires AutoHotkey_L. You can find it on the top of the downloads page.

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 10th, 2012, 2:33 pm 
Offline

Joined: October 29th, 2011, 6:37 pm
Posts: 11
Location: Slovenija
What features does this script do?


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

Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                                                               ;;;
;;; 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


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 10th, 2012, 4:44 am 
Offline

Joined: May 1st, 2011, 3:49 am
Posts: 8
xxOrpheus wrote:
Low memory version:

Code:
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" ?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bon, sks and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group