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

Photo shop action or script that runs based on the dimension of image

New Here ,
Apr 30, 2018 Apr 30, 2018

Copy link to clipboard

Copied

I work for a small sign company and we print from photoshop every day.  We currently have actions that save our print settings for each file.  The problem is that we have 1000's of signs with many different sizes.  So we have to save print settings for each file using our actions.  I am wondering if there is a way to run actions based on the size or the image.  For instance if we open a 12" x 12" image, photoshop would know to run our 12" x 12" Action and apply our print settings for paper size and all of that.  Does anyone know if there is a way to do this?     We would love to get some more automation into our process.

Thanks to anyone that can help.

TOPICS
Actions and scripting

Views

324

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 ,
Apr 30, 2018 Apr 30, 2018

Copy link to clipboard

Copied

Yes, that's doable, but how many different print settings or sign sized do you have?

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 ,
Apr 30, 2018 Apr 30, 2018

Copy link to clipboard

Copied

Quite a few.  We do a lot of laser cut work and sublimation so the sizes vary.  Even in our standard sizes have about 20.  I am sure this makes it harder haha.

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
Community Expert ,
Apr 30, 2018 Apr 30, 2018

Copy link to clipboard

Copied

Not really know how things are set up, here's a simple script that will take the size of a file in inches, and then run an action. Trouble is that you would have to populate the switch statement with each file size and each corresponding action that you want to run.

#target photoshop

app.preferences.rulerUnits = Units.INCHES;

var doc = activeDocument

var docSize = parseInt(doc.width) +'X' + parseInt(doc.height);

switch (docSize){

    case '12X12':

        runAction ('YourActionSetHere', '12" X 12"');//add appropiate name for the action and action set you're using

        break;

    case '14X14':

        runAction ('YourActionSetHere', '14" X 14"');

        break;

    }

function runAction(actionSet, actionName){

    var idPly = charIDToTypeID( "Ply " );

        var desc4 = new ActionDescriptor();

        var idnull = charIDToTypeID( "null" );

            var ref1 = new ActionReference();

            var idActn = charIDToTypeID( "Actn" );

            ref1.putName( idActn, actionName );

            var idASet = charIDToTypeID( "ASet" );

            ref1.putName( idASet, actionSet );

        desc4.putReference( idnull, ref1 );

    executeAction( idPly, desc4, DialogModes.NO );  

    }

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
Community Expert ,
Apr 30, 2018 Apr 30, 2018

Copy link to clipboard

Copied

Moving post to the Photoshop Scripting Forum.

Photoshop Scripting

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 01, 2018 May 01, 2018

Copy link to clipboard

Copied

Appreciate the help.  This definitely points me in the right direction.

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 01, 2018 May 01, 2018

Copy link to clipboard

Copied

One possible idea you can do is use aspect ratio/orientation/name filters in Adobe bridge, highlight the files and go to Tools > Batch/image processor

and run your actions from there. This way you can batch process these before you need to use them.

Another idea is

From the actions panel, you can also add conditionals in your steps, so say you filtered out 2 pre-determined sizes. You can do

if document is square, run square action
else do this action.

if landscape do that, else do portrait print settings.

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 01, 2018 May 01, 2018

Copy link to clipboard

Copied

LATEST

I had thought about batch processing them before use.  That was my main idea actually.  I did not know I could filter them with bridge though.  Thanks for the tips!

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