Skip to main content
Mar 3, 2006 10:44 AM UTC
Question

Any solution to call Bridge JS functions from AppleScript

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 is closed to new replies. Start a new post to keep the conversation going.

9 replies

Participating Frequently
Nov 30, 2008 8:06 PM UTC
No solution et?

Good Luck.
______
My Si tes
Translate
Participant
Jul 13, 2008 3:45 PM UTC
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
Translate
Paul Riggott
Inspiring
Jun 21, 2008 8:13 AM UTC
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();
Translate
Known Participant
Jun 22, 2008 12:20 AM UTC
Actually, simply calling
photoshop.quit();

should work from Bridge or Photoshop.

-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com
Translate
Participant
Jun 3, 2008 11:21 PM UTC
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?
Translate
Participant
Mar 14, 2006 7:20 PM UTC
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...
Translate
Known Participant
Mar 3, 2006 10:32 PM UTC
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
Translate
Mar 3, 2006 3:39 PM UTC
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
Translate
Participant
Mar 3, 2006 2:31 PM UTC
> 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
Translate