_addSwatchSel()
function _addSwatchSel(){
var ActionString = [
'/version 3',
'/name [ 4',
' 5f747474',
']',
'/isOpen 1',
'/actionCount 1',
'/action-1 {',
'/name [ 12',
' 41646453776174634853656c',
' ]',
'/keyIndex 0',
'/colorIndex 0',
'/isOpen 0',
'/eventCount 1',
'/event-1 {',
'/useRulersIn1stQuadrant 0',
'/internalName (ai_plugin_swatches)',
'/localizedName [ 8',
' 5377617463686573',
' ]',
'/isOpen 0',
'/isOn 1',
'/hasDialog 0',
'/parameterCount 2',
'/parameter-1 {',
'/key 1835363957',
'/showInPalette -1',
'/type (enumerated)',
'/name [ 19',
' 4164642053656c656374656420436f6c6f7273',
' ]',
' /value 9',
' }',
'/parameter-2 {',
'/key 1634495605',
'/showInPalette -1',
'/type (boolean)',
'/value 0',
' }',
' }',
'}'
].join('\n');
createAction(ActionString);
var ActionString = null;
app.doScript("AddSwatcHSel", "_ttt", false);
app.unloadAction("_ttt","");
}
function createAction (str) {
var f = new File('~/_ttt.aia');
f.open('w');
f.write(str);
f.close();
app.loadAction(f);
f.remove();
}
function readFile (_file) {
_file.open('r');
var _arrStr=_file.read();
_file.close();
return _arrStr
}