2012-12-05, 13:09
Hi all. Thought I would share with you a quick preview of my latest creation. It's a siren script inspired by Elmo's [TC] Lights, just works abit differently and a couple different features.
This one in particular, the siren and strobe is controlled like in TC Lights with Page Up/Down, However it's configured also on your G27 to turn your bottom right red button on your wheel to do different functions.
When the siren is on, pressing and holding on the button will switch to horn 1 and beep for as long as you hold it until you release the button.
If you release the button and then within 800ms press it again, it goes to horn 4, which stays on until you press the button again.
If your siren is not on, it simply turns the button into a regular horn
Program pauses when LFS is not in focus or you hit "t" to chat.
Does have its bugs but i'm still working on it
Demo video - Sorry for the quality
It's not stable so I won't release an executable version yet. However if you want to test it you'll need Autohotkey, and to save the following source code into a text file with a .ahk extension then run it. Yes. Opensource
Planned (optional features)
- Flappys operate !x Left <<< !x Right >>> when siren is on, and also turn off strobe and indicate temporarily using the indicator sound
- GUI of some sort
- More as I think of more things
This one in particular, the siren and strobe is controlled like in TC Lights with Page Up/Down, However it's configured also on your G27 to turn your bottom right red button on your wheel to do different functions.
When the siren is on, pressing and holding on the button will switch to horn 1 and beep for as long as you hold it until you release the button.
If you release the button and then within 800ms press it again, it goes to horn 4, which stays on until you press the button again.
If your siren is not on, it simply turns the button into a regular horn
Program pauses when LFS is not in focus or you hit "t" to chat.
Does have its bugs but i'm still working on it
Demo video - Sorry for the quality
It's not stable so I won't release an executable version yet. However if you want to test it you'll need Autohotkey, and to save the following source code into a text file with a .ahk extension then run it. Yes. Opensource
Source Code/Script whatever (Click to View)
Quote:#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Siren=0
Strobe=0
talkstrobe=0
Loop
{
If Strobe=1
{
WinWaitActive, Live for Speed
If Strobe=1
Send {3}{0}
Sleep 400
If Strobe=1
Send {9}{3}
}
Sleep 400
}
PgUp::
If Siren= 0
{
SoundBeep, 590 , 400
Siren= 1
WinWaitActive, Live for Speed
Send {b down}
}
else
{
Send {b up}
SoundBeep, 590 , 200
Sleep 100
SoundBeep, 590 , 200
Siren=0
}
return
PgDn::
If Strobe= 1
{
Strobe=0
Sleep 600
Send {0}
}
else
Strobe=1
return
Joy22::
If (Siren= 1 AND A_TimeSincePriorHotkey >900)
{
WinWaitActive, Live for Speed
Send {SHIFTDOWN}{H}{SHIFTUP}
Send {SHIFTDOWN}
Sleep, 50
Send {SHIFTUP}
Keywait, Joy22
Send {SHIFTDOWN}{H}{SHIFTUP}
Send {SHIFTDOWN}{H}{SHIFTUP}
Send {SHIFTDOWN}{H}{SHIFTUP}
Send {SHIFTDOWN}{H}{SHIFTUP}
Send {SHIFTDOWN}
Sleep, 50
Send {SHIFTUP}
}
If (Siren= 1 AND A_PriorHotKey = "Joy22" AND A_TimeSincePriorHotkey <800)
{
SoundBeep, 700 , 150
Send {SHIFTDOWN}{H}{SHIFTUP}
Send {SHIFTDOWN}{H}{SHIFTUP}
Send {SHIFTDOWN}{H}{SHIFTUP}
Send {SHIFTDOWN}{H}{SHIFTUP}
Send, {SHIFTDOWN}
Sleep, 50
Send, {SHIFTUP}
Keywait, Joy22
Keywait, Joy22, D
Send {SHIFTDOWN}{H}{SHIFTUP}
SoundBeep, 700 , 150
Send, {SHIFTDOWN}
Sleep, 50
Send, {SHIFTUP}
return
}
else
if Siren=0
{
WinWaitActive, Live for Speed
Send {ALTDOWN}{F1}{ALTUP}
Send {b down}
Keywait, Joy22
Send {b up}
Send {ALTDOWN}{F1}{ALTUP}
}
return
Keywait, Joy22, D
~t::
If Strobe=1
{
Strobe=0
talkstrobe=1
WinWaitActive, Live for Speed
SendInput {delete, 5}
}
return
~enter::
if talkstrobe=1
{
strobe=1
talkstrobe=0
}
return
- Flappys operate !x Left <<< !x Right >>> when siren is on, and also turn off strobe and indicate temporarily using the indicator sound
- GUI of some sort
- More as I think of more things