Jump to content

Double Click events


ralch
 Share

Recommended Posts

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 10 months later...

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.

  • Thanks 1
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...