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

One-click 'Save as jpeg' shortcut script please! - saved in the same folder

$
0
0

Hi, I've been re-directed here because I was told a script could solve my problems - but I have no scripting experience/knowledge/ability! Below is my original problem and post. I got as close as 2 button presses, but I'm after that sweet, sweet single-button, double-my-productivity shortcut! Thanks!

 

http://forums.adobe.com/thread/1106992

 

I use 'Save as .jpeg' ALL the time (Photoshop CS6, Mac ML), and it really feels like I should just be able to press one button (a shortcut) and the name/quality dialogs don't appear and it just saves a .jpeg into the folder that my original .PSD/file is in.

 

So basically:

 

- Press one button to save my open .PSD/file as a .jpeg

- Automatically save it in the same folder as my .PSD

- Save it as '10' quality in the jpeg settings

- No dialog boxes, as soon as I press the button, it saves it - if there's already a .jpeg of the same name, it creates a '-1','-2' etc.

 

I've tried using 'Actions', but it seems to save it wherever my original Action folder was - it doesn't change to whatever the current folder the .PSD is in...

 

Thanks!

 

Adam


Saving multiple images at one time to a different folder

$
0
0

Is there a script available that can save multiple pictures upon completion of editing to a different output folder of my choice other than the source folder all at the same time? Example I open 11 different photos from source folder x, I edit said 11 pictures and now want to save all 11 pictures to output folder xy all at the same time.  What I want to prevent is having to click save as select new folder for each and every picture I have open.

Execute() command not working on Photoshop CC

$
0
0

This code works perfectly on CS6 but not on CC. Any ideas on how to solve it?

 

var toGo = File(String("/Users/asouza/Documents/K3/test/test.log"));          

toGo.execute();

 

Thanks,

Alex

Photoshop open multiple image and add different texts

$
0
0

Hi All,

 

Hope you are all doing great. I just started doing photoshop scripting due to the requirement which I will mention in detail below.

 

My scripting is knowledge is very basic so I was hoping you guys could be able to help me out with this.

 

The requirment is that I have 100's of images which needs to be opened in photoshop and add text based on the image name then save the image as JPEG at 70 quality. For example:

 

I have images named as below in my desktop folder,

 

Image1.jpg

Image2.jpg

Image3.jpg

Image4.jpg

Image5.jpg

Image6.jpg

Image7.jpg

Image8.jpg

Image9.jpg

Image10.jpg

 

For the script, I think the easiest way is that if I define what image name are:

 

image[1] = Image1.jpg

image[2] = Image2.jpg

image[3] = Image3.jpg

image[4] = Image4.jpg

image[5] = Image5.jpg

image[6] = Image6.jpg

image[7] = Image7.jpg

image[8] = Image8.jpg

image[9] = Image9.jpg

image[10] = Image10.jpg

 

and for text I have done this:

 

text [1] = Image1

text [2] = Image2

text [3] = Image3

text [4] = Image4

text [5] = Image5

text [6] = Image6

text [7] = Image7

text [8] = Image8

text [9] = Image9

text [10] = Image10

 

So everytime when I run the script image1 will be added to the photoshop and the text name Image1 will be added (For this I think defining layer name would be better so I will gave "Imagetext").

 

Then the image will be saved on a specific location on my desktop.

 

I have all this plan on what I want to do but I don't know how to write the script using photoshop API and my limited javascript coding.

 

So if you guys could help me out with this, that would be awesome. Hope to hear on this soon.

 

Kind Regards,

 

Zoogle

Data Sets in Photoshop CS2

$
0
0
I'm trying to learn about scripting in Photoshop CS2. By starting, I just want to import variable data into Photoshop, following the help instructions, however am having heaps of issues.

I'm using the Image > Variables > Data Sets > Import option.

My data looks like this..

Variable1
Ben
David
James
Mark

but when I try to import the text file, I get this error message...

"Could not parse the file contents as a data set. There were too many variable names in the first line of the text file."

Can anyone please tell me what I'm doing wrong?

Thanks

Intermediate responses ?

$
0
0

Hi everyone!

I have a javascript project which is working fine, but now I need to use BridgeTalk to send intermediate responses (Just 1 bt.send(); and X bt.sendResult() back).

I have read the documentation and copied the example that is on it, but it doesn't work. bt.sendResult() returns false which means that there isn't any onResult callback function or simply the message couldn't be sent.

 

Does anybody know what the problem is?

 

Thanks in advance.

 

PD: Documentation's sendResult example is on JAVASCRIPT TOOLS GUIDE CS6 page 176

Help with large .psb 64-layer file

$
0
0

Hi All, I'm hoping someone here can help me with this!

 

I have a large 64-layer .psb, with each layer visible, the result looking like a 64-box matrix (or chessboard). Each layer has a high resolution image in it which comes from it's own separate .psd  What I want to do is replace each layer's content with a new file (I have 64 source files ready to go).

 

I have two questions:

 

  1. Will I need to step in to each layer of the .psb, delete the existing content, open the new .psd, and copy & paste it into the now empty .psb layer, and repeat x 63 times? Or is there a way that I can automate this?
  2. Can the .psb layers contain linked RAW files such that if I want to adjust one of the .psb layers, I need only open the RAW file in ACR and make my adjustments there?

 

I would be really grateful for your help on this, as I am a total newbie to scripting etc.

 

Many thanks in advance!

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?


Get file from ftp

$
0
0

Hi all,

 

I looked on the forum for answers on that topic but didn't really find anything simple.

 

I would like my Photoshop javascript to retrieve a specific image file from a ftp server before doing its thing inside Photoshop.

I tried putting the ftp address along with login and password the same way I would specify a local path, but this doesn't seem to work (this might be an obvious mistake, my javascript knowledge being somewhat limited). Is there another way?

 

Thanks,

 

John

Possible to add 1,2,..,N different buttons on conditional array length?

$
0
0

I have an array with 1, 2 , or more elements

 

I want to open an UI dialog with buttons as many as my Array length.

 

AND I want to be able to personalise every single function() onClick for each single existed button

 

The problem is that I can't make the code reconize each individual button once have been created.

Find and replace text in multiple Photoshop files?

$
0
0

Hi there,

 

Let us say I have six Photoshop files: 1.psd, 2.psd, ..., 6.psd. All of these files contain the word “LoremIpsum” in random text layers, within each document. Is there a way I can search for “LoremIpsum” in all documents and replace it with “Dolor Sit Amet”, all in one go? This is just an example, I need to replace various words, not just one.

 

I have tried "batch find and replace" software (including powerful tools like Power Grep) but they do not work with psd files… Is there a javascript of external plugin for this kind of task?

 

 

Thanks!

Select all layers with the same name

$
0
0

I'm setting up a bunch of actions in PS Cs5 but I've hit a wall with the way photoshop selects layers by name.

If I name two layers "example" and have an action that selects "example" it will only select the bottom layer.

Is there a workaround using actions? And if no, is there a way to do this by script?

 

(Word of warning, I have never tried anything with photoshop scripting so assume I know nothing about it.)

Will scripting be supported in the future?

$
0
0

Regarding the changes to be made next year for extensions support in the new Photoshop CC versions I must decide how to continue development of Photoshop tools, therefore I would like to know if, at least in short term, scripting will be supported in the next CC versions of Photoshop.

 

 

Thanks.

Collaborative code sharing (PS Scripting & GitHub)

$
0
0

Hi,

I’d like to invite you fellow developers - ExtendScript, Flex/HTML Panels, Generator - to read this Open Letter about the PS Devs Community’s health, prospects and a project proposal for collaborative code sharing through the GitHub opensource platform.

 

Actually the (humble) secret agenda is to help the community focus on better ways to collect and share its own accumulated knowledge, and possibly grow some extra influence towards Adobe: that we need, in my opinion.

 

Any comment, suggestion and feedback (on the original website, please) is *really* appreciated.

Thank you for your time!

 

Davide Barranca

www.davidebarranca.com

Getting old font size value of text after image resizing.

$
0
0

Hi all,

 

I write the script of getting font size of the text layer. I am getting old font size after image resizing.

 

Following are the steps:

- I write the function to get the property of selected text layer..

 

     getInfoOfText=function(textLayer)

     {

          ........;

          var textItem = textLayer.textItem;

          var fontSize = textItem.size;

          .........;

     }

 

- After image resize to 50%. I am executing this function.

 

But, I am still getting old font size value.

Let's say the font size of text = 36 px.

Now I apply Image Resize to 50%. So, the font size of the text becomes 18 px.

Now If I execute the function "getInfoOfText", I am still getting 36 px.

 

I am unable to understand the behaviour. Am I missing something here? Is there any way to get the correct font size value?

Please note that I am using CS6 version.

 

Waiting for ur help guys.

 

Thanks


how to select and paint the triangle?

$
0
0

I want to make an imitation cutout mat.

Created and filled two colors 4 rectangular areas - sections mat. Now you need to fill in the corners. I can calculate pixel by pixel rows and fill them, but it seems to me that there must be a simpler solution.In the example script - create a blank document, fill the new layer rectangel area (this will portray the picture) in the Layers palette make this layer active and run the script.

Help me paint 2 color corner number 2 :-)

 

Thanks !

 

 

#target photoshop; 
var fillColor1 = new SolidColor()
fillColor1.rgb.red = 255;
fillColor1.rgb.green = 10;
fillColor1.rgb.blue = 10;
var fillColor2 = new SolidColor()
fillColor2.rgb.red = 155;
fillColor2.rgb.green = 50;
fillColor2.rgb.blue = 100; // you can change this parametr
var widthSrez = 20; 
main(0) 
function main(type){//---------------------------------------------------------    var mySelection =new Array(4);    for(var o=0;o<mySelection.length;o++){    mySelection[o] = new Array(4)    }    var doc =  app.activeDocument;    var bounds = doc.activeLayer.bounds;    var newLayer = doc.artLayers.add();    newLayer.name =  'Срез'switch(type){    case 0:    //left        mySelection[0][0] =bounds[0].value;        mySelection[0][1] =bounds[0].value+widthSrez;        mySelection[0][2] =bounds[1].value;        mySelection[0][3] =bounds[3].value;        mySelection[0][4] =1;    //top        mySelection[1][0] =bounds[0].value;        mySelection[1][1] =bounds[2].value;        mySelection[1][2] =bounds[1].value;        mySelection[1][3] =bounds[1].value+widthSrez;;        mySelection[1][4] =1;   //right        mySelection[2][0] =bounds[2].value - widthSrez;        mySelection[2][1] =bounds[2].value;        mySelection[2][2] =bounds[1].value + widthSrez;        mySelection[2][3] =bounds[3].value- widthSrez;        mySelection[2][4] =2;   //bottom        mySelection[3][0] =bounds[0].value+ widthSrez;        mySelection[3][1] =bounds[2].value;        mySelection[3][2] =bounds[3].value-widthSrez;        mySelection[3][3] =bounds[3].value;        mySelection[3][4] =2;    break;    case 1://other type    break;     case 2://other type    break;    case 3://other type    break;}             for(var p=0;p<mySelection.length;p++){            var newSelect = Array(                Array(mySelection[p][0], mySelection[p][2]),                Array(mySelection[p][1], mySelection[p][2]),                Array(mySelection[p][1], mySelection[p][3]),                Array(mySelection[p][0],mySelection[p][3]),                Array(mySelection[p][0],mySelection[p][2])                ); 
 doc.selection.select(newSelect);       if(mySelection[p][4]==1)           doc.selection.fill (fillColor1, ColorBlendMode.NORMAL,100,false);        else{            doc.selection.fill (fillColor2, ColorBlendMode.NORMAL,100,false);            //in this place paint the corners !!               }           doc.selection.deselect()     }}   

 

 

PrtScr capture.png

How to check the layer's color?

$
0
0

color.png

I want to check the layer's color in the photoshop script (javascript). I'm writing a file exporter and I want to do one thing or another depending on the layer's color.

Select/Change Certain Color

$
0
0

Hello,

 

I have been scripting in various Adobe products for a while but I am simply stumped on this one.

 

I have a series of PNG files that consist of various shapes. The shapes are solid black and the rest of the document is transparent.

 

I wrote a script to pull all the documents into one new Photoshop file and place each file/shape on its own new layer.

 

I then randomize the order of the layers. This in theory generates kind of a unique "pattern".

 

What I want to do now is change the black pixels of each layer to a different color.

 

For example, all the black pixels in layer 1 will be changed to red. All the black pixels in layer 2 will be changed to green, etc, etc.

 

Since the black PNG shapes are randomly placed in different layers, this will again give a very unique and colorful pattern.

 

I am good up to this point. However, I cannot figure out how to change the black pixels to a specific color using the scripting interface.

 

I thought of selecting only the black pixels and then filling with a color. Couldn't figure out how to do that. Thought of applying a color shifting script. Couldn't figure out how to do that. I even thought of apply a style or filter. Couldn't figure out how to do that either.

 

Any help or suggestions or examples would be greatly appreciated.

 

Thank you!

determine the number of pages of a pdf before any operations on it

$
0
0

Do any of You know how to determine the number of pages of a pdf-file (selected with the openDialog for example)?

Somehow I fail to grasp how to achieve that any way short of actually opening/rasterizing all pages without prior knowledge of the actual number.

 

 

I would like to use that information to determine the number of elements for a contact-sheet-like procedure beforehand.

 

MultiPageImporter2.0.jsx, which is an Indesign-Script by Scott Zanelli, obviously does it, but so far I’ve failed to successfully utilize his functions.

 

 

Anyway, have a nice weekend

pfaffenbichler

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.

Viewing all 12244 articles
Browse latest View live


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