Copy link to clipboard
Copied
Hi,
Is it possible to communicate between Adobe Bridge and a third party application using Bridge SDK?
I want to learn how Bridge can communicate with other application? Bridge SDK have samples that explain how Bridge communicates with other Adobe applications like Photoshop and Indesign. Can anyone guide me or provide me a sample where Bridge communicates with a third party application?
Thanks.
1 Correct answer
There is no direct access to Bridge from a non Adobe application.
If you need to access Bridge it must be done via another Adobe application such as Photoshop. I.E:-
C# - Photoshop - Bridge
You would need to use BridgeTalk to send and recieve messages between Photoshop and Bridge.
Copy link to clipboard
Copied
Communications between Adobe Apps are done using BridgeTalk. Information can be found in the Bridge SDK,
http://www.adobe.com/devnet/bridge.html
You should find some examples in this forum or over at www.ps-scripts.com/bb
Eternal non Adobe Apps might be able to talk to Bridge via the COM interface of Photoshop,Indesign etc.
Bridge does not have COM interface.
Copy link to clipboard
Copied
Hi,
Thanks for reply.
I have checked the SDK and samples and the communication is between Bridge and other Adobe applications like Photoshop etc.
There is no sample or document in SDK which explains how Bridge can communicate with other third party applications which are not Adobe products.
The SDK specifies that "Adobe Bridge provides an application programming interface (API) that defines a communication protocol between Adobe ExtendScript- and message-enabled applications". How will third party application use Bridge DOM object?
Thanks
Copy link to clipboard
Copied
There is no direct access to Bridge from a non Adobe application.
If you need to access Bridge it must be done via another Adobe application such as Photoshop. I.E:-
C# - Photoshop - Bridge
You would need to use BridgeTalk to send and recieve messages between Photoshop and Bridge.
Copy link to clipboard
Copied
As an example, this shows one way of getting a list of selected files from Bridge via Photoshop using C#
using System;
using System.Collections;
using ps = Photoshop;
namespace getBridgeFiles
{
class Program
{
static void Main(string[] args)
{
ps.ApplicationClass app = new ps.ApplicationClass();
String Code = "var fileList;"+
"if ( BridgeTalk.isRunning( 'bridge' ) ) {"+
"var bt = new BridgeTalk();"+
"bt.target = 'bridge';"+
"bt.body = 'var theFiles = photoshop.getBridgeFileListForAutomateCommand();theFiles.toSource();';"+
"bt.onResult = function( inBT ) { fileList = eval( inBT.body ); }"+
"bt.onError = function( inBT ) { fileList = new Array(); }"+
"bt.send(8);"+
"bt.pump();"+
"var timeOutAt = ( new Date() ).getTime() + 5000;"+
"var currentTime = ( new Date() ).getTime();"+
"while ( ( currentTime < timeOutAt ) && ( undefined == fileList ) ) {"+
"bt.pump();"+
"$.sleep( 100 );"+
"currentTime = ( new Date() ).getTime();"+
"}}"+
"if ( undefined == fileList ) {"+
"fileList = new Array();}"+
"fileList = decodeURI(fileList.toString());";
String RC = app.DoJavaScript(Code, null, null);
ArrayList list = new ArrayList();
list.AddRange(RC.Split(new char[] { ',' }));
for (int index = 0; index < list.Count; index++){
Console.WriteLine(list[index]);
}
Console.ReadLine();
}
}
}

