July 25, 2025Jul 25 Hello again. I've spent a bit of time trying to figure this one out, but to no avail. I'm trying to have a single StreamDeck + button operate a three position switch that has a held position for a TEST purpose which illuminates a green light. This is in the Cessna Longitude in FS2020. The aircraft checklist states that the switch should be held in the down TEST position for a minimum of ten seconds. Here is what I've found in the devel mode Behaviours>Bindings... Behaviours Bindings ELECTRICAL_Battery_STBY-3-Inc ELECTRICAL_Battery_STBY-3-Dec ELECTRICAL_Battery_STBY-3-Set I have also installed a script from the web into my streamdeck for the Longitude and it gives me this... ELEC StbyPwr TOGGLE (L:XMLVAR_BatterySTBY_SwitchState,·Bool)·0·== if{·1·(>B:ELECTRICAL_Battery_STBY_3_Set)·} els{·0·(>B:ELECTRICAL_Battery_STBY_3_Set)·} Once again my lack of knowledge limits me in that I don't know how to make this work with a single button in my streamdeck. I've tried various options, but I can't get the switch to hold down for ten seconds. I don't know how to make use of the script. I've tried assigning it to a keyboard button as per the LorbyAxisAndOhs_MSFS_Document section 5 Scripting, but I can't get the switch to hold for ten seconds in the TEST position. Here are the three positions... Centre (OFF) 1, Down (TEST) 2, Up (ON) 0 Do you have any ideas on how to get a single streamdeck button to make this work? I'm at a loss, but keen to learn another lesson!! Regards...Kenny.
July 25, 2025Jul 25 Commercial Member There is no easy answer. This is a complex requirement that needs serious thought. Instinctively I would say that this is impossible to do with a single button. But I may have two ideas how to do it anyway. I will try them out tonight and let you know. LORBY-SI
July 25, 2025Jul 25 Commercial Member Here is an idea: use short vs. long click, for example with an Event Action. - Configure the short click to ony toggle between OFF and ON. Try B: ELECTRICAL_Battery_STBY_3_Toggle - Configure long click "down" to trigger TEST using B: ELECTRICAL_Battery_STBY_3_Set with value 2 - Configure long click "Up" to trigger OFF using B: ELECTRICAL_Battery_STBY_3_Set with value 1 When you want to test, you are holding down the button anyway, so long click will be triggered. Then it is just a matter to reset the switch when you release long click. Edited July 25, 2025Jul 25 by Lorby_SI LORBY-SI
July 25, 2025Jul 25 Commercial Member 21 hours ago, kenny584 said: Do you have any ideas on how to get a single streamdeck button to make this work? I'm at a loss, but keen to learn another lesson!! This works: https://www.dropbox.com/scl/fi/6valoin0htiv7fqcwxpwv/Profil-2.streamDeckProfile?rlkey=fezz9z4headf508tigroepiq2&dl=0 I am using a MultiGauge Action 1. I've created three Image definitions, one each for ON, OFF and TEST. I am using the Citation icons from @guenseli s icao pack from flightsim.to (CitSwitchBig_ON.png, CitSwitchBig_OFF.png, CitSwitchBig_Test.png) 2. For each image definition I used B: ELECTRICAL_Battery_STBY_3 as visibility variable and supply the Visibility value as required (0, 1 and 2) 3. The "Button Settings" are as follows: Key down event: Type "S:" Code: "1 (B:ELECTRICAL_Battery_STBY_3) - (>B:ELECTRICAL_Battery_STBY_3_Set)" Event value: "0" Long press down: Type "S:" Code: "2 (>B:ELECTRICAL_Battery_STBY_3_Set) 1 (>L:XMLVAR_STBYBattery_IsHeld, Number)" Long press up: Type "S:" Code: "1 (>B:ELECTRICAL_Battery_STBY_3_Set) 0 (>L:XMLVAR_STBYBattery_IsHeld, Number)" Operation: A normal short press/release of the button toggles between ON and OFF. Holding the button down will engage TEST, releasing the button makes the switch go back to OFF. Edited July 25, 2025Jul 25 by Lorby_SI LORBY-SI
July 25, 2025Jul 25 Author Hello again. I'm just running through the various bits of information in the Devel Mode Behaviours. Boy, there's a lot to learn and understand, but I can begin to see how things are worded and the reactions when I press things in the aircraft. Thanks for taking the time to research this for me, I appreciate it. I've downloaded the profile and I'll go and get the icons you mentioned. May I ask how I set the value's of 2 and 1 that you mention here? 15 hours ago, Lorby_SI said: Configure long click "down" to trigger TEST using B: ELECTRICAL_Battery_STBY_3_Set with value 2 - Configure long click "Up" to trigger OFF using B: ELECTRICAL_Battery_STBY_3_Set with value 1 I'm confused as to whether I enter a 'space' or a ':' after the word '_Set'. I'm happy enough getting IE code from the Scripts Editor and simply enering a 1 or a 0 in the Event Value box, but entering a value at the end of a line is new to me and the Long press down and up doesn't have input boxes. I'll use the codes from your new reply obviously, but I wondered about setting the values at the end of a line. Cheers...Kenny Haaa,Haaa. That works, as you know of course!!! Thank you so much. I've just got to figure out how it works...lol. I really am in awe of what you do.😃 Edited July 25, 2025Jul 25 by kenny584
July 26, 2025Jul 26 Commercial Member 8 hours ago, kenny584 said: trigger TEST using B: ELECTRICAL_Battery_STBY_3_Set with value 2 **************** entering a value at the end of a line is new to me Actually, you don't. Those are just words, not actual code. I tried to write this in such a way that it corresponds to the input fields = configuring the key down/up events on the SD actions consists of three parts: - the type, which you select on the little dropdown combobox, in this case "B:" - the name of the item, which goes into the textbox next to the dropdown, in this case "ELECTRICAL_Battery_STBY_3_Set" - finally the value, in this case "2" which goes into the box below the dropdown I my answer I forgot that the "long press" options don't have the value box. So when you want to send anything else than the value "0", you have to use the option "S:" and enter proper RPN code (S: means "script code"): "2 (>B:ELECTRICAL_Battery_STBY_3_Set)" This was an oversight on my part, I will probably add the value boxes in one of the next versions of the plugin to make it more consistent with the key down/up fields In the end, the code was way more complex than I thought, so writing this was for nothing anway. Edited July 26, 2025Jul 26 by Lorby_SI LORBY-SI
July 26, 2025Jul 26 Author Thanks for the heads up. At my level of knowledge, it's like a new language to learn. Could you recommend a beginners document for RPN? I've looked at a lot of the SDK stuff on the web, but I got led down an xml side road. In fact, a lot of it makes use of xml, and I don't really have the time to learn to that level. That's why I love AAO and my SD+ and X touch mini. It's so straightforward. Aside from getting stuck with a new problem of course!! 🙄 Regards...Kenny. p.s. here's an afterthought. In AAO, I have a script for the longitude. When I open it in AAO, I see lots of subscripts. When I click on one it opens in the main pane with, what to me at present, seems like a complex line of RPN script code. Do I simply copy it and right click it into the textbox? Like the example you give above, including the quotation marks and brackets. I've shied away from that script because I don't fully understand what I'm supposed to do with the RPN line of code Edited July 26, 2025Jul 26 by kenny584
July 26, 2025Jul 26 Commercial Member 3 hours ago, kenny584 said: Do I simply copy it and right click it into the textbox Use the compiled code from the gray textbox below the editor. The code in the white box contains formatting characters. But. You don't have to copy any code to the SD when there is a script with that code in AAO. All scripts can be called as K: events using the eventname "scriptgroup-scriptname" See AAO manual, chapter about scripting. LORBY-SI
Create an account or sign in to comment