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 name | What it is |
|---|---|
ScriptClasses.CustomImage | An image a script can draw on and hand to the game as a texture. |
ScriptClasses.KeyTracker | Tracks key names marked pressed by JsMacros key and keybind state calls; it does not query physical keyboard state. |