Airscript

Airscript expressions can be applied in a wide variety of places within the Studio. Whenever an input box contains the Airscript icon on the bottom right, that means that entered values will be parsed as Airscript by default.

The following example shows two Airscript expression editors, one empty (left) and one containing an Airscript expression (right). Note the Airscript icon at the bottom right of both editors:

The icon to the both left can be clicked to expand the Airscript expression editor so that it opens in a larger pop-up in the middle of the screen. Expanding the Airscript expression editor makes it easier to define and edit more complicated Airscript expressions.

Testing Airscript Expressions

When working with Airscript, it's often advantageous to test an Airscript expression before implementing it. There are two ways to test Airscript Expressions: the Sandbox, which exists outside of the Studio and can be used without needing to logging into the Airkit platform, and the Airscript Console, which is part of the Studio and as access to local variables.

The Sandbox

https://studio.airkit.com/play/ provides a sandbox environment to test Airscript expressions outside of any application.

Airscript Console

The Airscript Console is found near the bottom of the Studio, to the immediate right of the Variable Tree. It evaluates Airscript expressions and displays a record of what previous expressions have returned. The Airscript Console has access to all Airscript functions and operators as well as local variables. For testing purposes, it will evaluate local variables as if they have the value assigned to them in the Variable Tree. In the following example, for instance, session.example was evaluated as though it had the value "Hello, world!":

Additional expressions can be tested by entering them to the right of the '>' icon at the bottom of the interface and pressing enter.

Last updated