Take the following example:
I have a hotkey linked to the TOGGLE_ALTERNATOR1 event. it looks like this...
But now what if I want to do the same thing using a script instead? Easy... It's a one liner... literally.. the one line is
Code: Select all
HIDMacros.FSXEvent "TOGGLE_ALTERNATOR1", 0
Not for the real question... Why in the world would I want to do that in the first place?
Simple... I fly multi-engine planes...
Code: Select all
HIDMacros.FSXEvent "TOGGLE_ALTERNATOR1", 0
HIDMacros.FSXEvent "TOGGLE_ALTERNATOR2", 0
HIDMacros.FSXEvent "TOGGLE_ALTERNATOR3", 0
HIDMacros.FSXEvent "TOGGLE_ALTERNATOR4", 0
Which makes it look like this...
Of course that is by no means the only reason for using the script rather than the "Send Simconnect Event (FSX)" dropdown box. In the same way you can send multiple events for whatever reason you like... For example the plane that I like to fly the most has it's left and right landing lights set to different switches... which for cockpit builders is a dream... but while I was still using keyboards to control the lights rather than switches, I needed the following code in order to turn them both on and off with a single keypress so I didn't overload what was already two full keyboards (not counting my regular windows keyboard).
Code: Select all
HIDMacros.FSXEvent "TOGGLE_LOGO_LIGHTS", 0
HIDMacros.FSXEvent "LANDING_LIGHTS_TOGGLE", 0
At any rate I hope this gets you started with some simple "one liner" scripting..