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

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.

How to add a color sampler through Photoshop Scripting?

$
0
0

Hi,

 

     I would like to fix a color sampler point through Photoshop Scripting?

 

Could you please help me on this.

 

thanks,

rajiv.s

Looking for script to change "save as" actions..

$
0
0

I've been working on a way to avoid having to re-record 400+ save as actions.  The nutshell is that I'm saving game art from a master file.  The master file has elements common to other pieces.  So the actions turn on the appropriate layers, save then turn off those layers and repeat the process for all 400+ pieces.   This way when changes effect all pieces it's a simple operation to resave.  Creating 400 separate files seemed like an even more cumbersome way to go and having all the art in one file made more sense.

 

The problem I'm running into is that I've had to change hard drives often and it means the "save as" locations of the actions are no longer available.

 

I've tried every way I could think of to create a workaround but there's no answer that I've found so far.  Batch processing won't work because all of the 400 pieces come from one file.  I'm hoping that scripting will allow me to at least process the "record again" actions automatically.  I want to put in the new location the "save as" actions should point to and hit "OK" and have all new "save as" actions saved.

 

Any thoughts?  Possibly scripts available that do this very thing?  Am I wasting my time by trying to get scripting to do this and should just bite the bullet and spend 3 or 4 hours re-recording the save as actions every time I want to save the art to a new location?

ExtendScript Problem

$
0
0

I'm new to scripting and trying to test out ExtendScript. I'm using Photoshop CS5 on a Windows 7 machine.

 

I found a file ExtendScript Toolkit.exe in Program Files (x86)/Adobe/Adobe Utilities/ CS5/ ExtendScript Toolkit CS5. When I double click on this, the expected ExtendScript window opens briefly and immediately closes.

 

What might be causing this, and how can I get the window to stay open?

 

Thanks.

rotating brushes using file stream of saved brushes in javascript

$
0
0

Once again I’m fascinated by a query in the MacIntosh-forum which’s solution I suspect is within JavaScript’s reach but out of my depth – namely:

Can one rotate a brush by Keyboard Shortcut, like in- or decreasing its size or softness?

I mostly use the round brushes myself, so it’s not like I even miss the capability …

 

I suspect by saving a Brush Preset, then saving that one alone as an abr-file, deleting the Brush Preset, reading and editing the abr.file, loading it, selecting the single Brush Preset contained and deleting it, too, one might achieve it.

Of course editing the abr-file with a Script seems a bit risky to me.

 

On xbytor’s advice I downloaded HexEditor, but the Brush Tip Shape-Angle-setting mystifies me … »AnglUntF#Ang@« seems to be the one but I fail to understand the angle-value …

 

Furthermore the total number of brushes (for indexing purposes) eludes me.

 

Anyway, the procedure may be too complicated or time-consuming to make any practical sense (apart from inserting numerous steps in the history, which might be a further drawback in real working conditions), but I guess some of You like exploring theoretical applications of Scripting-techniques, so maybe You could give me Your opinions/advice on the whole matter.

Save as for layer group

$
0
0

app.documents.add( 4, 4 )

jpgFile = new File( "/Temp001.jpeg" )

jpgSaveOptions = new JPEGSaveOptions()

jpgSaveOptions.embedColorProfile = true

jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE

jpgSaveOptions.matte = MatteType.NONE

jpgSaveOptions.quality = 1

app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true,

Extension.LOWERCASE)

 

In the Adobe Scripting guide, above is the code for JPEG.  Instead of JPEG, I want a LayerSet to save as a TIF with the 'without layers' and 'save as copy + alpha' enabled ? I searched the guide, could not find if I can link group properties color with a keyboard short-cut ?

Calculating width height in script

$
0
0

hi i want script for comparing all layers of psd with photo with its width and height ie one psd background is opened script will read the value of that psd's layer whether it is portrait

or landscape by any way say by its width and height if height is greater than width than its portrait vice versa and then it compare with photo by opening it in sequences or firstly it will read the value of photo than compare with layer.if it got same in place of landscape, same and in place of portait same then it will run action if not than it will open new psd.and with compare same photo

Windows does not have a constructor: 244 error message

$
0
0

I'm using CS6 for the first time to process some RAW files using the Photoshop Automate>Fit Image script. When I tried opening one RAW image into Photoshop to create an action I got the following error message:

 

"ReferenceError: Windows does not have a constructor: 224"

 

Never seen that in all my years of using Photoshop. What's causing this and how do I fix it?


How to call Edit->Auto-Blend Layers ?

$
0
0

Any idea how to do this via scripting, or if it's even possible?

 

Much appreciated

PS3 script to batch rename layers

$
0
0
Sometimes, I make copies of layers (for example: copy little diamonds to align into a shape of the letter M). Each time I "alt+drag" the content in that layer (to make a copy of it), PS makes a copy and then appends the name of the layer to something like "diamond copy 3". After making a ton of copies (and because I'm anal about having actual names for each layer), I want each layer to read "diamond". Instead of manually renaming all these layers, is there a way to highlight the affected layers and choose to rename all layers according to what you want?

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

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

How to assign the event onClick to the panel?

$
0
0

Hi everyone!

Now I choose the color by pressing the button and show it through the painting of the panel. I want to remove the button and clicking on the colored rectangles only - panels. This can be done?

color1.jpg

Creating a photoshop action to save a batch of images as patterns

$
0
0

I am trying to use Photoshop actions to script about a thousand image files into PAT files. I am running into a problem with actions when it comes to defining a pattern. The program naturally selects the filename as the name of the pattern when doing it manually, but when I do this while recording an action Photoshop logs the filename used in creating the action and then uses that filename for all sripted patterns. Is there a way to alter that setting to select the current file's name instead?

 

http://i.imgur.com/VVfo9.png

Export layers to file script error in Photoshop CC

$
0
0

I need help with an issue.  I also asked this in the general forum but was refered here to ask all of you amazingly talented scripting geniuses.

 

My issue is with the Export Layers script that comes installed with Photoshop.  I am running Windows 7 64bit - using photoshop version: creative cloud 64bit.

 

When i try to run File>Scripts> Export Layers to files I get this error

Error 22: Windows does not have a constructor. Line: 239 -> dlgMain = new Window ("dialog", strTitle); 

When i load Photoshop Creative Cloud 32 bit i get a different error message when trying to run the script. 

Error - 33: Internal error . line:395 ->  dligMain.pnlFileType.pnlOptions.grpJPGOptions = ...

 

I can't run the image processor script I also get an error with that. 

 

This  is an issue for me as i use this script on a daily basis.  It worked in PSCS6  

I upgraded, i dont' want to have to load an older  version of photoshop to do this task  

 

Thanks

Carrie 


Since the CC update Document.saveAs() always opens a dialog

$
0
0

Is anyone else seeing this?

Is there a work around?

 

This is a script I have been using for months to open Illustrator files in Phohoshop, resize them, and then save as PNG.   The source images are dynamically generated and it is impractical to sit around waiting to click on the save dialog after every one.   This is a new issue for a script I have been using for a long time.

 

Photoshop 14.2 x64

Extendscript Toolkit CC 4.0.0.1

Auto crop each layer before exporting layers to files

$
0
0

The built in "Export layers to files" script doesn't crop the exported jpeg to the size of the image on each layer.  Instead, it keeps the original photoshop file size and puts white around that layer's image.  Is there a script that will crop to the layer size before doing the export for each layer?

Update Modified Content (Linked layers / Smart objects)

$
0
0

Hey guys,

 

Is there anything in the API for handling the new Linked layers? (CC 14.2)

 

Specifically, I want to be able to Update Modified Content iteratively to handle lots of nested links.

 

It doesn't have to be pretty, just functional, as this is a very complicated task to do manually.

 

Cheers

Can I select non-rectangular regions / arrays using a script?

$
0
0

I took at look at the VB Scripting Reference. Not clear whether the Select-Region made up of an array of points, can in fact be something other than a rectangle.

My Script Saves My Files In Incremental file names but can't save to original folder?

$
0
0

hi everyone,

 

so after a few hours of browsing the forum, was able to scotch tape this script together so it allows me to save my files in incremental file numbers.

 

- i create an action to edit the file and then in that action, i run this script x-amount of times.

- it works as i tested it a few times.

 

but here are my questions that i can't figure out.

 

1. right now it says to a folder that i have to designated. how would i edit this code so it'll save in the same folder as the file i am editing?

2. so far it saves as a jpeg. does anyone know the syntax to use for a gif?

 

and if you're kind enough...let's say i have an animated gif file, i can't edit it in photoshop so i have to use imageready but how do i replicate the above in imageready since we're on the same topic.

 

THANKS!!! code is below:

 

 

// This script will save the active document to a folder with an incremental sufix
// Change the options below to match your needs
var saveFolder = new Folder( 'C:\\test' );
var saveExt = 'jpg';
var saveSufixStart = '_';
var saveSufixLength = 3;
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.embedColorProfile = true;
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpgSaveOptions.matte = MatteType.NONE;
jpgSaveOptions.quality = 8;


// End of user options
//==========================================
function zeroPad ( num, digit ){
   var tmp = num.toString();   while (tmp.length < digit) { tmp = "0" + tmp;}   return tmp;
}
var docName = decodeURI ( activeDocument.name );
docName = docName.match( /(.*)(\.[^\.]+)/ ) ? docName = docName.match( /(.*)(\.[^\.]+)/ ) : docName = [ docName, docName, undefined ];
var saveName = docName[ 1 ]; // activeDocument name with out ext
var files = saveFolder.getFiles( saveName + '*.' + saveExt );// get an array of files matching doc name prefix


var saveNumber = files.length + 1;
//alert("New file number: " + zeroPad( saveNumber, saveSufixLength ));
var saveFile = new File( saveFolder + '/' + saveName + '_' + zeroPad( saveNumber, saveSufixLength ) + '.' + saveExt );
activeDocument.saveAs( saveFile, jpgSaveOptions ,true ,Extension.LOWERCASE);

Viewing all 12244 articles
Browse latest View live