Is there a way to script a Save As dialog? I need to resize an image multiple times and between each time have it save the file to the original location as a jpeg with a suffix. I already have the script to resize the image, but I cannot find a Save As script. Any help would be appreciated.
Scripting a Save As command
Batch processing PDF to TIFF
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.
Auto crop each layer before exporting layers to files
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?
Select/Change Certain Color
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!
How to save layers with cropping?
I want to export layers to files (basically what "Export Layers To Files.jsx" does) but with cropping each layer (to different sizes). I know how to crop a document from script, but that also crops all other layers (erases their content outside of the cropping area). So my question is - how do I keep/retrieve the cropped out content of the document (layers)? Or maybe there's a better approach altogether?
automate save with adding a number
Hy all,
this is the situation:
I have got a psd file. I want this file to be saved automatically as Documentname1.png while it originally is Documentname.psd.
The script doesn't have to ask what number i want to add, i can find that in the script and change that myself.
It also have to save the file in another folder than where the Documentname.psd is saved.
Could anyone creat a script for this action? I don't have any experience at scripting at all.
Tnx!
determine the number of pages of a pdf before any operations on it
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
A script or action - Saving 1 image as .psd and hi res jpg and web jpg
So I notice when I am editing in Photoshop I almost 99% of the time when I am done editing a photo I save the image I am working on in a subfolder called "Finished" as ORIGINALFILENAME.psd. Then I immediately run a simple action to crop that image to an 8x12 at 200dpi. When that is done I then (manually) goto File Save As and save that image as "Print Only - ORIGINALFILENAME.jpg" under the "Finished" folder. Then I run another action that downsizes that image and does a FIT Image (1000px x 1000px) then I sharpen using unsharp mask (it also places my logo in bottom right corner). Once that action is done I then (manually) save that image with File Save As "Web Only - ORIGINALFILENAME.jpg" under the "Finished" folder.
Is there a way to script this so I don't have to do this manually?
Thanks for any and all help.
Ryan G
Passing arguments to the jsx file from command line
I am using the following to be able to run my script from the command line.In case you were wondering on why i would be doing this- i would need to invoke the javascript from a server side code(like java,php etc. in my case it is java)
"c:\Program Files\Adobe\Adobe Utilities\ExtendScript Toolkit\ExtendScript Toolkit.exe" "c:\path to script\myscript.jsx"
Anyways, i have been successful in running the myscript.jsx from the command line but i am not able to figure out how i could pass arguments to "myscript.jsx" from the command line, and be able to refer to these arguments within the script.
I have tried the following
"c:\Program Files\Adobe\Adobe Utilities\ExtendScript Toolkit\ExtendScript Toolkit.exe" "c:\path to script\myscript.jsx" "argument1" "argument2"
and tried to refer these arguments within the script using arguments[0] and arguments[1] . But looks like this does not work.
Any thoughts?????
Scripting the path in Quick Selection Tool
Hi,
I'm trying to build a JS script which:
1. opens an image
2. selects the quick selection tool
3. does the selection following a pre-defined path
4. puts the unselected area to white
5. saves the image
The problem is in step 3. All the other steps can be recorded with ScriptListener, but the path is not. So the question is:
How can I tell to my script a path to follow while using Quick Selection?
How can I do it, for example, with a very simple path, say a line from pixel (50,50) to (50,200)?
Many thanks!
Select all layers with the same name
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.)
Create strip from image sequence
Any thoughts idease or techniques?
C
Export layers to file script error in Photoshop CC
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
Copy Layer's Parent Name to Clipboard
Hi
I have a script which copies the active layer's name to the clipboard (thanks to the users in this forum):
app.system( "echo " + activeDocument.activeLayer.name + " | CLIP");
...Is there a way to copy the active layer's Parent name to the clipboard instead?
or to take it a step further, copy the Parent name first, then copy the active layer name?
For example, it would copy to the clipboard: "Group 1- Layer 1"
(meaning that there is a group entitled "Group 1", and inside that group is 'Layer 1' (which, by the way, would also be the active layer))
Or if that's too complicated, then just to simply copy the parent name.
Hope this makes sense...
I need to create an action or script to save the file with the name of the selected layer
I need to create an action or script to save the file with the name of the selected layer (not including the hidden layers, but including those visible).
How could modify the script: 'Layer Comps To Files.jsx' to get the result?
Warning: I do not need to export all layers as files.
Who can help me?
THX in advance
Help needed to enhance Image Processor Pro Script to save transparency in TIF
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.
Batch processing PDF to TIFF
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.
PS3 script to batch rename layers
Mouse coordinates?
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?
Cutting elements by alpha
Hi.
I'm trying to cut elements in a document that has transparency (in this case lines of rasterized text) so that each element becomes a separate layer.
I was wondering if there is anything in photoshop scripting that could help me with this.
Ideally it would be something like cutting chunks that have more than X transparent pixels between them.
Though from my understanding those kinds of operations are only possible with Pixel Bender which is now defunct?