Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Is there a script to restart the scripts in LAAOH

Featured Replies

During my flights, individual LVAR values are sometimes no longer read correctly. I then have an incorrect speed display on my Streamdeck, or no value is displayed at all. 
When I check the value using the “Watch simulator variables” function, an incorrect value is also displayed there, which does not correspond to the flight status.
I can solve this very easily by opening the script editor and closing it again immediately. After that, the incorrectly read value is correct again.
However, since I have to exit full-screen mode to do this, it is a bit cumbersome.
So my question is: is there a script that allows me to achieve the same effect and that I can then call up via a button on the Stream Deck?
Thanks for your help, Stefan.

Edited by Stefan01

regards
Stefan Liebe

  • Commercial Member

That sounds more like a deeper problem with those LVars or the way that are used. What aircraft reports the speed as an LVar?? That is highly unusual. If I had to guess then there is either a massive error situation in the scripts or some other kind of lag is induced, so the variables are no longer read quickly enough.

In any case, what is happening when you close the editor is that the entire aircraft configuration is reloaded. It is essentially the same as disconnecting AAO and reconnecting it. There is no single command to do that, because in normal operations it should not be necessary. Also, once you disconnect, the script processing stops, so you can't reconnect. You can try switching to an offline config that you create specifically for this (AAO_OFFLINE_MODE:...), which will then activate online mode with an autoscript (AAO_ONLINE_MODE).

But my recommendation would be to identify and fix the core problem with your variables/scripts instead.

LORBY-SI

  • Author

Thanks for the quick reply.
It's the Fenix A320 and the B777F from PMDG. As far as I remember, in the case of the A320, it was the variable (L:I_FCU_SPEED_MODE, Bool) that controls what is displayed. In the case of the B77F, it was (L:switch_2281_a, Number) that controls whether an image is shown in the Stream Deck. I can't remember the previous cases exactly. The values are only read out, so I don't know what can be changed in the program.

I tried the command (AAO_ONLINE_MODE).
It terminates SimConnect and puts AAO into offline mode.
However, I have not yet found the command to reconnect to SimConnect. So far, the only way to do this is to click on the green dot behind the SimConnect text in the AAO GUI. Is there a command for this?

Edited by Stefan01

regards
Stefan Liebe

  • Commercial Member
1 hour ago, Stefan01 said:

However, I have not yet found the command to reconnect to SimConnect.

It is the same one, this is a toggle. But when you disconnect, scripts are no longer executed, this is a dead end.

The only way I can see this working is to create a configuration that only has one autoscript with (AAO_ONLINE_MODE) in it. Then you create another script that calls up this configuration in offline mode with (AAO_OFFLINE_MODE:...). When you call this script, it loads the config, which will then execute the autoscript to reconnect. 

I can add a command to force the reload of a configuration, but that requires a new AAO version. There are no plans for a new release at this moment.

It still feels wrong though, what you describe shouldn't happen. There must be interference of some kind.

- In the "Application" menu, make sure to activate "MSFS SU12 LVar processing". 
- be careful with Beta versions of the sim, they may not work as expected with AAO.
- if possible, avoid having other addons running alongside AAO that are essentially doing the same thing (=MobiFlight, FSUIPC, SPAD)
- check the AAO logfiles for (massive amounts of) error messages

 

Edited by Lorby_SI

LORBY-SI

  • Commercial Member

In more detail:
You create two scripts
1. Create the disconnect script 
Group "Scripts"
Title: "Disconnect"
Code: "(AAO_OFFLINE_MODE:Disconnect)"

2. Create the reconnect script
Group "Scripts"
Title: "Reconnect"
Code: "(AAO_ONLINE_MODE)"

3. Create a new config
- Click on the red LED to activate OfflineMode
- At the bottom of the selection dialog type "Disconnect" into the blue box and press "Create New".
- Select "Disconnect" from the list and doubleclick it
- Go to "Scripting->Aircraft automated scripts"
- Select the script "Reconnect" from the group "Scripts" that you created earlier
- Select "One shot" and "Beginning"
- Press "Add/Update" so the script appears in the list on the left
- Close

When you are connected to the sim and want to restart, call the script "Scripts->Disconnect". This will call the config of the same name in offline mode, which will then go back to online mode due to the autoscript.

Edited by Lorby_SI

LORBY-SI

  • Author

Thank you very much for the very detailed description. I followed it exactly.
When I press the button assigned to the “Disconnect” script, AAO briefly goes into offline mode (red light). In offline mode, all variables such as altitude, speed, etc. disappear from the autopilot display on the Streamdeck. That's how it should be.
After a very short time, it returns to SimConnect mode (green light). The template for the aircraft is also reloaded, but the variables are not reread and the scripts associated with the buttons do not work.
This only works again when I click on SimConnect (green light) twice. Only then are the scripts and variables loaded and displayed on the Streamdeck.

regards
Stefan Liebe

  • Commercial Member
18 minutes ago, Stefan01 said:

Thank you very much for the very detailed description. I followed it exactly.
When I press the button assigned to the “Disconnect” script, AAO briefly goes into offline mode (red light). In offline mode, all variables such as altitude, speed, etc. disappear from the autopilot display on the Streamdeck. That's how it should be.
After a very short time, it returns to SimConnect mode (green light). The template for the aircraft is also reloaded, but the variables are not reread and the scripts associated with the buttons do not work.
This only works again when I click on SimConnect (green light) twice. Only then are the scripts and variables loaded and displayed on the Streamdeck.

I'm sorry, but that doesn't make any sense to me. (AAO_ONLINE_MODE) calls the exact same method as clicking on the green LED does...

In any case, it looks like there is no solution within AAO at the moment. It would be better if you found out why your LVars start to go wrong. Maybe switch to the legacy LVar processing with the option in the "Application" menu. 

The problem is, that you are the only one reporting this. From that, I have to assume that there is something uniquely wrong on your computer - whatever it might be.

Edited by Lorby_SI

LORBY-SI

  • Author

Nevertheless, thank you very much for your support.

regards
Stefan Liebe

  • Commercial Member
2 hours ago, Stefan01 said:

Nevertheless, thank you very much for your support.

If you want, send an email to the support address (last page of the manual) with your proof of purchase. I can add separate reconnect/reload commands to the current development version and you can try that. Just be aware that this version is very raw, far from being released. So there is a risk of even more complications than you have now.

Edited by Lorby_SI

LORBY-SI

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.