A minimal bridge script for executing something in Photoshop

Upload Area - Upload Files Here, link to them from the appropriate Forum

Moderators: Tom, Kukurykus

rstucky

A minimal bridge script for executing something in Photoshop

Post by rstucky »

Bridge scripting is designed so that the workflow is: select files in bridge, select a bridge menu item (that your script installs). The script then generates a script for Photoshop, then executes the generated script in Photoshop using BridgeTalk. You don't leave bridge.

We also have a bunch of library routines to make this really easy to do. The libraries (AdobeLibrary1.jsx, AdobeLibrary2.jsx, AdobeLibrary3.jsx) are included with the Import from Camera script that you can download from Exchange.

http://share.studio.adobe.com/axBrowseSubmit.asp?c=222

The file attached here is an example bridge script for executing something in Photoshop. You'll need to download Import from Camera from Adobe Exchange in order to get the libraries it needs. Also use the instructions for Import from Camera to figure out how to install it.

All it does is open and close files selected in bridge in Photoshop. I won't bother mentioning that if you uncomment line 46, which executes a save, it will apply the bridge rotation flags.

The key function for you is:

OpenShut.remoteScript = function( file )

If you modify this function to do your Photoshop magic, you'll have what you want.

This script uses the library object BrideTalkIterator - it sends one script per selected file to the target app, one after the other, and shows a progress bar in Bridge while things are happening.

You can have more than 1 BridgeTalkIterator running at a time. Meaning you can execute more than one b! ridge script at a time.

Hope this helps. But if you re! ally wan t to do this from PS, let me know, I can show you how to use BridgeTalk to get the selected files from Bridge.

Bob