Author Topic: Two-Way Switch (Separate Key Commands) with acknowledgment 'Beep'....  (Read 802 times)

slicker55

  • Newbie
  • *
  • Posts: 17
I'm sure you guys will make short work of this but as a novice I have only got it to work as two separate scripts.

I want one script to control a two-way 'LOCK' switch in the cockpit of a plane in my flight sim.

This switch uses two separate keyboard commands

The script would perform the following actions:

When I say Lock [Engage]
Play Beep.mp3
Press and Release RCTRL+G

When I say Lock [Disengage]
Play Beep.mp3
Press and Release RSHIFT+G

Thanks in advance...

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Two-Way Switch (Separate Key Commands) with acknowledgment 'Beep'....
« Reply #1 on: December 01, 2018, 05:11:26 AM »
lock [engage;disengage]
Code: [Select]
Play sound, 'beep.mp3'
Begin Text Compare : [{CMDSEGMENT:1}] Equals 'engage'
    Press Right Ctrl+G keys and hold for 0,06 seconds and release
Else
    Press Right Shift+G keys and hold for 0,06 seconds and release
End Condition

slicker55

  • Newbie
  • *
  • Posts: 17
Re: Two-Way Switch (Separate Key Commands) with acknowledgment 'Beep'....
« Reply #2 on: December 01, 2018, 03:14:43 PM »
A million thanks - as always, absolutely brilliant!
 :)