Bridge/Photoshop Script Example Please

Does anyone have an example Bridge script that they can share that
1. Runs on a selection of images from Bridge.
2. Calls a simple action in Photoshop (resize and sharpen, for instance) for each image in turn
3. Saves the images into a new folder or with different filenames.
The key here is work from the selection in Bridge. Yes, I know I can do that with a Batch, but its important that it be from the script with no batch involved.
Thank you in advance!!
Eric

Hi Eric,
I remember there was a script called OpenClose_PS.jsx by Bob Stucky on Adobe Exchange. This script does almost all that you want. But the site is temporarily out of service right now, so if you are interested, contact me by e-mail and I'll send you a copy.
Kasyan

Similar Messages

  • Bridge - Voluntary Scripting Guidelines

    I made a first post on this at ps-scripts:
    http://www.ps-scripts.com/bb/viewtopic.php?t=176
    It seems to me we would benefit from developing 'good practice' guidelines for Bridge scripting. Here are some intial issues that occur to me:
    1. Function namespaces:
    Given the use of start-up scripts and the loading of script libraries at start-up it is important we keep function names unique. I am going to use ah_myfunction() for all my own function names. It is also sensible that scripts should use libraries where one already contains a function, rather than duplicating the library function within another script - giving rise to a potential namespace conflict between different versions later.
    2. Bridge menus:
    Given how central scripting is to Bridge I feel there should be a top-line scripts menu (which I wish could be accessed via an FKey). We could call it 'Scripts' (lol). All non-startup scripts could be listed within that menu - perhaps some guidelines as to order would be useful - maybe alphabetical. It would then be optional to group those further as to application target (in many cases this would be unnecessary). If they are to be grouped by application it may be better to simply organise them with separators rather then put them in further submenus - I resent every extra click I have to make when accessing menus, especially when I am using automation to start with.
    To add some background to this point - while the menu customization potential of Bridge is attractive I believe it will mainly be used by scripters rather than by the broader user community. If scripters start creating individual menus as part of scripts they then distribute to a wider audience without consideration of what other scripters are doing things are going to get very messy very quickly. I could start off making an Andrew Hall Scripts menu and why not put next to that a link to my website and maybe to my artsite too etc.etc.
    3. Start-up versus one-off scripts.
    In many cases it is possible to create a script that does a particular task either as a startup script (the openshut.jsx script is an example of this) or as something that only gets run when required but which is not loaded at startup. I would say that where-ever possible scripts should be created as one-offs (ie not within the startup folder).
    4. A Non-Startup Scripts folder and a ScriptData folder
    With people writing and releasing non-startup scripts for Bridge, we (and especially the users) would benefit from having them generally put in the same place. My suggestion is to follow the organisation of Photoshop ie Bridge/Presets/Scripts.
    Then, some scripts generate data files, access help files, etc, these need to go somewhere. Xbytor and I discussed this a while back in relation to Photoshop and agreed to use subfolders (I use the subfolder AndrewHallScriptData) within a new folder ScriptsData within the Presets folder. I suggest the same would work for Bridge ie Bridge/Presets/ScriptsData/YourFolder/
    I am an absolute beginner to Bridge scripting so don't take the above as indicating I think I know better about this stuff than anyone else, I don't. Maybe some of these issues are misguided due to a lack of thorough understanding - if so I am happy to learn more. My issue is that I am about to release some Bridge / Photoshop scripts and I would like to organise them sensibly along the sorts of lines outlined above.
    Andrew

    I agree that, in the long run, things will get to be a real mess with global variables and function names conflicting right and left and anarchy in the menus if there aren't some guidelines. It probably won't happen soon because there won't be a flood of add-in scripts for awhile, so Adobe probably has some time to figure this out.
    Along the lines that Andrew started, here's what I would suggest:
    1) To solve the conflicting name problem, use the "#script script_name" directive (or invent a new #namespace directive) to automatically scope all global variables/function names to a single namespace under that directive. Since some functions need to be public, make a new way to declare just those as public. Perhaps use the #export directive to explicitly declare variables/functions that should be visible outside your #script namespace. Allow all script files with the same #script name to automatically be in the same namespace.
    This would give you the best of both worlds. You'd have easy sharing between your own scripts by just using the same #script name on all of them, all variables would be private by default and you'd have a simple way to list the few functions/variables that you wanted to be public.
    2) Menus. I like the menu flexibility we have now. It needs to be expanded to include other user interface elements like the filter's drop-down menu and other interface elements like toolbars. What I think is missing (or I haven't found) is the ability to have non-startup-loaded scripts that just automatically appear in a generic "scripts" menu. This would be just like actions automatically appear in the actions UI in Photoshop or filters automaticaly appear in the filters menu. Bridge should have a "scripts" menu for scripts that don't need to be loaded at startup and only need to run when invoked. This would also contribute to the namespace collision problem because scripts loaded in this manner would run, do their thing, and then be unloaded and wouldn't have a chance to conflict with other scripts that were run the same way.
    --John

  • As  increase DPI, image size is also  increase in photoshop scripting ?

    as  increase DPI, image size is also  increase in photoshop scripting can please tell me what  will the reason for that?

    Hi JJMACK,
                      I am using adobe  Flex with  Photoshop scripting . I am sending  Flex file  with parameter to generate .psd.Right now i am able to generate 72 DPI with proper image size while  I am generating  .psd with  250 DPI with Improper Size.
    E.g
    This is my  flex parameters
    MgrPSAction.instance.FinishLayoutToPhotoshop(curFl , savedType ,TemplateConstant.TM_LEFT,getPSDImageName(objItem,TemplateConstant.TM_LEFT_RIGHT), objItem.LayoutTMLWidth,objItem.LayoutTMLHeight ,pageDPI,returnPhotoshopHandler,
    true,setWidth , setHeight,formatQty); ----- Page DPI - > like 72 or 250 paasing  from here.
    below is Scirpt ot resize
    function openFileAndResize(xp,yp,wi,hi,imagepath)
    var fileRef = new File(imagepath);
    var curRefDoc = app.open(fileRef);
    var curw = curRefDoc.width;
    var curh = curRefDoc.height;
    var resW;
    var resH;
    var scw = imgObj.wi/curw;
    var sch = imgObj.hi/curh;
    var scale ;
    if(scw > sch)
    scale = scw;
    else
    scale = sch;
    resW = curw * scale;
    resH = curh * scale;
    if(imgObj.isAdjustImage == "true")
    resW = resW * parseFloat (imgObj.scaleOrg);
    resH = resH * parseFloat (imgObj.scaleOrg);
    // Resize Image=======================================================
    var idImgS = charIDToTypeID( "ImgS" );
    var desc226 = new ActionDescriptor();
    var idWdth = charIDToTypeID( "Wdth" );
    var idPxl = charIDToTypeID( "#Pxl" );
    desc226.putUnitDouble( idWdth, idPxl, resW);
    var idHght = charIDToTypeID( "Hght" );
    var idPxl = charIDToTypeID( "#Pxl" );
    desc226.putUnitDouble( idHght, idPxl, resH );
    var idIntr = charIDToTypeID( "Intr" );
    var idIntp = charIDToTypeID( "Intp" );
    var idBcbc = charIDToTypeID( "Bcbc" );
    desc226.putEnumerated( idIntr, idIntp, idBcbc );
    executeAction( idImgS, desc226, DialogModes.NO );
    // Select Image=======================================================
    var idsetd = charIDToTypeID( "setd" );
    var desc263 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    var ref138 = new ActionReference();
    var idChnl = charIDToTypeID( "Chnl" );
    var idfsel = charIDToTypeID( "fsel" );
    ref138.putProperty( idChnl, idfsel );
    desc263.putReference( idnull, ref138 );
    var idT = charIDToTypeID( "T " );
    var idOrdn = charIDToTypeID( "Ordn" );
    var idAl = charIDToTypeID( "Al " );
    desc263.putEnumerated( idT, idOrdn, idAl );
    executeAction( idsetd, desc263, DialogModes.NO );
    //Copy Image=======================================================
    var idcopy = charIDToTypeID( "copy" );
    executeAction( idcopy, undefined, DialogModes.NO );
    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    //Create Temp Layer for image adjustment =======================================================
    //createApplication(wi,hi,dpi,"imagelayerdoc");
    createApplication(wi,hi,dpi,layerAppName);
    //var curDoc = getCurDoc('imagelayerdoc');
    //get Active Temp Layer for image adjustment =======================================================
    var curDoc = getCurDoc(layerAppName);
    app.activeDocument = curDoc;
    // Past Copy image in Temp Layer for image adjustment =======================================================
    var idpast = charIDToTypeID( "past" );
    var desc250 = new ActionDescriptor();
    var idAntA = charIDToTypeID( "AntA" );
    var idAnnt = charIDToTypeID( "Annt" );
    var idAnno = charIDToTypeID( "Anno" );
    desc250.putEnumerated( idAntA, idAnnt, idAnno );
    executeAction( idpast, desc250, DialogModes.NO );
    // HERE YOU NEED TO SET XY POSTION OF IMAGE
    positionLayer(app.activeDocument.activeLayer,imgObj.moveX,imgObj.moveY);
    cropImage();
    Please reply if have answer...
    Thanks

  • Bridge CS4 not using newly installed Enhanced Image Processing Photoshop script

    Hi all,
    Hope someone can help here.  We just added this Photoshop extention:  Enhanced Image Processor by Manovi to our Photoshop CS4's Presets/Scripts folder.  Here's my problem.  The new image processor opens and runs great - in Photoshop.  But when I'm in Bridge CS4 and choose Tools>Photoshop>Image Processor it opens/uses the old script.  Does Bridge cache this kind of thing or what's going on.
    How can I get Bridge to use the new image processor?  (note:  Old script was replaced by new one in Photoshop's preset/scripts folder - the old one is no longer there - although we did save a copy of it elsewhere)
    Thanks

    I don't have CS4… but in CS5 the paths to the files in Photoshop's scripts folder are coded into the functions that call them… Bridge reads these files on request evaluates them then runs… I would suspect the file name may differ from what it's looking for… Have you tried calling it the same and placing it in the same location? If this fails you may need someone to edit the Bridge startup script (not a job for the faint hearted)… Sorry but that ain't going to be me it uses localized strings don't understand them yet… Paul R may well say he can do it I don't know… So NOT cached… but possibly NOT read either in you case…

  • Run Photoshop script from Bridge

    Hi
    I have a modified version of Image Processor script in photoshop scripting folder (it saves RAW files as smart objects) and would like to run it from Bridge (apply to selected images). Right now I can run script from File > Scripts Photoshop menu but not in Bride Tools > Photoshop
    Thank you
    The help will be appreciated

    Its Not Adobe Code and its not shipped with Photoshop.  Photoshop versions also has bugs in ScriptUI which is used by scripts with a dialog.  Image Processor Pro 2.3.1 has some bugs. Some files formats its saves may have problems.
    Russell Brown works for Adobe but he has been pulled away from Photoshop.  Xbytor is the programmer that wrote Image Processor Pro he does not work for Adobe and he is feed up with Adobe for not fixing bugs in Photoshop scripting.  He stated he will support Image Processor Pro for some time.
    Russell web site has this. The Open Source code is now available for many of my script and panels
    Because of new projects and a changing demand for my time, it will be necessary for me to move on to new projects at Adobe. For this reason I will no longer be able to support, or update many of my scripts and panels. Never fear! – I am releasing the source code for many of my programs and if you are a programmer then you can use this code to modify and change my scripts to meet your needs. If you are not a programmer then I recommend working with anyone on the list of programmers that I have supplied below. However! Let me make it clear that his code is not to be sold. This is an open and free source to be used for the good of humankind and Adobe Photoshop users around the world
    ===========================
    I do not have a Mac or a Windows 8 machine to test on. On my Windows 7 PC Image Processor Pro 2.3.1 and newer versions run on CS6, CC and CC 2014..  X is still working on it

  • Possible to run a photoshop script by selecting files in Bridge?

    Hi,
    I have a good script I've written that I always used to run from Photoshop. The script has a dialog box which asks where to get the files from. Is it possible to select files in bridge and run the script from there? Without rewriting it for Bridge?
    Thanks,
    Stan

    > I have a good script I've written that I always used to run from Photoshop. The script has a dialog box which asks where to get the files from. Is it possible to select files in bridge and run the script from there? Without rewriting it for Bridge?
    Yes, this is possible. However, a much easier solution is to select the files in
    Bridge then switch to PS manually to run your script. It avoids having to having
    to write any code to run in Bridge at the cost of not having seamless integration.
    In xtools/xlib/XBridgeTalk.jsx I have a set of functions that simplify working
    with Bridge from within PS. For instance:
    var files = XBridgeTalk.getBridgeSelection();
    will return an array of Files that are currently selected in Bridge. If Bridge
    isn't running or if no files are selected it returns an empty array.
    -X
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • Photoshop Script  Black and White Raster to Vector

    I do not have AI Adobe for I do not want to spend the money and have to learn an other complex Adobe application. I'm no artist either.  However at rimes I wanted  to have AI live trace feature to change black and white line drawing into vector graphics. AI creates EPS files with embedded vectors. And can export the vector to Photoshop.  Though Photoshop opens EPS as raster layers I find that EPS file created from tracing black and white lines and artwork with programs like potrace that use curves to create black vector shapes. That when these are opened in Photoshop as Black layer with transparency. When these layers transparency are loaded as a selection and the selections converted to path. I find the path are extremely good.
    Potrace is a cross platform open source program packages available for many operating systems. Windows (32 bit) and (64 bit), Mac OS X (Intel), Mac OS X (universal),Linux (32 bit) and (64 bit), Linux (Alpha), Linux (Sparc64), Sun Solaris (Sparc), Sun Solaris (i386), Sun Solaris (x86_64), FreeBSD (i386), NetBSD (i386), OpenBSD (i386), AIX and AROS (i386). Potrace is a command line command. So it can be use started with options and passed a file from bat files and scripts. Potrace requires No instillation. All the needed potrace requited files just need to be place into a folder and potrace run from that folder as the current directory.
    So a created a Photoshop script that more or less uses potrace like a Photoshop Plug. The script define a custom shape for the current active document using potrace and add a new shape layer using the new defined custom shape as the top layer. The script also toggle off the other visible layers so you just see the shape layer.  You can use alt click on the shape layer visibility icon to toggle the other layer visibility so you can see how well it matches the document.
    I'm a windows user so the Photoshop script I wrote though in javascript will most likely only run on a windows platform because of my use of windows features its command line start command and file system conventions. I'm quite sure a Mac variant could created. Here is screen capture showing how well the defile shape  matches up and a link to the script. You would need to download potrace to use it and fix the vars in the script that point to potrace. http://www.mouseprints.net/old/dpr/potrace.jsx

    Good day!
    Please check out the chapter "Automation" in the Reference.
    If the task can be recorded as a plain Action it can be applied to multiple Files for example via File > Automate > Batch or File > Scripts > Image Processor.
    Regards,
    Pfaffenbichler

  • I shoot with a Canon 7D, have Windows 7 installed on my computer, Adobe CS4 (Bridge & Photoshop). I'm trying to open the CR2 files in Bridge to adjust them before I open them up in Photoshop, but it's giving me an error code saying it's the wrong file typ

    I shoot with a Canon 7D, have Windows 7 installed on my computer, Adobe CS4 (Bridge & Photoshop). I'm trying to open the CR2 files in Bridge to adjust them before I open them up in Photoshop, but it's giving me an error code saying it's the wrong file type. I downloaded the latest updates for Adobe Raw as well as the DNG converter, however I don't want to have to convert to DNG before opening in Bridge. Please let me know what I can do to open the CR2 files directly in Bridge CS4, thank you!

    Make sure you have the right version...
    Camera Raw plug-in | Supported cameras
    Camera Raw-compatible Adobe applications

  • I want to create xml file using photoshop script and also i can easily add, modify, delete based on file name

    Hi,
    Please help me for this.
    I need to create XML file for mentioned below. when i run the photoshop script i need deatails for active document name, date, time and status.
    <?xml version="1.0" encoding="UTF-8"?>
    <sample>
    <filename>Cradboard_Boxes_Small.tif</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    <sample>
    <filename>Cardboard_Boxes_Student_Vaue_Pack.jpg</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    I need read that xml after creating and modify based on file name. i need to modify status after file finished.
    if the file name is already exist i want to modify or delete or add whatever i need.
    Kindly help me simple way

    You may want to look into getting Xtools ps-scripts - Browse Files at SourceForge.net then.  Most of the support is for ActionManager script code where XML code is use as an intermediate step.  There are quite a few Photoshop script in XTools .   Ross Huitt is an expert javascript programmer though is is fed up with Adobe's lack of support for Photoshop scripting particularly the bugs in ScriptUI he is still maintaining tool he  has created for us free of charge. Tools like Image Processor Pro. None of his scripts are save as binary so you can read all of his code there is a wealth of knowledge in there....
    Also there is a scripting forum Photoshop Scripting

  • Lightroom and Photoshop scripts

    Is there an easy way from lightroom to export a file to a photoshop script (e.g. xxx.jsx) such that the desired action in photshop can be scripted ?  I know I can export to photoshop and edit, then run the script -- just wondering if this can be done in one step

    I don't recall it being discussed before. However, given that Lightroom uses Bridge Talk to communicate with Photoshop it might be worth asking the question over on the Bridge Scripting forum http://forums.adobe.com/community/bridge/bridge_scripting or Lightroom SDK forum http://forums.adobe.com/community/lightroom/lightroom_sdk

  • Interactive selection using photoshop script

    How to make a script pause till the user makes a selection and continue again using photoshop script?

    You can use two Scripts or one Script that, depending on some predetermined factor, performs two different tasks.
    So you could for example write something into the metadata, a channel, a txt file, … when a Script is run and that information is absent, and if it isn’t have the Script perform something else and remove that again.
    Edit: You probably could also set up the Script Events Manager to check for something on any Selection change and have it run a Script depending on that but I doubt that’s a good idea.

  • Error log  Error Code: U44M1P7 in trying to download CS6 and Bridge update?? Please help

    Error Code: U44M1P7 in trying to update CS6 and Bridge. ?? Please help

    Hi Jeff,
    Thank you for taking the time and interest in a strangers woes.
    Adobe Extension Manager CS6 Update
    Update is not applicable. Error Code: U44M2P28
    I deleted Adobe Extension Manager. Emptied the trash. Re-booted, installed, went to install upadate, got error message.  Update is 'not applicable'
    Installed Adobe Extension Manager again, then update and is says it's happy.
    Photoshop 13.0.1 update for Photoshop CS6 and Photoshop CS6 Extended
    Done with Errors. Error Code: U44M1P6
    Photoshop claims to be at 13.0  Update manager says I am up to date.  Download update from Adobe.
    Adobe Photoshop 13.0.1
    Installation failed. Error Code: U44M2P7
    A strange thing is happening when I download these updates, the dmg opens iCal.  This does not happen with other downloaded dmg files.
    I shall repair my permissions and try again.
    Updated permissions.  Re-booted:
    Adobe Photoshop 13.0.1
    Installation failed. Error Code: U44M2P7

  • Migration of Adobe Bridge & Photoshop from imac to imac

    I need to migrate Adobe Bridge & Photoshop to a new imac, I need help & tips please

    Mellie28 wrote:
    I need to migrate Adobe Bridge & Photoshop to a new imac, I need help & tips please
    First and last:  Don't! 
    Always install from the original media (DVD or download from scratch.
    Migration or "transferring" will bring you nothing but grief.

  • Bridge/photoshop CC or CS6 won't batch

    Hi there,   I have j=had this problem on my mac book pro since CS6,  I have now installed CC hoping it would sort it but its the same,  If I use bridge to batch a set of photos I get the following error.
    FatalError: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
    any ideas please ?
    Thanks Jules

    Thank you :-)
    Ok after having a little play I can batch photos using the photoshop "automate-batch" process but it wont work using bridge.
    I am trying to do a bactch and run an action using jpg images
    Odd that it works using photoshop directly but not bridge
    So I assume somewhere I have an issue with bridge
    Cheers again  Jules

  • When i open a raw image in bridge, photoshop doesn't recognise the file

    when i open a raw photo in bridge, photoshop doesn't recognise the file

    Details and screen shots, please.
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

Maybe you are looking for

  • Custom fields position change in srm 7.0 in Purchase Order on WebDynpro

    Hi Experts, We are upgrading to SRM 5.0 to SRM 7.0 In Purchase order screen,under account assignment,we want to see the acocunt assignment detailed view as the default view under tab "ACCOUNT ASSIGNMENT".Click on the DETAILS button and then the detai

  • External Hard Drive Complications

    Hello Everyone, I've got an issue that no one seems to be able to help me with...I purchased a Western Digital My Passport Essential. I thought it worked like a big flash drive so I just plugged it in and moved all my photoshop, indesign and illustra

  • How do I increase the number of rings before my BB 8900 diverts?

    Ladies/Gents - I can see why BB call the leather pouch a holster - you have got to be the fastest draw in the West if you want to extract the 8900 and answer the call before it diverts - can someone point me in the right direction to extend the lengt

  • Re: No master socket?

    You are, of course, absolutely not allowed to buy a master socket from the internet and install it yourself.  The two wire connection is too difficult for amateurs so it is never done. If an Openreach person found this had been done in 10 years time

  • Apache, cups, iprint and cluster?

    Hi, after some Pre-Test's for Netware to OES2 Cluster Iprint Migration, my iManager and Novell Welcome Page stops working after a reboot. I found that i got a Problem with rccups startskript, because this seems now to be startet (i think, whyever?).