forked from camerb/AHKs
-
Notifications
You must be signed in to change notification settings - Fork 38
/
FcnLib-NotRealFcnLibs.ahk
155 lines (130 loc) · 3.7 KB
/
FcnLib-NotRealFcnLibs.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#include FcnLib.ahk
;ip := GetIPaddress()
ChangeLogitechWheelMode()
;LaunchTeamspeak2()
;CloseProgramsThatHinderNR2003()
;SoundSet, 40
;RunAhk("NR2003hotkeys.ahk")
;LaunchRace(ip, "nascar2012")
ExitApp ;DONE WITH THE AUTO-EXECUTE
GetIPaddress()
{
Run, http://www.blazinpedals.com/
ForceWinFocus("Blazin.*Pedals", "RegEx")
ip:=Prompt("What is the IP for the race? 68.194.184.146?")
if not ip
ip=68.194.184.146
return ip
}
CloseProgramsThatHinderNR2003()
{
ProcessClose("FindAndRunRobot.exe")
ProcessClose("dsidebar.exe")
}
LaunchRaceViaRLM()
{
ProcessClose("RLMArena.exe")
RunProgram("C:\Program Files\RLM Arena 4.2\RLMArena.exe")
WinWaitActive, , Enter your username and password for your RaceLM league.
ss()
Send, {TAB 3}{ENTER}
ss()
WinWaitActive, , Select League
ss()
Send, {TAB 2}{DOWN}
WaitForImageSearch("images/nr2003/BlazinPedals.bmp")
ClickIfImageSearch("images/nr2003/BlazinPedals.bmp")
WaitForImageSearch("images/nr2003/LaunchRace.bmp")
ClickIfImageSearch("images/nr2003/LaunchRace.bmp")
}
ChangeLogitechWheelMode()
{
;Tell the logitech profiler to go into NR2003 mode so that I don't have combined pedals
Run, "C:\Program Files\Logitech\Profiler\LWEmon.exe"
WinWait, Logitech Profiler
IfWinExist, , Logitech Profiler was unable to detect any game controllers.
{
debug("CONNECT THE STERRING WHEEL")
WinActivate, Logitech Profiler
WinActivate, , Logitech Profiler was unable to detect any game controllers.
WinWaitClose, , Logitech Profiler was unable to detect any game controllers., 120
}
ForceWinFocus("Logitech Profiler")
;Send, {ALT}ps{ENTER}
Send, {ALT}
Sleep, 100
Send, p
Sleep, 100
Send, s
Sleep, 100
Send, {ENTER}
Sleep, 100
;WinClose, Logitech Profiler
WinMinimize, Logitech Profiler
}
;{{{ archived
LaunchTeamspeak2()
{
RunProgram("C:\Program Files\Teamspeak2_RC2\TeamSpeak.exe")
ForceWinFocus("TeamSpeak 2")
Send, {ALT}{DOWN}q
;ClickButton("&Connect")
ForceWinFocus("Quick Connect")
ControlClick, &Connect
WaitForImageSearch("images\teamspeak2\RacingRoom.bmp")
ClickIfImageSearch("images\teamspeak2\RacingRoom.bmp", "right")
Send, {DOWN}{ENTER}
ForceWinFocus("Need Password")
Send, nascar2012{ENTER}
}
LaunchTeamspeak()
{
Run, "C:\Program Files\TeamSpeak 3 Client\ts3client_win32.exe"
ForceWinFocus("TeamSpeak 3")
Send, {CTRLDOWN}s{CTRLUP}
ForceWinFocus("Connect")
Send, {ENTER}
ForceWinFocus("TeamSpeak 3")
WaitForImageSearch("images\teamspeak\ConnectedToServer.bmp")
MouseClick, left, 40, 115
Sleep, 500
;WaitFor my name to disappear (or for the top area to turn into a plus sign)
MouseClick, right, 67, 133
;Sleep, 100
WaitForImageSearch("images\teamspeak\ReadyToSwitchChannels.bmp")
Send, {DOWN}{ENTER}
}
LaunchRace(ip, pass)
{
RunProgram("C:\Papyrus\NASCAR Racing 2003 Season\NR2003.exe")
SleepSeconds(15)
;wait until full screen
Click(481, 888, "left")
Click(692, 489, "left")
ss()
Click(692, 489, "left")
ss()
Send, {BACKSPACE 50}
Send, %ip%
Click(580, 283, "left")
ss()
Click(580, 283, "left")
ss()
Send, {BACKSPACE 50}
Send, %pass%
Click(1615, 1054, "left")
}
LaunchRaceViaSmsLobby()
{
RunProgram("C:\Program Files\SMS_Lobby\SMSLobby.exe")
WinWaitActive, , NR2003
Sleep, 100
WaitForImageSearch("images/smsLobby/NascarSimWorld.bmp")
ClickIfImageSearch("images/smsLobby/NascarSimWorld.bmp")
Sleep, 100
MouseClick, left, 502, 79
Send, race
Sleep, 100
Click(935, 110)
}
;}}}