Why does Javascript not return a value from Adobe Bridge?

252 views Asked by At

I am looking for the current path in image browser in Adobe Bridge CS4. I need the path in a terminal session. Internally, Bridge can be scripted with Javascript. The only interface to this mechanism is to be going through Applescript like this:

set js to "app.document.presentationPath;"
tell application "Adobe Bridge CS4"
    set theResult to do javascript js   
end tell

To run this command from a shell, I use osascript -e ….

However, do javascript does not return a value at all. Why?

2

There are 2 answers

1
Philip Regan On BEST ANSWER

By all rights, this should work as the JS returns the expected result and the Applescript is correct per the Dictionary. A similar problem exists when trying to run Applescript on Acrobat bundled with CS4. Whether or not this is an actual bug or an intentional misdirection on Adobe's part to get AS devs to move to JSX still remains debatable.

0
Paul Riggott On

You can not use AppleScript with Adobe Bridge. But what you could do is use Photoshop and BridgeTalk to get the results from Bridge.