May 13, 20242 yr Hello! I am no programer, this could be the reason if this question sounds dumb or so. I wonder if it is possible with AAO to create a script that executes LVARs one after another with a set time in between. For example, I want to setup one button for some after takeoff items to be executed one after another when I push a hardwarebutton. There should be some time (1 or 2 sec) between the execution and I want to use LVARs that I use for normal button assignment. Can anyone give me an example if this is possible? Thank you very much! Klaus Schmitzer i7-14700KF 5.6GHz Water Cooled /// ZOTAC RTX 4070 TI Super 16GB /// 32GB RAM DDR5 /// Win11 /// SSDs only DCS - XP12 - MSFS2020
May 13, 20242 yr Commercial Member 1 hour ago, Rhinozherous said: Can anyone give me an example if this is possible? Yes, of course that is possible. The scripting engine is very powerful. People have built their own virtual copilot/flight attendant/natural speech controlled ATC/etc. with AAO. There are several ways of doing this, but choosing the right one depends on the complexitiy of what you want to do. It would help if you gave a concrete example of what you actually want to happen. (For example, LVars are actually not assets for controlling something. Changing the value of an LVar may do something by accident on some aircraft, on others it my work by design because the aircraft developer made it so. But by and large controlling knobs and switches is not what LVars do. So it would be important to have an example of what you want to do with which aircraft in particular) Edited May 13, 20242 yr by Lorby_SI LORBY-SI
May 13, 20242 yr Author 1 hour ago, Lorby_SI said: Yes, of course that is possible. The scripting engine is very powerful. People have built their own virtual copilot/flight attendant/natural speech controlled ATC/etc. with AAO. There are several ways of doing this, but choosing the right one depends on the complexitiy of what you want to do. It would help if you gave a concrete example of what you actually want to happen. (For example, LVars are actually not assets for controlling something. Changing the value of an LVar may do something by accident on some aircraft, on others it my work by design because the aircraft developer made it so. But by and large controlling knobs and switches is not what LVars do. So it would be important to have an example of what you want to do with which aircraft in particular) I have nothing fancy in mind. For example my after takeoff items for the JustFlight BAE146 are: Engine Air - All 4 ON APU Air - OFF APU Master - OFF Both Packs - ON AC Pump - OFF PTU - OFF I had in mind to start these actions with a single button press on my hardware. Right now I have most of the switches bound to several buttons on my MFDs with LVARs. So far the LVARs seem to do their job. In high workload situations it would be nice to not switch these buttons one by one... Just press one button and they all get set in that order. Edited May 13, 20242 yr by Rhinozherous Klaus Schmitzer i7-14700KF 5.6GHz Water Cooled /// ZOTAC RTX 4070 TI Super 16GB /// 32GB RAM DDR5 /// Win11 /// SSDs only DCS - XP12 - MSFS2020
May 14, 20242 yr Commercial Member 19 hours ago, Rhinozherous said: I have nothing fancy in mind. For example my after takeoff items for the JustFlight BAE146 are: Engine Air - All 4 ON APU Air - OFF APU Master - OFF Both Packs - ON AC Pump - OFF PTU - OFF I had in mind to start these actions with a single button press on my hardware. Right now I have most of the switches bound to several buttons on my MFDs with LVARs. So far the LVARs seem to do their job. In high workload situations it would be nice to not switch these buttons one by one... Just press one button and they all get set in that order. I am not familiar with this plane (anymore). How do you operate these items when you assign them to a button? I have the 146, and I seem to remember that initially many things were done with LVars. But that was then, things may have changed. What are the names of these LVars? Edited May 14, 20242 yr by Lorby_SI LORBY-SI
May 14, 20242 yr Commercial Member OK, so here are some examples This will turn all 4 Engine Air switches ON: 1·(>L:OVHD_AIRSUPPLY_Eng1,·Number)·1·(>L:OVHD_AIRSUPPLY_Eng2,·Number)· 1·(>L:OVHD_AIRSUPPLY_Eng3,·Number)·1·(>L:OVHD_AIRSUPPLY_Eng4,·Number)· This will turn them OFF 0·(>L:OVHD_AIRSUPPLY_Eng1,·Number)·0·(>L:OVHD_AIRSUPPLY_Eng2,·Number)· 0·(>L:OVHD_AIRSUPPLY_Eng3,·Number)·0·(>L:OVHD_AIRSUPPLY_Eng4,·Number)· This will turn them ON with a 500ms delay between actuations, then wait for 5 seconds and then turns them off again 1·(>L:OVHD_AIRSUPPLY_Eng1,·Number)·(WAIT:500)·1·(>L:OVHD_AIRSUPPLY_Eng2,·Number)·(WAIT:500)· 1·(>L:OVHD_AIRSUPPLY_Eng3,·Number)·(WAIT:500)·1·(>L:OVHD_AIRSUPPLY_Eng4,·Number)·(WAIT:5000)· 0·(>L:OVHD_AIRSUPPLY_Eng1,·Number)·(WAIT:500)·0·(>L:OVHD_AIRSUPPLY_Eng2,·Number)·(WAIT:500)· 0·(>L:OVHD_AIRSUPPLY_Eng3,·Number)·(WAIT:500)·0·(>L:OVHD_AIRSUPPLY_Eng4,·Number)· LORBY-SI
May 14, 20242 yr Commercial Member And finally, this is probably the entire script (not sure if those are the correct buttons) 1·(>L:OVHD_AIRSUPPLY_Eng1,·Number)·(WAIT:500)·1·(>L:OVHD_AIRSUPPLY_Eng2,·Number)·(WAIT:500)· 1·(>L:OVHD_AIRSUPPLY_Eng3,·Number)·(WAIT:500)·1·(>L:OVHD_AIRSUPPLY_Eng4,·Number)·(WAIT:500)· 0·(>L:OVHD_AIRSUPPLY_Apu,·Number)·(WAIT:500)·0·(>L:OVHD_APU_StartStop,·Number)·(WAIT:500)· 1·(>L:OVHD_AIRCOND_Pack1,·Number)·(WAIT:500)·1·(>L:OVHD_AIRCOND_Pack2,·Number)·(WAIT:500)· 1·(>L:OVHD_HYD_AC_pump,·Number)·(WAIT:500)·0·(>L:OVHD_HYD_PTU,·Number) With a delay because it looks nice, but you can also lose all the WAIT commands, no problem. LORBY-SI
May 14, 20242 yr Commercial Member How did I do it: I loaded the 146, waited until I was sitting in the cockpit Then, after AAO was connected, I used "Scripting->Read LVars from sim" After that was complete, I opened the script Editor. Now I can use the "Insert sim var" button to open the selection dialog, and all the 146s LVars will be in there. I use the Filter box at the bottom to look for them. When the dialog opens, you can immediately start typing, for example "apu" and then press Enter. The treelist will be reduced to those groups that contain variables with "apu" in their name. Open "Local Simulator Variables", there you will find those from the 146 After selecting the variable, it will be copied into the script as if you want to read from it. You now have to change the code, add the value in front of the LVar and add the ">" sign. Be mindful that AAO RPN scripts must use currect syntax, AAO does not tolerate any errors. The scripts must be written exactly as in my examples, space characters, upper/lower case, all of that is important. Edited May 14, 20242 yr by Lorby_SI LORBY-SI
May 14, 20242 yr Author Wow, thank you very much! I will play with these examples! Klaus Schmitzer i7-14700KF 5.6GHz Water Cooled /// ZOTAC RTX 4070 TI Super 16GB /// 32GB RAM DDR5 /// Win11 /// SSDs only DCS - XP12 - MSFS2020
Archived
This topic is now archived and is closed to further replies.