-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathre5dx9.ahk
75 lines (56 loc) · 1.81 KB
/
re5dx9.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#Persistent
#SingleInstance, force
#MaxHotkeysPerInterval 200
SendMode Event
SetWorkingDir, %A_ScriptDir%
; uncomment this if script keys are noticeably slower than normal
;Process, Priority, , High
; hotkey customizations (true = enabled, false = disabled)
global DisableShiftReload := true
global DisableWinKeys := false
; you shouldn't need to change anything below here
global AppId := 21690
global GameName := "Resident Evil 5"
; import the shared script functions after we declared the AppId and GameName
#Include, scripts/ahk_shared.ahk
Try
{
RemoveStandardMenuItems()
AddGameTrayMenuItems()
AddToolMenuItems()
Menu, EditMenu, Add
Menu, EditMenu, Add, Edit RE5 Config, ConfigHandler
Menu, EditMenu, Icon, Edit RE5 Config, imageres.dll, 63
}
Finally
{
AddStandardTrayMenuItems()
ShowNotification(GameName)
}
return
ConfigHandler:
MsgBox, % A_MyDocuments
ConfigFile = %A_MyDocuments%\CAPCOM\RESIDENT EVIL 5\config.ini
if !FileExist(ConfigFile) {
MsgBox, 48, % GameName . " Config File Missing", % "The " . GameName . " config file '" . ConfigFile . "' does not exist."
return
}
Run, %ConfigFile%
return
DoNothing:
return
#IfWinActive RESIDENT EVIL 5
~f::Enter ; Makes the 'f' key send an 'Enter' key
~w::Up ; Makes the 'w' key send an 'Up' key
~a::Left ; Makes the 'a' key send a 'Left' key
~s::Down ; Makes the 's' key send a 'Down' key
~d::Right ; Makes the 'd' key send a 'Right' key
HotKey, RButton & Shift, DoNothing
HotKey, Shift & RButton, DoNothing
if (DisableWinKeys)
{
LWin::Return ; Disables the 'Left Win' key
RWin::Return ; Disables the 'Right Win' key
}
#IfWinActive
^+r::Reload ; {Ctrl + Shift + r} reloads the current script