Skip to main content
March 3, 2006
Question

Any solution to call Bridge JS functions from AppleScript

  • March 3, 2006
  • 8 replies
  • 1220 views
I´ve got AppleScript which is controlling Extensis Portfolio 8 and InDesign CS2.

I´d like to call Bridge and change the color of the label of active document . Does anyone know any method to do this?

Portfolio does not support JS and it seems to me also that Bridge doesn´t support AS, either.
This topic has been closed for replies.

8 replies

Participating Frequently
November 30, 2008
No solution et?

Good Luck.
______
My Si tes
Participant
July 13, 2008
I don't know if the original question had been answered, but I've been having success using my AppleScript Studio app to execute embedded javascripts in PhotoShop. I'm also having success passing variables back and forth between the AS and embedded JS.

Cheers
-Andrew
Paul Riggott
Inspiring
June 21, 2008
This should close Photoshop

cTID = function(s) { return app.charIDToTypeID(s); };
executeAction(cTID('quit'), new ActionDescriptor(), DialogModes.NO);

or if you want to close Photoshop from Bridge

function closePhotoshop(){
var btMessage = new BridgeTalk;
btMessage.target = "photoshop";
btMessage.body = ("cTID = function(s) { return app.charIDToTypeID(s); };"+
"executeAction(cTID('quit'), new ActionDescriptor(), DialogModes.NO);");
btMessage.send();
};
closePhotoshop();
Known Participant
June 22, 2008
Actually, simply calling
photoshop.quit();

should work from Bridge or Photoshop.

-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com
Participant
June 3, 2008
I tried this with a photoshop script and it ran just fine but it left Photoshop running... Is there a way to force Photoshop to exit when ESTK is done or inside my .jsx file?
Participant
March 14, 2006
Oh how I wish I could do this too. I want to use Bridge to integrate into our enterprise digital workflow system, which keeps track of products, shot lists, post-production status, assigned resources, etc...
Known Participant
March 3, 2006
You could also use InDesign's "do script" command to run a JavaScript that talks to Bridge, if you happen to be in InDesign already.

Thanks,

Ole
March 3, 2006
Call the ESTK from the command line.

use the -run [file] command line option

It should launch the estk, execute the file, and silently exit.

The js script MUST contain a #target bridge directive at the top of the file. That will tell the ESTK to execute the script in Bridge.

Bob
Participant
March 3, 2006
> and it seems to me also that Bridge doesn´t support AS, either.

I think the missing part - having trawled through the Bridge Scripting
guide - is that there's no clear description on how other apps/processes
*outside* Bridge/CS2 can execute a script. At minimum it would be useful
to have examples of calling a JSX via AppleScript Mac and some VB
flavour(s) (Windows).

If Bridge scripting can only run within CS2 with no knowledge
of/communication with the system is runs on, that's a real
disappointment.

Regards

Mark Anderson