Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all 12244 articles
Browse latest View live

Exporting Layers as Files with RGB & Coordinate Info?

$
0
0

Using CS4. Trying to figure out a way to export layers in a PSD as individual files WITH coordinate & RGB values in the file name..... I know the "Export Layers as Files" script already exists... but can't figure out how to apply the coordinate and RGB info to the file name... without renaming each layer manually...

 

Is there a way to create an action that appends the layer name with coordinates? Same question with RGB values...

 

Then I could run those scripts/actions, and then export as individual files....

 

Thoughts??


Can a script change visibility on a mask?

$
0
0

QUES 1

I may require a script to perform a certain function. One thing it will have to do is to paste a mask into the channel layer of a Smart filter. i.e. When a Smart filter is created, an additional channel layer associated with the Smart filter is also created to house any mask that is applied. That channel is created with visibility turned off. To paste into that channel layer, the visibility has to be turned on, the mask pasted in, and the visibility turned off again.

 

I'm not asking how to do it, but whether it is a straighforward job to do such a thing in a script.

 

 

QUES 2

In terms of getting help from this forum, does it matter if I use Applescript or Javascript? Which do most people use? Do script writers specialise in one or the other?

Batch processing PDF to TIFF

$
0
0
Hello,

I have about 1000 drawings in PDF format that I need to convert to B/W TIFF files. I thought I could easily do this in Photoshop (CS3) and then I hit a snag. In the Open form for the PDF there is a field to enter for the filename (I think that's because of multisheet PDFs). In my case all the PDFs have been reduced to single sheets, so I want the name to be that of the PDF file. Creating an action captures the "name", but this conflicts with the options when running in batch mode. I either have the same name from the action, or no name (or the same name) from batch options. Anyone know how to get around the naming options? Or do this a different way?

Thanks.

Expand/Contract Layer Groups

$
0
0

So I spent the evening researching a way to expand/contract a layer group.. normally we have to click on the small triangle icon that appears before the layer name in the layers panel to expand the group, and click it again to fold it all up. So far, I've found information stating that it can't be done via scripting...

 

I thought up one way to do it, and that would be to search a layer by name (using a different script), and make sure that the layer name being searched for is inside of a contracted group.. and when that layer name is found and selected, it will unfold the layer group and show select the layer. It's quite a runaround though. Is there a more efficient way to do it with a script?

load a Match Colour Statistics file (.sta) from script?

$
0
0

Hello all,

 

I am trying to load a ".sta" file from an applescript?

 

It looks like this is not in the Photoshop applescript dictionary.

does anyone know if there is a location where i can place the file so it is automatically picked up by PS or alternatively is there a preference that i can duplicate and roll out across multiple Mac's once i have configured this manually?

 

I can load this manually by choosing "Image" > "Adjustments" > "Match Colour" and selecting the "Load Statistics" button and pointing it to my statistics file.

 

Thanks in advance!

 

Matt

Is it worth it for me to learn scripting in PS?

$
0
0

I have absolutely NO experience with javascript, and I have failed miserably every time I have attempted to learn. Should I leave Photoshop scripting to the pros?

 

I work in an environment where we are using PS to create super-high-end imagery seen the world over. We are doing things here that make Adobe's engineers' heads explode. We are automating a lot of our process, and actions have gotten us only so far. Scripting is the next logical step, but I'm not sure if it's within my abilities.

Return Individual Values From Array as Variables

$
0
0

Is it possible to loop through the channels and return their individual RGB values and names so they can be assigned to a var to be used later in the script as well as to build and populate a scriptUI?

 

I think I specifically need the RGB values so I can color the panels to represent the colors associated with each channel as the scriptUI .graphics.newBrush method only seems to accept RGB.  I could be completely wrong about that though as my scripting knowledge is limited.

 

I need the name so I can make the channel active using getByName.  Not yet comfortable with targeting by index and think it would be much simpler to catch the name instead in this case

 

Essentially, I'd love for the loop to return something like:

 

for(var i = 1; i<doc.channels.length; i++){if (//loop finds that there are channels.ChannelType.SPOTCOLOR (they will all be spot colors, componentChannels will never be used) present){
var c1Name = //whatever the first channel's name is.;
var c1Color = newColor();        c1Color.rgb.red = //first channel's rgb.red.value;         c1Color.rgb.green= //first channel's rgb.green.value;              c1Color.rgb.blue = //first channel's rgb.blue.value;        }       //...and so on for as many spot color channels are present. c2, c3, c4 and so on...}

 

I'm not sure if that makes any sense but this is the only way I would know how to continue out the rest of the functions I'd like to perform.  I'm fairly confident I can handle putting together the UI and the rest of the script as needed, it's just actually getting this information and then passing them into variables that's completely boggling my mind.

 

Michael L. Hale put together a great script using the Action Manager instead of DOM objects that's blazingly fast which can be found in this forum, but even in looking that over, I'm at a complete loss of how to tweak this to fit my needs or if this is even what I should be aiming for.  I've also taken a look at the many "channels to layers" posts here but still can't get a grasp on how to do this.

 

Any help, ideas or guidance would be much appreciated as I've yet to wrap my head around arrays.

Dialog button, triggers keyboard key

$
0
0

Ok so I'm new to scripting and I hope this makes sense. I'm trying to write a script that works with adobe configurator 4 script button. It's a button on a dialog that runs a script on clicking the dialog button. Now all I'm trying to get it to do is trigger a specific keyboard key for me. It's used for a onscreen keyboard type panel allowing me to not use my keyboard. The script would trigger the keyboard key, that key is assigned to a keyboard shortcut. Click button -> trigger keyboard key or keys. Hope someone can help me figure this out.


Photoshop (CS4)-Saving out layers & names?

$
0
0

I was wondering if someone can help me out.  I am trying create an action-script and can't seem to make it happen.  Specifically, I have a Photoshop file with five layers. Each layer having it's own name. Is there a way to save out each layer with that layers name? I tried to incorporate a copy and paste but didn't work.

 

Any ideas how to do this?

 

Thank you in advance!

 

~e

Help needed to enhance Image Processor Pro Script to save transparency in TIF

$
0
0

Hi everyone,

 

this is my first post in this community.

 

We have a droplet which reduces the resolution of tif images to 72dpi and save the tif image with transparency. This works fine, but it took to long for the whole process of many picture in different folders. That's the reason why we searched for another script which can preserve the folder structure and set the resolution of every tif image to 72dpi.

 

We found Image Processor Pro, which does exactly what we needed. The script works perfectly in CS5 and CS5.5 as it saves the tif with the transparency. Those saved tif images could be used in InDesign with the transparency.

 

BUT Image Processor Pro script works not so perfectly in CS6 as it seems that this option to save a tif with transparency is not implemented or does not work in the script. The result is that those converted tif images are w/o transparency in InDesign. That's a huge problem for us.

 

 

This is the point where I need your help. Neither I have experience yet with jsx-files nor with the right syntax of it.

 

Is there a way for anybody of you to implement / enhance Image Processor Pro so it will save tif with transparency?

 

We used the latest German Version of Image Processor Pro: 2.3.1 (link: http://www.russellbrown.com/scripts.html)

 

(The German version contains only german on screen texts!)

 

I am very thankful for every help you can give.

 

Thanks in advance for your help.

Mouse coordinates?

$
0
0

One last thing I will try before starting my project is to shave a bit of time off of it.  Currently, I've got a script I've been using for months now that selects 95x95.  I use another script (or actually action up until now) to copy and paste into a new file and save.  I think the smarter approach is this:

 

-Open desired files

-Have script loop through each open document, waiting for mouse input.

-Once the mouse is clicked, set the 95x95 selection from wherever the XY coordinates are

-Copy -> New File -> Paste -> Close -> Close

-Rinse->Repeat.

 

Problem is, after quite a bit of searching, I've not found anything that hints that Photoshop's implementation of Javascript can get mouse coordinates.  In fact, I see that in Javascript they are browser specific, so that's not going to help me.

 

Am I at a total loss here?

Creating .ACB (Color Book) file from .ACO (swatches) file

$
0
0
Is there a way to convert a .aco file to a .acb file? I really need my colors to be visible in the Color Libraries section of Photoshop to use with Color Layers.

The .acb files are the files located in \Program Files\Adobe\Adobe Photoshop CS2\Presets\Color Books.

Please let me know if anyone knows how to do that, it would be really helpful!

Scripting and automation advice - Batch processing and final naming

$
0
0

Right now I am using actions to automate the creation of some 3d mockups. The actions work well, but there seem to be some limitations I can't get around and I assume the scripting is what I need to implement next.

 

 

Here is my basic flow:

 

Artwork created > saved to Dropbox folder

 

Another Mac watches that folder > Automator script runs > opens image with PS droplet >

 

Runs one action to open and process two different 3d mockups

 

Saves final mockup images to new folder in Dropbox

 

 

This actually works quite well, but for a couple things:

 

  1. I can only drop one image file at a time. More than that and first runs, rest get ignored.
  2. When saving the final mockup images, the name of the file is always the name of the mockup PSD and overwrites each time.

 

I would like to be able to drop as many source image files into that Dropbox folder and have automation go through each and every file. I would also like each final 3d mockup image to be saved with the original filename of the source file image.

 

Do I need scripting for this?

 

If it matters I am using Photoshop CS5 on Mac OSX 10.9.1. I don't have any javascript experience to speak of, but can generally figure things out with a little hand holding. I can also share my PS Action if that helps.

 

Thank you!

 

Message was edited by: boinzy - Small edit to flow description, step two

Naming Layer Set ?

$
0
0

var layer_c = app.activeDocument.layerSets.add();

layer_c.layerSets.add().typename("layera");

 

How do I name a LayerSet ? What am I doing wrong ?

Move a layer/layerset into a layerset using ID only

$
0
0

I'm trying to move a layer into a layerset using it's ID (not name or index).

 

This function below works if I use putName instead of putIdentifier, does anyone have some code that will move a layer into a layerset using only ID?

 

I keep getting General photoshop error occurred.

 

     moveLayer : function( fromLayer, toLayer )

     {

                  

        var desc5 = new ActionDescriptor();

        var ref4 = new ActionReference();

        ref4.putIdentifier( charIDToTypeID('Lyr '), Number(fromLayer) );

        desc5.putReference( charIDToTypeID('null'), ref4 );

        var ref5 = new ActionReference();

        ref5.putIndex( charIDToTypeID('Lyr '), this.getLayerIndex(toLayer) );

        desc5.putReference( charIDToTypeID('T   '), ref5 );

        desc5.putBoolean( charIDToTypeID('Adjs'), false );

        desc5.putInteger( charIDToTypeID('Vrsn'), 5 );

       

        try

        {

        executeAction( charIDToTypeID('move'), desc5, DialogModes.NO );

        }

        catch(e)

        {

            alert(e);

        }

 

 

       

    },

 

 

 

    // Get layer index but return 0 if there is an error.

    getLayerIndex: function(id)

    {

 

 

        var ref = new ActionReference();

        ref.putIdentifier( charIDToTypeID('Lyr '), id );

       

        try

        {

            activeDocument.backgroundLayer;

            return executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ))-1;

           

        }

        catch(e)

        {

            try

            {

                return  executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ));

            }

             catch(e)

             {

                 return 0;

             }

        }

 

 

    },


prompt() dialog box

$
0
0

I am developing a script to add a custum guides set to a Photoshop document. I use prompt() function to get input from the user.  The script works but it is not effificent when collacting the input form the user.

 

Is ther a an advanced prompt() dialog box that allows two or more data input fields?

or pehaps a different way to let the user enter the distance for each guide in one single dialog box?

multiple guide sets

$
0
0

In another thread a poster asked about multiple guide sets:

http://forums.adobe.com/message/4062904#4062904

 

It would seem that this should be fairly simple to achieve with writing guides’ properties into the metadata (possibly a dedidcated layer’s xmpMetaData) in sets and subsequently loading them from there.

One could even do just one dialog with an entry field for entering a name when saving a guide set and a dropDownList to load or remove such sets.

 

So I wonder if anybody either has already done something like this or has a (better) idea on the issue?

Thanks for any feedback.

How to get corner radius of the shape object.

$
0
0

Hi All,

 

I am trying to get the corner radius of the shape object.

 

Is there any way through which I can get the corner radius of all the corner of the shape object?

 

Thanks in advance..

Switching from Corel to Photoshop CC

$
0
0

Hi, I currently use Corel Paint Shop Pro X5, and am looking to move to Photoshop and the CC.

 

However I'm struggling to replicate my daily tasks in PS at the moment.

 

One of the operations I do daily, is to take pictures on a camera, auto contrast/colour, resize, add a frame, and a website url in text.

In corel I have acheieved this with a small script that does all of this for me. I access this script through their version of Bridge, and its carried out on a batch of images at once with no GUI involvement.

 

Select all, batch process, go. The files are left saved in the current directory.

 

Now in PS, I've found the actions menu, and have recorded a script, which works perfectly, however I'm unable to find a way to run this on a batch of files without the GUI.

If I use the Batch process in Bridge it loads the GUI in PS, opens all the images and chews up all my memory     as I carry this out on blocks of 40-100 images at a time.

 

Is there a different way I'm missing, or a different piece of Adobe software to do this?

Getting help with Ps Scripting is a Nightmare

$
0
0
Viewing all 12244 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>