Scripter2 API

Scripter2 API is described below. This is a reference for the actual documentation of new scripter.

See also rather : https://scribus-scripter.readthedocs.org/en/latest/

The new Scripter is composed of different modules, which are either accessible externally, or via methods of other apis.

activeDocument

 * This property return DocumentAPI object.


 * Usage:


 * document = Scripter.activeDocument


 * Here document will represent the active document, and is of type DocumentAPI

activeWindow

 * This property return WindowAPI object.


 * Usage:
 * window = Scripter.activeWindow


 * Here, window will represent the active window, and is of type WindowAPI. See WindowAPI for methods and properties available for this object.

colors

 * This property will return a list of default colors in Scribus, each color as an object of ScColorWrapper.


 * Usage:
 * colors = Scripter.colors
 * for i in colors:
 * print i.name
 * Result:
 * Black
 * Blue
 * Cool Black
 * Cyan
 * Green
 * Magenta
 * Red
 * Registration
 * Rich Black
 * Warm Black
 * White
 * Yellow

Methods

 * save
 * saveAs(name)
 * setInformation(author, title, comment)

Layer Methods in activeDocument

 * newLayer
 * removeLayer
 * getActiveLayer
 * getActiveLayerName
 * setActiveLayer

Color Methods in activeDocument

 * newColorCMYK
 * newColorRGB
 * getColor

Printer method

 * Printer

Image Export methods

 * supportedImageTypes
 * exportAsImages

Properties

 * top
 * left
 * right
 * bottom

Properties

 * width
 * height

Properties

 * number
 * items
 * position
 * selection

Methods

 * newRectangle
 * newEllipse
 * newImage
 * newText
 * newLine
 * placeSVG
 * placeODG
 * placeEPS
 * placeSXD
 * savePageAsEPS

Properties

 * name
 * id
 * level
 * printable
 * viewable
 * editable
 * flowControl
 * outlineMode
 * transparency
 * blendMode
 * active

Properties

 * name
 * spotColor

Methods

 * changeCMYK
 * changeRGB
 * replace
 * remove