Code:
#NoEnv
SendMode Input
_auto := true
~LButton::autofire()
+LButton::_auto := ! _auto
+RButton::ExitApp
autofire()
{
global _auto
if _auto
{
Loop
{
if GetKeyState("LButton", "P")
{
SendInput {LButton DownTemp}
Sleep 85
mouseXY(0, 6)
SendInput {LButton Up}
Sleep 45
}
else
break
} ;; loop
} ;; if
} ;; autofire()
mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}
;;;;;;
;;; End script
;;;;;;
;
; AutoHotkey Version: 1.1.2878+
; Language: English
; Platform: Win9x/NT
;
;
; Only run this script when bf2.exe is running in the foreground
;
#SingleInstance force
#InstallKeybdHook
#InstallMouseHook
#NoEnv
SendMode, Input
SetTimer, KeepRunning
return
KeepRunning:
; Get the process name of the active window (i.e. Notepad.exe)
WinGet, szProcessName, ProcessName, A
if szProcessName = bf2.exe
{
Suspend, off
}
else
{
Suspend, on
}
return
$^CapsLock::
ExitApp
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Pressing Ctrl+V while BF2 is active
$^v::
Sleep 200
SetKeyDelay, 30, 30
Send, {Space}%clipboard%
SetKeyDelay, 0
return
MouseEvent(a_xpos, a_ypos)
{
DllCall("mouse_event", uint,1, int,a_xpos, int,a_ypos, uint,0, int,0 )
}
$MButton::
; Pistol 9
; G36E (burst fire) 6
; G36E (single shot) 4
; G36E (zoomed) 2
; DAO 16
Loop
{
Sleep 90
GetKeyState, MButtonState, MButton, P
if MButtonState = U
break
MouseClick, left,,, 1, 0, D
Sleep, 20
MouseClick, left,,, 1, 0, U
; Correct for bullet deviation by moving down Y pixels
MouseEvent(0,6)
}
return
Shift + Rbutton closes the ap, how can i set this not to happen, or shift + Ctrnl + Alt is to close the app?
also a beep needs to be included to indicte the app being on or off.
i dont no how to do this, thanks
SHENTON[/code]