The Scripting Window is a simple code editor for writing and running Python scripts.

The code editor supports syntax highlighting for Python. The colors can be configured in the Python Preferences.

Options

An options menu is available by clicking on the gears icon at the bottom left:

title description
Show line numbers Show line number before each line.
Indent using spaces Indent code using spaces instead of tabs.
Window float on top Make the Scripting Window float on top of other windows.

Toolbar

The toolbar gives access to the Scripting Window’s main functions:

title description
Run Execute the current script.
Comment Comment the selected line(s).
Uncomment Uncomment the selected line(s).
Indent Add indentation to selected line(s).
Dedent Remove indentation from selected line(s).
Save Save the current script as a .py file.
Reload Reload the script from disk. Useful if the script has been edited by another application.
New Create a new empty script.
Open Open an existing script from .py file.
Edit With… Edit script with another application.

Script Browser

The Script Browser is a collapsible side panel which makes it possible to navigate through all scripts in a chosen folder.

open a script in the code editor
double-click a script
change the scripts folder
click on the pop up button and choose a folder
show/hide the script browser
click on the panel icon at the bottom left

Code interaction

The code editor offers special ways to interact with some types of values in your code. When selected, these values can be modified interactively by using modifier keys together with the mouse or the arrow keys.

bool

Boolean values can be toggled on/off like a switch with the mouse, or with the keyboard using the arrow keys.

modifiers ↑ or → or ↓ or ←
Toggle value on/off.

int / float

The value of integers and floats can be modified dynamically with the mouse like sliders, or with the keyboard using the arrow keys.

modifiers ↑ or → ↓ or ←
+1 -1
⌘ + ⌥ +0.1 -0.1
⌘ + ⇧ +10 -10
⌘ + ⌥ + ⇧ +0.01 -0.01

tuple

Selected pairs of numbers can be modified together with the mouse or with the keyboard, like a movement in xy space.

modifiers
+1 x -1 x +1 y -1 y
⌘ + ⌥ +0.1 x -0.1 x +0.1 y -0.1 y
⌘ + ⇧ +10 x -10 x +10 y -10 y
⌘ + ⌥ + ⇧ +0.01 x -0.01 x +0.01 y -0.01 y
Last edited on 11/01/2019