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.

Using Macros in the script editor

Featured Replies

Hi,

This example is from the AAO manual and I want to execute it from the script editor (not from a file).

<Macro·Name=“strobelightmacro“>A:LIGHT·STROBE,·Bool</Macro>
(@strobelightmacro)·1·==·if{·1·(>K:STROBES_TOGGLE)·}
(A:LIGHT·STROBE,·Bool)·1·==·if{·1·(>K:STROBES_TOGGLE)·}

The Red Led on the editor is on to indicate something is wrong.

Question is, does the script editor supports macros?

https://imgur.com/a/6icp5q3

 

Thanks.

 

  • Commercial Member

Generally speaking, yes. Remember that macros are a global thing, once established, they are valid everywhere, not just in this script. 

I would suggest using a multi line script for this. And I am not entirely sure that it would work with the "Test" button, you may have to run it with the extra dialog.

<Macro·Name=“strobelightmacro“>A:LIGHT·STROBE,·Bool</Macro>·\n
(@strobelightmacro)·1·==·if{·1·(>K:STROBES_TOGGLE)·}·\n
(A:LIGHT·STROBE,·Bool)·1·==·if{·1·(>K:STROBES_TOGGLE)·}·\n

On a side note, to avoid typing too much, I usually prefer using registers. They have the added benefit that they can be updated too during processing.

(A:LIGHT·STROBE,·Bool)·s0
l0·1·==·if{·1·(>K:STROBES_TOGGLE)·}
l0·0·==·if{·...·}

 

LORBY-SI

Archived

This topic is now archived and is closed to further replies.

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.