Gulf_War_Syndrome
OMG ERYX HAX!
+62|6702|Adelaide, Australia
For those who have used Battlerecorder will know that there are a lot of hotkeys to control playback without using the "Q+Mouse" interface. This is great if you are doing some filming and have the HUD turned off (which makes the "Q" menu unavailable), except there is no hotkey for restarting playback. This ends up being quite annoying as the game requires you to enter the console to turn on the HUD just to restart playback.

I got sick of this missing feature, so I decided to do something about it.

First download AutoHotkey (http://www.autohotkey.com) and install it.

Then copy this code into a new text file, rename the file to "BattleRecorder.ahk".

Code:

#NoEnv
#SingleInstance force
#InstallKeybdHook
#InstallMouseHook 


BF2BR_HUD = 1
SetTimer AppMonitor
return


AppMonitor:
WinGet BF2BR_CurrentProcessName, ProcessName, A
if BF2BR_CurrentProcessName = bf2.exe
{
    Suspend, off
}
else
{
    Suspend, on
}
return 


$!H::
ToggleHUD:

send {SC029 Down}
sleep 50
send {SC029 Up}
sleep 50
if BF2BR_HUD = 1
{
    BF2BR_HUD = 0
    send {Enter}renderer.drawhud 0{Enter}

} else {
    BF2BR_HUD = 1
    send {Enter}renderer.drawhud 1{Enter}

}
sleep 50
send {SC029 Down}
sleep 50
send {SC029 Up}
return


$!R::

HUDOff = 0
if BF2BR_HUD = 0
{
    HUDOff = 1
    gosub ToggleHUD
}
Send {Q Down}
MouseMove 0, -100, , R
Send {LButton Down}
Sleep 50
Send {LButton Up}
Send {Q Up}
sleep 50
if HUDOff = 1
{
    gosub ToggleHUD
}
return
Now double-click the .ahk file you created to start it.

When in BattleRecorder, use the Alt+H to toggle the HUD on or off. Use Alt+R to restart playback.

Simple, crude, but effective!

Last edited by Gulf_War_Syndrome (2006-09-25 01:23:26)

DaReJa
BF2s US Server Admin
+257|6650|Los Angeles, California, US.
Nice Work!!!!

I'm Gonna Try It Now.

Last edited by DaReJa (2006-09-01 01:20:08)

Battlelog: DaReJa
MyBFi/BF3i Admin

AKA DanielRJ
GameSurge IRC Network, Support Agent and Staff
Phuzion IRC Network, Support Director and Operator
Gulf_War_Syndrome
OMG ERYX HAX!
+62|6702|Adelaide, Australia
OK, in my rush there was a small bug that assumed the HUD was off to begin with. I've edited the code and added the line "HUD = 1" to the start of the script.

Note this is really crude. If I was really dedicated, I could speed up and streamline this script a bit, but you know, if it ain't broke...

Also, if you are restarting (Shift+R) it's a good idea not to touch the mouse. Blocking the mouse input while the script is running didn't work, so if you move the mouse to the side, it selects one of the other options from the "Q" menu.

Oh, and in case you don't know the usual keys for controlling Battlerecorder while the HUD is off, this forum post has the info:
http://forums.bf2s.com/viewtopic.php?id=6845

Board footer

Privacy Policy - © 2024 Jeff Minard