Logic Pro X: Use the Script Editor
See the Scripter API overview for Scripter API documentation and code examples.
Script Editor parameters
Run Script button: Evaluate the script and configure the plug-in and parameters. Output, including errors, is shown in the Interactive Console when you click this button.
Live syntax checking, which highlights error lines immediately, making it easier to write your scripts.
Line numbers, which are useful for error checking because they are reported by line number in the Interactive Console.
Interactive Console: Displays debugging information and allows you to execute code on the command prompt by typing after the prompt and pressing Return. Type clear and press Return to clear the console.
Create and store a Scripter plug-in
Open the Scripter plug-in.
Click the Open Script In Editor button.
Click the Run Script button.
Test your plug-in to verify it behaves as intended.
Assuming no errors are shown in the Interactive Console, save the host document, setting, or patch containing the script.