AH Bridge Launch 4

Upload Adobe Bridge Scripts, Download Adobe Bridge Scripts, Support for Individual Adobe Bridge Scripts

Moderators: Tom, Kukurykus

Andrew

AH Bridge Launch 4

Post by Andrew »

This is a trial release of AH Bridge Launch 4. It is CS2 and CS3 compatible however there may be teething problems arising from the CS3 beta which can also affect the way it works on CS2.

There is an introductory flash video (7 Mb) - you can download at the end of this post, it is by far the easiest way to learn what Bridge Launch does and how it works.

AH BridgeLaunch4 will manage, list, run and batch your Photoshop (JS) scripts and actions directly from Bridge. Load it from 'Scripts' in the Bridge Main Menu, or directly from the (right-click) context menu for selected images. AH BridgeLaunch4 also provides direct access to individual scripts in the same menus.

The main Bridge Launch control panel looks like this:





You launch the control panel by clicking Scripts>> BridgeLaunch 4 either on the main menu or via a right click menu from any selected image / folder. You can also run any of the scripts directly from these two menus without going to the control panel at all.








Scripts get added to the Launch List by normal file selection dialogs. Actions get added from the following dialog:





It is very useful to be able to run and batch actions directly from Bridge, and even directly from the Bridge menus like this.


Scripts in Normal mode simply get run doing their own image selection, opening, processing, saving, etc.

Batch mode allows you to easily batch actions and also to batch scripts. The default batch mode is to run images selected in Bridge and to use a normal 'save' process after the target script has been run. You can

- Source images selected in Bridge,
- Source images from folders,
- scan subfolders,
- select images by simple character searches (e.g. 'e.jpg' selects jpg images whose name ends in e),
- use more powerful image selection specifying a list of extensions and various patterns for the name (regexp search is also available),
- process images into new formats e.g. raw files to tif, psd and jpg or tif files to jpg files,
- move processed images to different destination folders.
- alternatively, images can be opened for batching and left open for the target script or action to save and close as desired.
- you can also use the separate ah-chains.js script to link a series of actions and scripts into a single chain thereby enabling you to batch an action containing a script: again something that neither Photoshop nor Bridge can normally do.

There are three variations of Batch mode:

- Batch opens target files, runs the script, closes target files according to your batch settings.
- Batch LO (batch leave open) opens files and runs the script leaving files open (the script or action can close the file).
- Files mode runs the script in Normal run mode but passes the target script an array of file paths called batchFiles which the script can use.

AH BridgeLaunch4 also has a special 'repeat' mode which will execute the target script using exactly the same settings (other than your Bridge File Selections) as were used for the previous run. To access 'repeat' mode you simply Shift-Click AH BridgeLaunch4 in the Bridge menu.

For more advanced image selection options click the Source button and the following dialog appears (this is the photoshop version but the Bridge version is identical but for name):





For advances SaveAs options click the SaveAs button:





One very useful feature of the advanced saveas option is hidden in the file-type suffix controls - see the jpg sfx textbox above. If you specify say webimages~-w here this will save you images to a subfolder 'webimages' (which it will create if necessary) of the existing folder the image is in, and add a suffix to the end of the image name of '-w'. If you just enter webimages~ then the subfolder save will be done but no suffix will be added. This provides the save to relative folder capability for Photoshop batching that is one of the more common requests on the Photoshop forums.

As a final aid, there is a very useful helper script ah-chains.js that allows you to chain together any number of scripts and actions and to run them, in batch mode using Bridge Launch 2. The lastest version is part of the Photoshop Script Launch 4 zip file. All you really need to know with ah-chains.js is:

- input a name for the new composite script in the top-left text box (give it a name that will help you remember what it does), then
- add the scripts and actions you want to link up one at a time (in the right order), then
-click OK, and
- you can now add your newly created composite script to the Script Launch list.


Special Bridge Launch 4 / Photoshop Launch 4 features for Script Writers

Because AH BridgeLaunch4 has been designed with batching scripts as a central objective, it has built-in capabilities for script writers, who can create scripts to manipulate images individually but can avoid having to create their own image selection UI and batching routines. AH BridgeLaunch4 provides scripts with three special purpose control variables:

- ah_DataObj: an object which will be in-scope for the target script and will retain data from one pass of the script to the next,
- ah_i: a numeric loop counter, starting at 0, for batched images. This allows you to do many things including open a UI for your script on the first image loop and then use the UI parameters for all subsequent images.
- ah_DataObj.lastTime: a property of ah_DataObj which is true after the last image has been opened,
- as noted above, when run in 'Files' batch mode the target script is passed an array of file paths called batchFiles.

If you come across any problems with the script, or have feature requests let me know.

Andrew
Mike Hale

AH Bridge Launch 4

Post by Mike Hale »

Thanks for this Andrew. I am have some problems but I don't know if they have to do with just your script or the CS2/CS3 problems in general.

First is that if the script I am trying to run has an error, there is no error message. Alerts don't appear either.

The other problem is that once I run the script from Bridge I have to close Photoshop before I can save changes to the script in ESTK.

Is anyone else have these problems?

Mike
Andrew

AH Bridge Launch 4

Post by Andrew »

Hi Mike

Yes both those 'features' occur for me too lol. The lack of error messages is a characteristic of BridgeTalk, it fails without error. But if the target script works there should be no error.

I also get the same problem with the ESTK. What I do is have it open in my main editor and the ESTK at the same time and do the editing in the editor. It's not ideal but it is bearable.

If you create a script that just does something like alert("hello") or alert(activeDocument.name) and run it from ScriptLaunch and it works then ScriptLaunch is working, if that doesn't work then there is something going wrong in ScriptLaunch on your system.

Andrew
Mike Hale

AH Bridge Launch 4

Post by Mike Hale »

Thanks for the info. It turns out the alerts where not showing because of errors in my script.

Your older version of this was good, but this is outstanding. I found it very esay to use.

Thanks,

Mike
Andrew

AH Bridge Launch 4

Post by Andrew »

Glad it worked and thanks for the compliment, ease of use was probably my highest priority in developing the new version.

Andrew
miked

AH Bridge Launch 4

Post by miked »

Hi Andrew

This part I am very interested in:

Files mode runs the script in Normal run mode but passes the target script an array of file paths called batchFiles which the script can use.

Is there any way to extract just this bit and post that? I can't figure out how to do this with CS3.

...Mike
xbytor

AH Bridge Launch 4

Post by xbytor »

miked wrote:Is there any way to extract just this bit and post that? I can't figure out how to do this with CS3.

Take a close look at Common Files/Adobe/Startup Scripts CS3/Adobe Photoshop/photoshop-10.jsx to see how Adobe tackles the problem.

-X
miked

AH Bridge Launch 4

Post by miked »

I'm basing my investigations on ImageProcessor. There are a few things I can't figure out...although your other post about an automation plugin may be the key I was unaware of. I need to figure out how to do that I guess.

...Mike
xbytor

AH Bridge Launch 4

Post by xbytor »

Look at how Photomerge integrated. It's a 'normal' PSJS script that is setup to behave like an automation plugin and that's how it's invoked from Bridge.

-X
Limey

AH Bridge Launch 4

Post by Limey »

I would dearly love to use this on my Mac at work running CS3.
I work on images all day long running many actions and a few scripts.
I believe I have CS2 on my PC box but mainly use that just for converting images to .fpx and uploading the files to the servers using the company's utility.

will this work on a Mac?

Great work on this fine piece of coding!

Paul (Limey)

To avoid bring confused with Paul MR I could use my middle name but that might be confusing too... It's Andrew!