I wrote a cool little autoit script that will allow you to configure hotkeys on a per MAP basis so you dont have to remember the commands and map names and you simply press CTRL+SHIFT+1 to load a new map.
email me at david_renne {a] yahoo ««dot»»com
if this is helpful,
#include <Misc.au3>
Global const $configini = "left4deadkeymapping.config"
Global const $rconPassword = IniRead("left4deadkeymapping.config","RCON","Password","")
dim $lastKey
Hotkeyset("{END}","ExitApp")
If _Singleton(@scriptname) = 0 Then
Exit
Endif
if Not FileExists ("left4deadkeymapping.config") Then
$passwd = InputBox("Password", "Enter the password you will ALWAYS use as your RCON password", "", "*")
IniWrite("left4deadkeymapping.config","RCON","Password",$passwd)
EndIf
$read = IniReadSection($configini,"Hotkeys")
dim $Array[$read[0][0]][2]
for $i = 1 to $read[0][0]
$lastKey = $read[$i][1]
next
AddHotKey(true,$lastKey)
$read = IniReadSection($configini,"Hotkeys")
for $i = 1 to $read[0][0]
$array[$i-1][0] = $read[$i][1]
$array[$i-1][1] = $read[$i][0]
Hotkeyset($array[$i-1][0],"Hotkeys")
next
while 1
sleep(1000)
wend
Func Hotkeys()
$hotkey = @HotKeyPressed
for $I = 0 to ubound($array)-1
consolewrite($array[$i][1]&@crlf)
if $hotkey = $array[$i][0] Then
Send("`")
Sleep(500)
Send("rcon_password " & $rconPassword & "{ENTER}")
Sleep(300)
Send("rcon changelevel " & $array[$i][1] & "{ENTER}")
EndIf
next
endfunc
Func AddHotKey($flag,$last)
$answer = false
$steamMapPath = RegRead("HKEY_CLASSES_ROOT\Valve.Source\shell\open\command\","")
$steamMapPath = StringReplace(StringReplace($steamMapPath,"srcds.exe"" ""%1""","left4dead\maps\"),"""","")
if $flag = true Then
$answer = MsgBox(3,"Add new level hotkey?","Do you want to add a new hotkey?")
Else
$answer = 6
EndIf
if $answer = 6 Then
if $last = "" Then
$last = "^+1"
EndIf
$hotkey = InputBox("HotKey Mapping", "Enter the hotkey code (CTRL=^,SHIFT=+,ALT=!,WIN=#)", $last)
$filePath = FileOpenDialog ( "Find your custom Map", $steamMapPath, "L4D Maps (*.bsp)")
$fileName = StringReplace(StringReplace($filePath,$steamMapPath,""),".bsp","")
if $fileName <> "" And $hotkey <> "" Then
IniWrite("left4deadkeymapping.config","HotKeys",$fileName, $hotkey)
EndIf
$answer2 = MsgBox(3,"Add another?","Saved! Do you want to add another new hotkey?")
If $answer2 = 6 Then
AddHotKey(false,$hotkey)
EndIf
EndIf
EndFunc
Func ExitApp()
msgbox(0,"Shut Down","Shutting down L4D map hotkeys")
Exit
EndFunc