ralch Posted March 31, 2020 Posted March 31, 2020 Hi everyone, I have just started with Target Script Editor for my Thrustmaster TWCS Throttle. I need to program a single click event and a DOUBLE CLICK event for the same button. However I did not find any function I could use to measure elapsed time between one button press and another (in the PDF Script Target Manual). Do you know if there is any additional information I might be missing that I could use for this DOUBLE CLICK implementation. Currently I have a CH FighterStick and a script that measures time between button presses. In my case, I use it for fast switching of views. Single click in a button generates F1, Double Click, generates ALT-F1 which is very useful for me to keep a track of a bandit trying to escape my guns. With my TWCS Throttle I want to be able also to do the same type of double click events. TIA, ralch
Ant0ine Posted March 31, 2020 Posted March 31, 2020 I don't know how to do that with Target, double tap isn't explained in the Target Script Manual, however you could do a tempo. Short press/Long Press. Or you could use Joystick Gremlin which provide option for both Tempo and Double tap. https://whitemagic.github.io/JoystickGremlin/
ralch Posted March 31, 2020 Author Posted March 31, 2020 Thanks Ant0ine, I thought about tempo, but it kinds of takes a while to do the event. In this case, I need something fast. I found the following reference, it looks like with the Thrustmaster Script, I can call any win api function, just like C. I thought it was not a real C languange. Look at this: https://simhq.com/forum/ubbthreads.php/topics/3853204/Re:_Power_of_scripting?_beep_f And thanks for the Gremlin reference, it looks like that is the way to avoid coding!
niru27 Posted February 16, 2021 Posted February 16, 2021 I was searching for Double Tap functionality, but couldn't find it anywhere, so came up with it myself. With Multi Tap you can assign commands to: single tap single tap + hold aka Long Press (just like Tempo) double tap double tap + hold ... n number of taps with/without hold at end Joystick Gremlin can detect long press and double tap, but it can't do both at the same time. There's also an AHK option, but I didn't want to rewrite all my mappings in AHK immediately after doing it in TMC. PS: I'm coding in C after a long time, so there might be more efficient means of achieving the same functionality. Do test it out and let me know about any bugs/improvements. Example script is for the TWCS, but easily adaptable to your device. 1 1
Recommended Posts