Skip to content

ScriptClasses ​

Gives scripts access to image creation and key-tracking utilities through the ScriptClasses global.
Call their static methods directly on the named type.

js
const image = ScriptClasses.CustomImage.createWidget(16, 16, "badge");  
image.setGraphicsColor(Color.rgb(0xFF, 0xFF, 0xFF));  
image.fillRect(0, 0, 16, 16);  
image.update();

These names are available in JavaScript and Python without importing anything. They are read-only aliases of Java types, so instanceof works as usual.

Script nameWhat it is
ScriptClasses.CustomImageAn image a script can draw on and hand to the game as a texture.
ScriptClasses.KeyTrackerTracks key names marked pressed by JsMacros key and keybind state calls; it does not query physical keyboard state.