Embedded Python
A real Python interpreter inside the avatar window, with the whole Automation action list available to it. This chapter starts from nothing and ends with scripts you can leave running.
The Python Runner
Where it is, what is already loaded when a script starts, and what happens when you press Run.
Open topic →Ten scripts, and which of them run
One avatar can keep ten scripts. Each has a name and a number, each has an output area of its own, and each can be told to start by itself.
Open topic →Your first script
Two lines that change nothing, so you can see the shape of a result before anything acts on it.
Open topic →Calling any action at all
The friendly methods cover the common ground. Underneath them is one call that reaches everything.
Open topic →Reading the answer, and reading a refusal
Every call answers. Understanding the two shapes an answer can take is most of what makes a script reliable.
Open topic →Time, and answers that arrive later
The single thing that catches everybody out: asking for something does not mean it has happened yet.
Open topic →Scripts that do something useful
Three complete scripts, each short enough to read in one go and each doing a real job.
Open topic →What a script is not allowed to do
The boundaries are the same ones the buttons have, and they are worth knowing before you write something that hits one.
Open topic →