/*{
"author": "Mark Kats",
"targets": ["omnigraffle"],
"type": "action",
"identifier": "com.example.ex",
"version": "1.0",
"description": "",
"label": "EX(9)",
"mediumLabel": "",
"longLabel": "",
"paletteLabel": ""
}*/
(() => {
var preferences = new Preferences("EX");
var action = new PlugIn.Action(function(selection, sender){
var selectedGraphics = document.windows[0].selection.graphics;
var layerNamesToExport = new Set();
var layersToEnable = [];
var layersToDisable = [];
var rectcolor, layerName;
var fileNumber = 0;
var SaveLayerName = preferences.read("SaveLayerName");
var SaveFileNumber = preferences.read("SaveFileNumber");
var isScriptEnabled = false;
var allLayers = document.windows[0].selection.canvas.layers;
var canvas = document.windows[0].selection.canvas;
var canvasGraphic = canvas.background;
Please add processing another type of file as json
chroma/lexers/embedded/json.xml
Lines 5 to 7 in 79621af
Here is its approximate structure, these are scripts for the OmniGraffle program