View Full Version : Ability to simulate key press of ignition
wheel4hummer
30th April 2007, 01:28
I am currently making a two-step rev limiter for the XRT using outgauge. THe current way I do it is by reversing the throttle axis. It would be so much better if I could simulate pressing "i". However, when I use the SendKeys function in python, nothing happens in LFS when I Send the "i" key. I would like to be able to cut the ignition this way. It would make launch control like this easier to do.
ajp71
30th April 2007, 09:33
It would make launch control like this easier to do.
Erm.. using launch control isn't cheating?
herki
30th April 2007, 09:54
Erm.. using launch control isn't cheating?
Just a little rule-bending :tilt:
wheel4hummer
30th April 2007, 20:51
It isn't really cheating in my opinion. It only makes a difference for drag racing. You have to let off at the start of a race anyway, because of people who sleep at the lights.
^^It still give your car an unfair advantage though and would inevitably end up in inappropriate use (unless it causes online mismatches).
That somehow like saying a better setup gives you an unfair advantage:shrug:
duke_toaster
2nd May 2007, 15:45
That somehow like saying a better setup gives you an unfair advantage:shrug:
It's like having a script do all the driving for you - IMO it's cheating.
mikey_G
2nd May 2007, 16:19
It's like having a script do all the driving for you - IMO it's cheating.
Then you should also consider 90% of all lfs drivers cheaters as they use a mix of throttle blip/cut, throttle help/brake help and auto gears.
imo it's valid to use launch control or traction control seeing as no one made any rules about them. So if you really dont want to see apps like that, make a rule book.
AndroidXP
2nd May 2007, 16:33
But there's a difference between using built-in helps and coding helps that were not intended to exist/be used yourself.
the_angry_angel
2nd May 2007, 16:47
You should beable to send the key event using the Windows API, but this should also work, and across hosts. And it's already available in Insim v4 (and v3).
struct IS_SCH // Single CHaracter - send to simulate single character
{
byte Size; // 8
byte Type; // ISP_SCH
byte ReqI; // 0
byte Zero;
byte CharB; // key to press
byte Flags; // bit 0 : SHIFT / bit 1 : CTRL
byte Spare2;
byte Spare3;
};
George Kuyumji
2nd May 2007, 19:18
If I understand right, you just want a button that starts the Ignition of the car with a button command. I got a Button Box some time ago and would also like to switch the engine one when I start driving.
(http://img153.imagevenue.com/img.php?image=33401_PICT2097_122_530lo.JPG)
[IMG]http://img153.imagevenue.com/img.php?image=33401_PICT2097_122_530lo.JPG
wheel4hummer
3rd May 2007, 12:01
You should beable to send the key event using the Windows API, but this should also work, and across hosts. And it's already available in Insim v4 (and v3).
I didn't know that packet existed! Thx! In C, windows.h wouldn't work for the "i" key inside of LFS.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.