You can import a ready-made example from here: https://eu.eyeauras.net/share/S202402232313367YDKhksLfySg
To access the current state, name, actions, and triggers within the aura itself, you first need to locate the aura, and then you can explore its contents.
Often, scripts need to retrieve results from triggers' actions. For example, recognized text or coordinates of a found image. Let's start with something simple - finding out the current state of the aura, whether it is active or not.
Let's set up what we will work with in the script:
Examples at the root of the program, and within it, create a subfolder named FindAura.Switch in the subfolder.Fixed Value to the Switch aura. Essentially, this is just a manual switch.Script next to it (you can be creative with the name of this aura; it's not important).Script aura, create an OnEnter action of type C# Script.
var aura = AuraTree.GetAuraByPath(@".\Switch"); // or by absolute path AuraTree.GetAuraByPath(@"Examples\FindTrigger\Switch");
// print the status, it will be true/false or null (for undefined state)
Log.Info($"Aura {aura.FullPath} IsActive: {aura.IsActive}");

To access the aura tree (the left panel displaying your auras and folders), we use AuraTree.
The GetAuraByPath method can search by absolute or relative path. If the aura is not found, it will halt the script with an error. There is a similar method called FindAuraByPath, which returns null if nothing is found. This Get* and Find* pattern is common and can be relied upon in various scenarios.
Once we have found the aura, we can read its current state from the IsActive property. Additionally, there are other important and useful properties such as the aura's name, triggers, actions within it, and more. We will explore these in the following examples.