# API
# sendScriptMessage args
- const string: "VIProUtils"
- selector string: "MethodName"
- string/style definition: NoteString/TagString/xml
# setTag
Add tags to all selected objects.
- Selector: "setTag"
- String: "TagString"
alert(app.sendScriptMessage("VIProUtils", "setTag", "test"));
# removeTag
Remove all tags from all page items.
- Selector: "RemoveTag"
- String: ""
alert(app.selection[0].sendScriptMessage("VIProUtils", "removeTag", ""));
# removeTagSelected
Remove all tags from all selected page items.
- Selector: "RemoveTagSelected"
- String: ""
alert(
app.selection[0].sendScriptMessage("VIProUtils", "removeTagSelected", "")
);
# applyPaint
Apply Stroke or Fill all objects that has the target tag. If a swatch is specified, it will take precedence.
- Selector: "applyPaint"
- XML_String for Stroke:
<cmd>
<tag>tagName</tag>
<stroke>
<color>
<swatch>swatchName</swatch>
<cyan>RealNumber</cyan>
<magenta>RealNumber</magenta>
<yellow>RealNumber</yellow>
<black>RealNumber</black>
</color>
<weight>RealNumber</weight>
</stroke>
</cmd>
alert(
app.sendScriptMessage(
"VIProUtils",
"applyPaint",
"<cmd><tag>test</tag><stroke><color><cyan>0.5</cyan><magenta>0.5</magenta><yellow>0</yellow><black>0</black></color><weight>4</weight></stroke></cmd>"
)
);
alert(
app.sendScriptMessage(
"VIProUtils",
"applyPaint",
"<cmd><tag>test</tag><stroke><color><swatch>Black</swatch></color><weight>4</weight></stroke></cmd>"
)
);
alert(
app.sendScriptMessage(
"VIProUtils",
"applyPaint",
"<cmd><tag>test</tag><fill><color><cyan>0.5</cyan><magenta>0.5</magenta><yellow>0</yellow><black>0</black></color></fill></cmd>"
)
);
alert(
app.sendScriptMessage(
"VIProUtils",
"applyPaint",
"<cmd><tag>test</tag><fill><color><swatch>Black</swatch></color></fill></cmd>"
)
);
# getSymbolList
Get current document's symbol list
- Selector: "getSymbolList"
- String: ""
- Return: CSV String
alert(app.sendScriptMessage("VIProUtils", "getSymbolList", ""));