Suspend History States
is there way stop steps in script showing in history.
i have seen other posts talking suspendhistory `i not familiar how use call
say need run following code:
var doc = app.activedocument; var lay = doc.activelayer; var dup = lay.duplicate(); dup.name = "friday"; dup.applygaussianblur (20); alert("too wine");
this leaves 3 steps in history palette.
the suspendhistory() method accepts 2 params: string going appear in history palette in lieu of 3 "normal" steps; , 6 lines of extendscript i've written above. e.g.
app.activedocument.suspendhistory('swing', 'var doc = app.activedocument; var lay = doc.activelayer; var dup = lay.duplicate(); dup.name = "friday"; dup.applygaussianblur (20); alert("too wine");'
usually won't stick code string, following usual pattern:
function main() { var doc = app.activedocument; var lay = doc.activelayer; var dup = lay.duplicate(); dup.name = "friday"; dup.applygaussianblur (20); alert("too wine"); } app.activedocument.suspendhistory ("swing", "main()");
hope helps,
davide
More discussions in Photoshop Scripting
adobe
Comments
Post a Comment