- 精华
- 活跃值
-
- 积分
- 284
- 违规
-
- 印币
-
- 鲜花值
-
- 在线时间
- 小时
累计签到:2 天 连续签到:1 天
|
发表于 2024-8-23 19:02:34
|
显示全部楼层
[code] function playAction_SwitchColor() {
var set = 'Set_SwitchColor';
var action = 'Action_SwitchColor';
actionStr = ['/version 3', '/name [ 15', '5365745f537769746368436f6c6f72', ']', '/isOpen 1', '/actionCount 1', '/action-1 {', '/name [ 18', '416374696f6e5f537769746368436f6c6f72', ']', '/keyIndex 0', '/colorIndex 0', '/isOpen 1', '/eventCount 1', '/event-1 {', '/useRulersIn1stQuadrant 0', '/internalName (ai_plugin_setColor)', '/localizedName [ 12', 'e8a8ade5ae9ae9a18fe889b2', ']', '/isOpen 0', '/isOn 1', '/hasDialog 0', '/parameterCount 1', '/parameter-1 {', '/key 1836349808', '/showInPalette -1', '/type (enumerated)', '/name [ 21', 'e58887e68f9be5a1abe889b2e88887e7ad86e795ab', ']', '/value 7', '}', '}', '}'].join('\n');
createAction(actionStr, set);
try {
app.loadAction(f_180902);
} catch (e) {
alert('尚未指定路径或路径有误或文件不存在,\n请重新选取');
}
app.doScript(action, set);
app.unloadAction(set, '');
f_180902.remove();
function createAction(actionStr, set) {
f_180902 = new File('~/Desktop/' + set + '.aia');
f_180902.open('w');
f_180902.write(actionStr);
f_180902.close();
f_180902.hidden = true;}}[/code]
这段动作代码,怎么能转化成纯JS代码 |
|