Photoshop Action question

Is there a way to automate the selection of a certain color or color range?
For example, I'd like to make an action that selects the foreground color in a series of images and makes a mask based on that selection (then goes on to do other things...)
Thanks for any and all help.
Phil

I can’t test on CS3, but I think the affected features should not have changes since CS3.
Anyway, I think an Action cannot perform what you want, a Script should be able to, though.
You could adapt the following code by changing the variable docPath to the correct path of the Folder you want to save the jpgs into.
If you want to give it a try, paste the following text into a new file in ExtendScript Toolkit (part of Photoshop’s installation, Applications/Utilities/Adobe Utilities/ExtendScript Toolkit CS3, I guess) and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.
After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action or started from ExtendScript Toolkit directly.
// saves jpg into same folder;
// be advised: this  overwrites existing jpgs of the same name without prompting.
// 2010, use it at your own risk;
#target photoshop;
if (app.documents.length > 0) {
var thedoc = app.activeDocument;
// getting the name and location;
var docName = thedoc.name;
if (docName.indexOf(".") != -1) {var basename = docName.match(/(.*)\.[^\.]+$/)[1]}
else {var basename = docName};
// getting the location, if unsaved save to desktop;
try {var docPath = thedoc.path}
catch (e) {var docPath = "~/Desktop"};
// jpg options;
var jpegOptions = new JPEGSaveOptions();
jpegOptions.quality = 9;
jpegOptions.embedColorProfile = true;
jpegOptions.matte = MatteType.NONE;
//save jpg as a copy:
thedoc.saveAs((new File(docPath+"/"+basename+".jpg")),jpegOptions,true);
//that’s it; thanks to xbytor;

Similar Messages

  • Photoshop Action Question How to Avoid Replace Files Dialogue Box

    I have Photoshop CS3 running on a Macintosh. This Photoshop action on this Mac opens PDFs and saves them as a JPEG to a folder on a server.
    Sometimes the originating file will be modfied, so a new PDF will be created and have to go through the action again. The intent is for the action to overwrite the preexisting JPEG file(s) on the server, because they are out of date and must be replaced.
    The photoshop action on the Mac converts the new PDF to a JPEG, but then stops and shows a "Replace Files" dialgue box, which displays a listing of the name(s) of the JPEG(s) that will be overwritten. The dialogue box reads "Some of the specified files already exist in the target location. The files marked will be replaced." Below that message are two buttons to choose from, "Cancel" and "Replace". I always click "Replace"
    Is there a way to get the the action, (which specifically reads, "With Save Image Files" on the part of the action where it saves the jpg),  to just go ahead and overwrite the existing JPEG file(s) on the server without presenting the dialogue box?

    I can’t test on CS3, but I think the affected features should not have changes since CS3.
    Anyway, I think an Action cannot perform what you want, a Script should be able to, though.
    You could adapt the following code by changing the variable docPath to the correct path of the Folder you want to save the jpgs into.
    If you want to give it a try, paste the following text into a new file in ExtendScript Toolkit (part of Photoshop’s installation, Applications/Utilities/Adobe Utilities/ExtendScript Toolkit CS3, I guess) and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.
    After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action or started from ExtendScript Toolkit directly.
    // saves jpg into same folder;
    // be advised: this  overwrites existing jpgs of the same name without prompting.
    // 2010, use it at your own risk;
    #target photoshop;
    if (app.documents.length > 0) {
    var thedoc = app.activeDocument;
    // getting the name and location;
    var docName = thedoc.name;
    if (docName.indexOf(".") != -1) {var basename = docName.match(/(.*)\.[^\.]+$/)[1]}
    else {var basename = docName};
    // getting the location, if unsaved save to desktop;
    try {var docPath = thedoc.path}
    catch (e) {var docPath = "~/Desktop"};
    // jpg options;
    var jpegOptions = new JPEGSaveOptions();
    jpegOptions.quality = 9;
    jpegOptions.embedColorProfile = true;
    jpegOptions.matte = MatteType.NONE;
    //save jpg as a copy:
    thedoc.saveAs((new File(docPath+"/"+basename+".jpg")),jpegOptions,true);
    //that’s it; thanks to xbytor;

  • Can I use photoshop text styles and photoshop actions with creative cloud photography?

    I'm really confused by this subscription pricing. If I purchase the $9.99/month, do I get the full desktop app of Photoshop and Lightroom? But I see on this page Products they list something called Photoshop CC that costs twice as much. How is that different from the Creative Cloud Photography?
    My main question is whether I can use photoshop text styles and photoshop actions with Creative Cloud Photography, since I just purchased a bundle that includes these and I want to be able to use them. But I'd also like to understand what comes with all of the various products and how they are different.
    My other question is how is Lightroom different from Photoshop? I have a sense of what you can do in Photoshop but I don't know much about Lightroom at all.
    One more question: the free trial -- is it limited in any way besides the time length? If I do that, will I get a clear idea of all that I will be able to do once I subscribe, or are the functions limited in the trial?
    I tried to just send an email to Adobe to ask these questions but apparently they are not interested in responding to emails from people who are not yet paying customers, so I was directed here. Thanks very much for your help!

    I always like to trot this bit about Bridge once in a while or in the voice of the "Two Bobs" from Office Space,
    "Can you tell us exactly what it is you do around here?"
    What Adobe Bridge does:
    Bridge is the coordinating hub of the Creative Suite. Synchronizing color management settings for all suite programs is done from Bridge, and can only be done from Bridge, to take one important use.
    Bridge displays actual thumbnails of many more file types than Finder or Explorer. It also allows instant play of sound or video files more readily than the native OS file managers.
    Bridge allows direct access to file metadata, to embed copyright information  and keywords where appropriate (e.g., for corporate logo vector and raster files). It also displays the fonts used in an InDesign file, the swatches in an INDD or AI and the output plates (including spot color plates) they use.
    When managing the assets for a design project, Bridge allows quick and simple sorting, rating and custom labeling (with color flash indications) of assets. I can rate images according to whether they are rejects, possibles, for review by client, or approved. The filters built into Bridge allow instant isolation of only the approved images or designs in a folder, only the rejects (for deletion) or only files with certain ratings, no matter how many files it contains. It recognizes aspect ratios, so if I only need a landscape or a 16:9 image in a folder of hundreds of images, I turn off the aspect ratios I don't need.
    Once filtered, the remaining visible files can be selected and copied, moved, or deleted without affecting the rest of the contents of a folder.
    Collections are a massively useful feature. One of my clients is a performing arts center, and in a season we turn out dozens of ads, flyers, brochures, web banners, playbills, billboards and other collateral using the same assets over and over. These assets are organized by artist and/or show on disk, but I set up each season's repeating assets as a Collection in Bridge, so that I just have to open the collection and drag and drop these assets into new INDD, AI, PSD, HTML (in Dreamweaver), FLA or AE projects without having to navigate from folder to folder picking up individual files.
    Bridge's Favorites is another place I stack frequently-accessed folders, such as stock photography, backgrounds, and top-level folders for active projects.
    Assets can be divided into subfolders, but a quick toggle of "Show items from subfolders" exposes all of the assets in a single view while maintaining their organization. I will typically keep AIs, PSDs, EPSs, stock photography and client images in separate subfolders within a project. When I'm ready to start pulling assets into an InDesign layout, I toggle this on and simply drag what I need into the layout.
    Bridge comes with Adobe Camera Raw built in, which is many times faster than using Photoshop to adjust jpegs or tiffs for things like tonal range, white balance, cropping, spotting and sharpening, and is non-destructive.
    One tremendously useful Bridge function for InDesign CS5+ users is the "Show linked files" feature, which opens all the linked files in a layout into a single view, regardless of where they are physically located. I often use this when doing alternative layouts from a client-approved mockup for a campaign, to be certain the same assets are used in each piece, or when creating a motion graphic or interactive piece for the campaign in After Effects or Flash.
    The batch and image processing scripts built into Bridge automate things like creating web-ready small jpegs from multiple images, renaming large numbers of files in place or by copying to an alternative location, creating sets of PSD, png, jpeg or other file types from an assortment of image files, and so on.
    Bridge is so much a part of my daily workflow that on my main workstation I have one monitor dedicated to it almost 100%. Bridge just sits open 24/7, ready for use. I would run at half speed without it, no question.

  • Photoshop Actions: Problem with layer groups

    I have recorded several photoshop actions with multiple adjustment layers in layer groups. They work perfectly fine, as long as I do not run a second action with a layer group in it.
    As soon as I run a second action with layer groups, the layer order is completely random and messed up. How can I avoid this problem?

    Best practices: Usage
    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • Photoshop action: Als JPEG auf dem Desktop speichern

    Hallo,
    ich möchte eine Action erstellen, die in Photoshop mit mit einem Klick alles zusammen als JPEG Datei auf den Desktop extrahiert. Das ist ja auch soweit nicht schwierig. Das Problem ist der Dateiname. Dieser wird in die Action mit inkludiert, sodass dieser sich nicht ändern kann. Sprich, wenn ich das erste mal ein PSD-Dokument mit dieser Action in JPEG auf dem Desktop speichere, geht alles gut. Die Datei heißt dann "Photoshop.jpeg". Wenn ich aber das ein zweites mal mache, wird die bereits vorhandene Datei wieder ersetzt, weil die Action ja immer etwas unter "Photoshop" abspeichert. Ich würde gerne, dass die Action einen dynamischen Dateinamen hat, wenn also "Photoshop.jpeg" schon existiert, soll "Photoshop-1.jpeg" oder so verwendet werden. Wie stelle ich das an?

    Ich bin mir nicht sicher, wie du das meinst.
    Also ich habe eine Action aufgenommen. Ich bin auf Datei>Speichern unter...> dann die ganzen Einstellungen und dann habe ich gespeichert und die Action fertig augezeichnet. Wie meinst du das etwas manuell einfügen? Und wie kann ich da dann den Namen ändern.
    Am 19.12.2014 um 16:49 schrieb Mylenium <[email protected]>:
    photoshop action: Als JPEG auf dem Desktop speichern
    created by Mylenium in Deutsche Foren - View the full discussion
    Natürlich kannst du manuell einen Menübefehl in die Aktion einfügen...
    Mylenium
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7030177#7030177 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7030177#7030177
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Deutsche Foren by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Use Relative Path for Photoshop Action?

    I have a Photoshop Action that is programmed to open an existing file located in a specific directory.  The path to this directory is an absolute path, i.e.:
    C:\Program Files\Photoshop Actions\filename.jpg
    As long as the Action can find the file in the specified absolute path, everything works fine.
    My problem is that if someone tries to run this Action on a different computer (like a Mac), the path specified in the action does not exist and the Action will not work.
    The simple solution to this would be to make the action open the file located at a relative path.  This way no matter what computer the action is run on, it will always be able to find the file.
    Unfortunately, I don't think Photoshop Actions allow relative paths.  Does anyone know if using a relative path in an action is possible?
    Failing this, how would I use a Photoshop Script to somehow direct the Action to find the correct location of the file?  Or is there a better solution?

    The idea that I use in the xtools installer and else where is this:
    1) Convert the action file to XML.
    2) Package the XML file and the apps/ActionFileFromXML script with your stuff.
    3) An installer script will do a 'replace' (or whatever) on the XML file so that the paths are converted to whatever is needed.
    4) The new XML is saved and then converted to a .atn file which is then loaded.
    There is an xtools forum at ps-scripts.com that may have some info in addition to the PDF file that comes with the package.
    -X

  • Adobe Camera Raw and Photoshop Actions

    Hi guys,
      I'm having troubles with Adobe Camera Raw settings and Photoshop actions. Basically, here is what I want to do :
      apply settings for the general colours, exposure, tint, etc., but keep an automatic undistortion of the images thanks to the metadata of the CR2 file.
      The preset I've done is working fine, and when I'm in ACR, I can apply the same preset to different photos with different lenses. Then when I'm opening them in photoshop, they look allright.
      The problem seems to appear when I'm creating the action in photoshop. No matter if the lens profile is set to 'auto' in the preset, it looks like it's applying the one from the original preset. Then let's say the preset was created with a 50mm, then when I launch the action on a 85mm, the undistortion is wrong ...
      If anybody has an idea how to fix the problem, that would be really helpful !
      Thanks a lot,
      Julien

    This particular forum (sharing and storage) was created to help those transitioning from Photoshop.com to Adobe Revel. I am moving your post to the correct forum so that it can get proper attention. I understand that it is difficult to determine which forum to post in since there are so many.
    I'll put I this posting in the photoshop community so the experts there can help you.
    We also have many other forums relating to other Adobe products
    http://forums.adobe.com/community/
    http://forums.adobe.com
    Out of curiosity, can you tell me how you found our forum page?

  • How to launch photoshop action?

    I'm writing a Bridge CS3 script to generate a web gallery. The user selects some files and starts the script through a context menu item. The script iterates through the selection list a couple of times, writes files, etc.
    As the final step, I need to start Photoshop CS3 and run an action on the set of selected files--as if I had picked Tools/Photoshop/Batch... from the Bridge menus but with the action specified so the user does not have to go through the action dialog in Photoshop. After starting the action, the Bridge script is complete and can quit while Photoshop does its batch processing.
    The Photoshop action contains mostly "fit image..." and sharpening steps. It also contains some simple scripts, mostly simple "save as" types of operations.
    I'm uncertain how to do this. Is this where BridgeTalk must be used? Can anyone direct me to a sample script that does something simple like this?
    Is there any problem with having scripts within the action? Some messages I've seen suggest there is, but I'm not certain I'm interpreting them correctly, or whether they apply to CS3.
    Thanks.
    Guy

    [email protected] wrote:
    > I'm uncertain how to do this. Is this where BridgeTalk must be used?
    Yes. You would have some Bridge JS call some PS JS which would, in turn, call
    your Batch/Action.
    > Can anyone direct me to a sample script that does something simple like this?
    You might want to take a look at the Bridge SDK, if you haven't already. There
    are several examples using BridgeTalk. And also look at the code in Common
    Files/Adobe/Startup Scripts CS3 to see how Adobe implemented the Bridge
    Tools->Photoshop functionality. It's a bit difficult to follow in places but
    what you really want to look at is the photoshop10.runActionCommand function in
    photoshop-10.jsx. It's one way of calling PS actions from Bridge and it's also
    what I use in my code.
    >
    > Is there any problem with having scripts within the action?
    CS3 has apparently addressed this issue but I can't say from personal experience
    that it works. However, this was not possible at all in CS2 unless you went to
    really extreme measures.
    -X
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • Convert photoshop action to applescript?

    Hi all. I hope you might be able to help me out. I'm looking for a way to convert photoshop actions i've created to applescript. I can't seem to find any sources to do this. I did find a script to convert actions to javascript, but as i don't have a good working knowledge of JS it's not as helpful as Applescript would be.
    Thanks in advance for any help pointing me in the right direction
    -andrew

    [email protected] wrote:
    > I'm looking for a way to convert photoshop actions i've created to applescript. I can't seem to find any sources to do this. I did find a script to convert actions to javascript, but as i don't have a good working knowledge of JS it's not as helpful as Applescript would be.
    At the core of an Action is series of executeAction invocations that correspond
    to the steps of the Action. This is what the ScriptingListener output
    essentially is, as described in the Action Manager section of the PSCS3
    Scripting Guide.
    There is no Action Manager API for AS. Your only option in AS is to call JS
    code, as is described in the Scripting Guide. You can either use the code
    generated by the ScriptingListener plugin, or you can use my Action->JavaScript
    translation script (which you've already found). To the best of my knowledge,
    there are no other solutions if you program in AS.
    -X
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • Photoshop action replacing previous photo not saving new file

    I have multiple photos that I am running an action on but each photo is replacing the one before using the same file name. instead of using the original file name. So I end up with 1 edited photo!!! from the action!
    This is happening using cs5 I have not encounted this before.
    Any ideas?
    Rob

    Thanks R-Kelly
    I sorted as images imported via drop box were file named !!
    2012-10-15 00.13.26.jpg ,
    2012-10-15 00.14.15.jpg etc
    I think photoshop action could not work with the odd file naming???
    So re-imported using image browser with file names image_01.jpg, image_02.jpg etc and worked
    On cs5.1 on mac os x
    Thanks Rob

  • A photoshop action to access external doc and create this???

    Photoshop action
    If i have a graphic created, say for example, a square, I would like to create a script that
    would read an external document that contains information like the following:
    "123 Vernon Street"
    "345 Exile Court
    "3456 Yogurt Lane"
    "44344 Respite Ave"
    "21267 Gugenhiem Road"
    and then takes that information and puts in onto the graphic in a formatted way (positioned
    onto the graphic centered, for example).
    The external document may have between 25 - 100 different addresses. The graphic will only
    be able to hold a certain amount of addresses (x), so after the graphic is filled with that
    number(x), another graphic would need to be created for the remaining addresses, and so on.
    How does one accomplish this?

    Well, that’s certainly beyond Actions’ scope but can be done with JavaScript – do You have any experience with JavaScript?
    Apart from that it may, if the text is not to be edited in a Photoshop-specific way and pdf-output is OK, be easier to make a multipage document in Indesign for something like this.

  • Bridge and Photoshop Actions

    I have a number of Photoshop actions that run scripts. These scripts have been brought forward from CS and work fine when run inside Photoshop CS2. They are of varying complexity, but I've tested the following with a simple script: alert ("Hello World");
    When I run the actions from Bridge, via the Batch command, the file opens correctly in Photoshop and I then get an error "the command scripts is not currently available".
    Why is this? Do I need to alter my scripts to run in Photoshop CS2?
    Note that when I save the action as a droplet, I can drag files onto the droplet and the script is triggered correctly.
    John

    [email protected] wrote:
    > Shay, that's exactly how the error arises - as a Photoshop batch there's no problem. Do try saving the action as a droplet and dropping files onto it from Bridge - it's not a perfect solution but can be a helpful workaround.
    I just answered this on the PS forum and thought I'd pass this along. If I'm
    wrong, I'm sure Bob will correct my analysis...
    When you make a call via BridgeTalk from one application to another it uses the
    scripting engine to do the communication. So when you make a call from Bridge to
    PS to execute an action in PS, the script engine in PS gets fired up and
    app.doAction is called to run the Action. One "feature" of PS actions and
    scripting is that you can't have a script call an action which then calls a
    script, which is is exactly what you are attempting to do here. You're only
    workarounds at the moment are to:
    1) have everything done in the action (may not be possible)
    2) have everything done in a script (may be tedious)
    3) have a toplevel script in PS called by Bridge which does what it can and then
    invokes actions to do what most of the work, with the restriction that the
    action can't turnaround and call a script.
    This is not a simple bug for adobe to fix as it gets to the heart of the
    Action/Scripting framework.
    ciao,
    -X

  • Can I use purchased Photoshop actions with CS6 cloud software?

    I have found some pre-made Photoshop actions I want to use for photography.  I am about to buy my first copy of Photoshop and I was thinking of going with the cloud software monthly option.  Before I do that though, I want to make sure the actions I am looking at would work with "cloud" Photoshop...  As opposed to my just purchasing the software package outright.  Thanks for your patience, this is my first post.

    Hi,
    You should be able to use the same actions in the creative cloud version of photoshop cs6 as in perpectual lincensed version as they are the same except
    the cloud versions include some features that the perpectual lincensed version won't get until the next major release.
    http://helpx.adobe.com/photoshop/using/whats-new.html

  • Photoshop actions not working!

    HELP!!! I am unable to play any of my Photoshop actions! (I have CS5 extended and I'm working on an iMac)  They were working fine, now for some reason, whenever I mouse over the "play" button, I get a circle with a diagonal line through it. I tried deleting and reloading the actions, but the same thing happened. I have scoured the internet trying to find a solution. I would really appreciate help with this matter!!!!  

    Do you by chance have the action set selected and not an actual Action selected?

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

    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?

    You might want to move this thread to the general photoshop forum if tou want an action.  However your not going to be able to do create the action you want for when you record menu Edit>Define Pattern the "Pattern Name Dialog" will pop up and whatever is used in it will be recorded into the action.
    Also Photoshop Scripting DOM does not have a interface for creating and nameing patterns.  However you should bne ale to write a script to do what you want using code generated with Photoshop Scriptlistner Plug-in and modifying the hard coded name to a variable you set with somthing like the active document name.
    Before defining the patern you may be able to see if the name is all ready use for a pattern name so you can add something to the name to avoid duplicateing name.
    ScriptListner Code difine pattern
    // =======================================================
    var idMk = charIDToTypeID( "Mk  " );
        var desc14 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref12 = new ActionReference();
            var idPtrn = charIDToTypeID( "Ptrn" );
            ref12.putClass( idPtrn );
        desc14.putReference( idnull, ref12 );
        var idUsng = charIDToTypeID( "Usng" );
            var ref13 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idfsel = charIDToTypeID( "fsel" );
            ref13.putProperty( idPrpr, idfsel );
            var idDcmn = charIDToTypeID( "Dcmn" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref13.putEnumerated( idDcmn, idOrdn, idTrgt );
        desc14.putReference( idUsng, ref13 );
        var idNm = charIDToTypeID( "Nm  " );
        desc14.putString( idNm, "Pattern 5" );      <------ change "Pattern 5" to be a variable
    executeAction( idMk, desc14, DialogModes.NO );

Maybe you are looking for