The online racing simulator
Signal when Button is pressed
Hi

I have a short question:

Can anybody write me a short Insim Programm that gives a message in LFS to me, when a Wheel-Button is pressed?

Why?
I have put a cycle-process on my most-right redbutton of the G25 Shifterpanel which activates TS3 Push-to-Talk by pressing it and deacitvares Push-to-Talk by pressing it the second time. But sometimes whilest driving i forget, that i pushed the button and so my Microfone is active all the time.

So it would be very helpful if a message shows me when the "radio button" is active.

Hope for helpful answers
It can be easily done by LFS scripts.

First, create two .lfs files named mic_off.lfs and mic_on.lfs data/script folder.
Then go to Options > Controls > ALT +.
Bind /run mic_on to ALT + F12 and assign the desired button to it.

If you have some other command / text assigned to ALT + F12, then you have to change it in the script files as well.

And if ON message appears when you turn your mic OFF, just bind /run mic_off instead.

I hope it works


mic_off.lfs
/echo ^3> Mic ^1OFF
/altf 12 /run mic_on

mic_on.lfs
/echo ^3> Mic ^2ON
/altf 12 /run mic_off

You could not just paste the code into a code block?
Quote from Dygear :You could not just paste the code into a code block?

I totally forgot, I don't know why I didn't do that It is there now.
Quote from Flame CZE :It can be easily done by LFS scripts.

First, create two .lfs files named mic_off.lfs and mic_on.lfs data/script folder.
Then go to Options > Controls > ALT +.
Bind /run mic_on to ALT + F12 and assign the desired button to it.

If you have some other command / text assigned to ALT + F12, then you have to change it in the script files as well.

And if ON message appears when you turn your mic OFF, just bind /run mic_off instead.

I hope it works


mic_off.lfs
/echo ^3> Mic ^1OFF
/altf 12 /run mic_on

mic_on.lfs
/echo ^3> Mic ^2ON
/altf 12 /run mic_off


I have done that already by myself. But that isn't what I really wanted. Reasons:
Echo messages are shown where chat and other messages are shown. That could lead into some confusion. Secondly, buttons who are assigned in the Logiprofiler to a key (key for TS3 activation) are not available AS BUTTONS anymore in LFS. Only as the key string, which it's assigned in the LogiProfiler. That lead to the problem, that an echo-message is flooding, cause the key is pressed down all the time.

So, what would be cool is:

An indicator light, or something like that, which is possible to set somewhere onto the screen, where you can easily see it (e.g. above the steering weel; or near the windscreen). That indicator light should light yellow, when the Push-To-Talk Button/Key is pressed.

I hope it's understandable, what I want and why scripts aren't working the way I would have liked it.

edit:
What's working a little bit like it, is to set the TS3-activation key to the flashing light. But then it would be confusing for people who are driving in front or behind me

edit2:
Ich könnte das Ding sogar in Pseudocode oder evtl. Java selbst schreiben..allerdings hab ich 0 Kenntnisse über InSim und was man dafür wiederum in Java wissen muss. Es wären im Grunde nur wenige Zeilen:

while(KeyIsPressed("key"))
{Show circle(yellow,position);}

fertig.
There is quite complete ImSim library for Java called JInSim. It takes a bit of using to but if you want to brush up on your Java it might be worth a go. What you're trying to do is very easy for anyone with InSim basics.
Quote from MadCatX :There is quite complete ImSim library for Java called JInSim. It takes a bit of using to but if you want to brush up on your Java it might be worth a go.

The problem is, that my JAVA knowledge is very...basic. This means, that I would have to learn everything new up from making classes to how a network stream (and other things) are set up with JAVA. It would take years

Quote :What you're trying to do is very easy for anyone with InSim basics.

Well....then, it would be very cool if someone could write me that little app

FGED GREDG RDFGDR GSFDG