Author Topic: IL-2 profile  (Read 5272 times)

CJH

  • Newbie
  • *
  • Posts: 21
IL-2 profile
« on: June 30, 2019, 03:46:20 PM »
This is a profile for IL-2 that allows you to use one key to step through a list of functions. Once a function is selected, the hatswitch on a Thrustmaster is used to control that feature. This profile was designed around the P40E.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: IL-2 profile
« Reply #1 on: June 30, 2019, 06:31:24 PM »
I notice you're sending keypresses in a loop for certain functions, E.G.
Code: [Select]
Else If Text Compare : [HatMode] Equals 'temp'
Say, 'colder'
Start Loop While : [{STATE_JOYSTICK1POV1}] Equals 'DOWN'
Press Left Alt+=  keys and hold for 0,025 seconds and release
End Loop

if this key combination is normally held down when using the keyboard, you can set it up like this:
Code: [Select]
Else If Text Compare : [HatMode] Equals 'temp'
Say, 'colder'
Press down Left Alt+=  keys
Start Loop While : [{STATE_JOYSTICK1POV1}] Equals 'DOWN'
End Loop
Release Left Alt+=  keys
so the key combination will be held down as long as the hat is in the down position, and be released as soon as the hat is moved from the down position (rather than 25ms later, as is the case with the repeating keypress).