Hi
I need a script that loads an action set(*.atn file) in Photoshop CS5. I searched but couldn't find any solution regarding this.
Please help.
Thanks!
How to load .atn file in Photoshop?
-
Mikaeru
How to load .atn file in Photoshop?
poortip wrote:I need a script that loads an action set(*.atn file) in Photoshop CS5. I searched but couldn't find any solution regarding this.
This works for me in Photoshop CS and CS4 under Mac OS X 10.6.8; please give it a try:
Code: Select allfunction actionsFileFilter (f)
{
return (f instanceof Folder) || ((f.type === '8BAC') || f.name.match (/\.atn$/i));
}
var select = (File.fs === "Macintosh") ? actionsFileFilter : "Actions Files:*.atn,All Files:*";
var inFile = File.openDialog ("Choose an actions file:", select);
if (inFile)
{
app.load (inFile);
}
HTH...
This works for me in Photoshop CS and CS4 under Mac OS X 10.6.8; please give it a try:
Code: Select allfunction actionsFileFilter (f)
{
return (f instanceof Folder) || ((f.type === '8BAC') || f.name.match (/\.atn$/i));
}
var select = (File.fs === "Macintosh") ? actionsFileFilter : "Actions Files:*.atn,All Files:*";
var inFile = File.openDialog ("Choose an actions file:", select);
if (inFile)
{
app.load (inFile);
}
HTH...
-
Mike Hale
How to load .atn file in Photoshop?
Yes, use app.load to add atn or preset files to Photoshop.
-
Mikaeru
How to load .atn file in Photoshop?
Alternatively, instead of using the built-in function app.load (), you can define an equivalent function loadFile () made of Action Manager code:
Code: Select allfunction loadFile (file)
{
var descriptor = new ActionDescriptor ();
descriptor.putPath (app.stringIDToTypeID ("target"), file);
app.executeAction (app.stringIDToTypeID ("open"), descriptor);
}
Code: Select allfunction loadFile (file)
{
var descriptor = new ActionDescriptor ();
descriptor.putPath (app.stringIDToTypeID ("target"), file);
app.executeAction (app.stringIDToTypeID ("open"), descriptor);
}