JavaScript Operation

Log-in or register.

JavaScript Operation

This document operation contains a JavaScript code that is executed when the operation is run. The code can access the active document and multiple of global objects.

The actual global objects and interfaces accessible from the JavaScript code may depend on the application you are using and the current document.

Also check out the video tutorial related to scripting.

Global objects


These global objects are likely to be available regardless the application used.

  • Application - get name and version of the application, open a create new documents, get or set contents of clipboard as text.
  • Configuration - make scripted operations configurable at runtime.
  • Document - provides access to the current document (save, duplicate, get/set name, get type-dependent interface).
  • Operation - configure and execute an operation.
  • Context - access window states (like selection or active color), stop processing and report errors.

Raster Image

  • DrawTool - modify raster image using draw tools.
  • Blender - combine an image with another one or a single color using defined blending function.


GUID: AC42806D-4914-42B8-B321-B77D5039B01C

Parameter nameTypeDefaultValueNote
ScriptstringJavaScript code performing the operation
CfgScriptstringJavaScript code initializing configuration dialog

Recent comments

user icon Anonymous on May 7th 2011

I am Sloan Gardner. I thought I would have to do the blending myself, but it can be done for me! :-)

user icon PacManSikaT registered user on November 25th 2011

? :-O

user icon Anonymous on November 4th 2013

I'm a big NOOB, aparently. How do I run a script?

user icon The_Creator registered user on November 27th 2016

What command do I put in to make something move.

user icon Anonymous on August 8th 2018

Any example to use JS in modify style??

user icon nibbler forum moderator on February 6th 2019

How do you add the script to the toolbar? I don't see any button to do that.

user icon nibbler forum moderator on February 8th 2019


user icon Anonymous
I wish there were...
What about ICL files?