|
The script registry contains all user scripts and its contents are used to create the Script menu. The script registry is implemented in the (sub-)package Sketch.Scripting. Because the Scripting package is not automatically imported by the Sketch package, you have to import Sketch.Scripting explicitly before accessing the registry functions.
Functions in the registry package:
Add the function function to the registry under the name name. name is used internally to identify the script and should be unique.
The parameter title defines the text for the menu-entry.
The function accepts these optional keyword arguments:
Sketch.Scripting.AddFunction('abut_horizontal', 'Abut Horizontal', abut_horizontal, menu = 'Arrange') |
|
|
|