• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to load actions

New Here ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

this is my question:

i'v created an action to save my files into 3 different size,and each size should be save into the corresponding folder.

the problem is,i use this code  to create folder

var myFolder  = Folder("/d/project/Size300X300");

if(!myFolder.exists) myFolder.create();

//load the action to save file

var myFolder  = Folder("/d/project/Size200X200");

if(!myFolder.exists) myFolder.create();

//load the action to save file

var myFolder  = Folder("/d/project/Size75X75");

if(!myFolder.exists) myFolder.create();

//load the action to save file

then how can i load the action so that i can process: create folder -> save file

thank U

TOPICS
Actions and scripting

Views

849

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

First of all, I would use a different variable for each folder.  Dependiing upon the file type you want to save, you need to define the files parameters.  For example if you're saving jpgs:

docRef = activeDocument

var jpgOptions = new JPEGSaveOptions();

jpgOptions.quality = 10;

docRef.saveAs (new File(myFolder +'/' + docRef.name.split('.')[0] + '.jpg'), jpgOptions);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

LATEST

To csuebele

in the action i created many slices to save the file into 3 differents sizes. However, I'm not sure how to use the script to creat slices that are exactly the same with the previous ones I created.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

By "load action" are you referring to simply running a specific action, or actually loading it into the Photoshop action list from a .atn file and then running it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 24, 2012 May 24, 2012

Copy link to clipboard

Copied

yep

the action i've created, "//load the action to save file" means to load it into the script, and then run it

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines