Question
Scripting roughen with live effect
I'm trying to apply roughen with a script. The executeMenuCommand gives a popup, but I want the options to be automated.
The script below works (applies the roughen), but I don't now which data I can put in the Dict. Does somebody now what variables there are for LiveEffect roughen?
#target illustrator
function test() {
var doc = app.activeDocument;
var p = doc.selection[0];
roughendetail = 2;
var effectStr = '<LiveEffect name="Adobe Roughen"><Dict data="R RoughenDetail 50 R RoughenAbsoluteSize 1 R RoughenPoints 2 R RoughenDetail 50 R RoughenSize 10 "/></LiveEffect>';
//var effectStr = '<LiveEffect name="Adobe Roughen"><Dict data="R Detail #RoughenDetail#"/></LiveEffect>'.replace(/#RoughenDetail#/, roughendetail);
p.applyEffect(effectStr);
//radius = 3;
//var xml = '<LiveEffect name="Adobe Fuzzy Mask"><Dict data="R Radius #Radius# "/></LiveEffect>'.replace(/#Radius#/, radius);
//p.applyEffect(xml);
};
test();
