Code:
#SingleInstance force
#InstallKeybdHook
#InstallMouseHook
SetTimer, KeepRunning
return
KeepRunning:
; Get the process name of the active window (i.e. Notepad.exe)
WinGet, szProcessName, ProcessName, A
if szProcessName = BF2142.exe
{
Suspend, off
}
else
{
Suspend, on
}
return
;
; Disable the Window's keys so they don't switch to desktop while in-game
;
$LWin:: ; Left Windows Button
$RWin:: ; Right Windows Button
; Do nothing
return
ThrowC4andExplode()
{
Send, {5 down}
Sleep 60
Send, {5 up}
Sleep 500
MouseClick, Left, , , , , D
Sleep 100
MouseClick, Left, , , , , U
Sleep 700
MouseClick, right, , , , , D
Sleep 100
MouseClick, right, , , , , U
Sleep 200
MouseClick, left, , , , , D
Sleep 100
MouseClick, left, , , , , U
}
return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SwitchThenDetonate()
{
MouseClick, Right , , , , , D
Sleep 100
MouseClick, Right , , , , , U
Sleep 300 ;The wait for the switch sequence of detonator.
MouseClick, Left, , , , , D
Sleep 100
MouseClick, Left, , , , , U
}
return
F13::ThrowC4andExplode()
F14::SwitchThenDetonate()
So this is what I've compiled together, using some codes from the BF Macro Summary Thread.
But the sad part is, that
IT DOES NOT WORK!
Can someone kindly help me fix this up? Thank you.
P.S. I don't understand what the following does..
Code:
#SingleInstance force
#InstallKeybdHook
#InstallMouseHook
SetTimer, KeepRunning
return