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

Photoshop CS5 insert specific text in part of save as dialogue box

$
0
0

Hi,

 

I have a large number of images to export as web-images.

 

I have an action in Photoshop (CS5 sadly) that works just fine.

 

However I need to rename them.

 

I select part of the name and overwrite with the new text and press enter and it continues.

 

In a perfect world I would be able to select one of, say 3 different optional texts to be inserted over the selected text.

Is that possible to do in an actionscript?

 

In a bit less perfect world, I would be able to pause the action - select the text and maybe add a few characters - and kick the action to insert the text and move on.

 

 

Example:

Original names have no real name structure.

Original name could be

100000-10_xxx_13.jpg

100000-xx-17h.jpg

100000_00.jpg

 

Wanted name structure

100000-10-12300-xxx-xxx-01.jpg

 

Is this possible? A pointer would be nice. :-)

 

/K


Script Color Picker

$
0
0

Is there a way to make the color picker pop up during a script and allow you to choose a color?

 

Screen shot 2012-08-21 at 6.01.53 PM.jpg

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?

access multiple documents’ textlayers’ content without opening files

$
0
0

In the MacIntosh-forum the question has been posed if multiple photoshop-files can be searched for text-contents.

 

Now setting up a selection-interface, opening selected files and doing a file-by-file-and-textlayer-by-textlayer-search in Photoshop shouldn’t be too hard, but the real intent was for indexical purposes in an Indesign-document, so avoiding the opening should be a time-saver if it’s possible to access the textItem.contents externaly.

 

With readIn() (a technique I’ve been introduced to here regarding pdf-pagecounts) I’ve gotten as far as noticing that the text seems to be situated between "Text" and a closing bracket, but quite frankly the code baffles me.

And apart from the problem of closing brackets in the text what I’ve gotten so far includes some texts twice and adds some numbers in the result.

 

Any help appreciated.

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?

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.

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

batch odd dimension images to square

$
0
0

Hi

 

I have lots of images that are all different sizes and more coming.

 

I need to create an action that makes these images square in px dimensions, with the new side dim. the dim. of the longest side.

 

I need to add canvas (light gray) to the short side.

 

I understand actions but not scripting.

 

Thanks exceedingly.


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.

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!

Getting help with Ps Scripting is a Nightmare

$
0
0

Photoshop javascript: Open files in all subfolders

$
0
0

Hi guys

 

I'm very new to javascript, and general Photoshop scripting. My script is coming on well, but I struggle working with files and folders. It's a lack of basic javascript knowledge, which I need to work on. Right now, I'm trying to expand the image open part of my script, so that it opens images regardless of whether they are in a subfolder or not.

 

You can see my input folder (C:/Input). I want to be able to throw files in there, some in folders, some not. Out of interest, my outputs will be combined into one output folder... that bit is fine.

 

 

var inFolder = new Folder("C:/Input")

if(inFolder != null){

var fileList = inFolder.getFiles(/\.(jpg|tif|psd|bmp|gif|png|)$/i);

}

for(var a = 0 ;a < fileList.length; a++)

{

var docRef = open(fileList[a]);

//do things here

}

 

Is there an easy way of expanding this to include files in subfolders? All advice greatly appreciated.

Thanks

David

Set zoom in CS5

$
0
0

We've been using the below Java code to set the zoom of a document in Photoshop 7 (yeah, I know - ancient) to fit the screen (like hitting Ctrl + 0 on the PC) but it no longer works in CS6. The runMenuItem command is generating "Error 1242: Illegal argument - argument 1."

 

 

function runMenuItem(item){// from xbytor
cTID = function(s) {return charIDToTypeID(s); };
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated( cTID( "Mn  " ), cTID( "MnIt" ), cTID( item ) );
desc.putReference( cTID( "null" ), ref );
executeAction( cTID( "slct" ), desc, DialogModes.NO );}
runMenuItem("FtOn");// fit on screen ( same as ctrl-0 )

 

Is there some other way this can to be done in CS6?

 

Thanks,

Ken

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 

Photoshop - combine red and green channel images into a merged image?

$
0
0

Hi,

 

I am a developmental biologist carrying out experiments on a type of microscope known as a Confocal Laser Scanning Microscope (CSLM).  Basically, this is a microscope coupled to some lasers which allow fluorescently-labelled parts of a biological sample to be imaged in high detail.

 

For each sample there will be a set of two images produced, named and numbered as follows:

 

sample01_g.tif

sample01_r.tif

 

Each image represents one fluorescent wavelength and correspond to green ( g ) and red ( r ).  These images are in rgb colour.

 

I want to produce a merge of these two channels to generate a new TIFF file such that:

 

Green channel is taken from sample01_g.tif

Red channel is taken from sample01_r.tif

 

Which would show me how the different channels co-localise, or not.

 

This is fine to do by hand in Photoshop, but takes a long time when you have a couple of hundred images to process.  So, what I would like to do is write a script that batch automates the process, like a droplet.  I have the process outlined below:

 

  1. Create a new RGB TIFF called sample01_merge.tif
  2. Take the green channel from sample01_g.tif and copy it to the green channel of sample01_merge.tif
  3. Take the red channel from sample01_r.tif and copy it to the red channel of sample01_merge.tif
  4. Save sample01_merge.tif into a folder named "Merged Images" on the desktop
  5. Close the opened images
  6. Go to next set of images –> sample02_g.tif and sample02_r.tif
  7. Create a new RGB TIFF called sample02_merge.tif....and go through step 2-6, untill the last set of images has been processed.

 

I have never used script before and would love to learn, but I am making slow progress and would like to have this problem solved sooner than I will be able to do so by myself.  So... I was wondering if anyone could give me some advice on how to go about doing this?

 

Any help will be greatly appreciated!

 

I use a Mac Pro running OSX 10.8.3 and Photoshop CS6 Extended

 

Best regards,

John


HELP NEEDED!! batching, overlaying, background cut out

$
0
0

Hi All,

 

very new to this.

 

I have 2500+ images (caracitures of cars on white backgrounds). I need to place ALL of them on to  a BLACK tee shirt image for internet listing.

So, how do I do this automated?

 

make the thing background BLACK

overlay image on the teeshirt

save it in the order they are done

 

2500+ times

 

I use Photoshop 7.0

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 ?

Will KillWhite run on Photoshop CS6 64-bit?

$
0
0

So - now that I am in need of what looks like just the most perfect and amazing solution... am stymied about getting it to work with CS6 Photoshop Extended (64-bit) - what am I missing?


When I run the filter (in CS6 64-bit), white isn't removed, instead the entire image gets all smeary as if the Oil Paint... filter had been applied.

 

Attempts in getting KillWhite to run from other CS installations on this 64-bit machine; CS4 & CS5.5 both 32 and 64, have been even more frustrating requiring re-entry of serial numbers, EUAs, etc., only to have PS fail to run at all even with several computer restarts and much testing.

 

Thanks for any help.

 

Kelly

 


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

CS5.5 (MAC) script to fix random dots in lineart scans

$
0
0

Hello there.

 

In my line of work, I often have to scan text only documents to  print offset. The majority of the scans are clean but ultimately there will be random dots which need to be tidied up. I am looking for a way to streamline this process.

 

I was able to find a solution which I had in mind but it requires converting the lineart scan to 8-bit first. The example can be found at: http://verlagmartinkoch.at/software/cleanup/index.html

 

However, has anyone heard of an action or javascript that could do this without having to convert to greyscale and then back to lineart?

 

I have read DOZENS of DIY guides and posts suggesting always doing black and white scans as greyscale first and then converting them, but without going into tremendous detail, I will simply say that the scans I receive will output as lineart.

 

Many thanks

 

colly

Viewing all 12244 articles
Browse latest View live


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