The bridge communication functions allow communication between Dreamweaver and the Bridge application. One feature of this communication is to allow the user to browse files in Bridge easily from Dreamweaver.
BridgeTalk.bringToFront()
Availability
Dreamweaver CS3.
Description
Makes the specified application the frontmost process, by calling the BridgeTalk::bringToFront() function.
Arguments
applicationID
The applicationID argument is a string, such as bridge or dreamweaver, that specifies the application to activate.
Returns
Nothing
Example
This example shows how Dreamweaver implements the browseInBridge() function. First, you create a BridgeTalk instance, then the two most important properties are set: target and body. <target> is the target application. In this case it is the Bridge application. It's identifier is bridge. <body> is the message to send. Usually <body> is a script that the target application can understand and execute after it is received. The send() function is called to send the <body> to the <target>.
if (!JSBridge.isRunning('bridge')) { var bt = new BridgeTalk; var scriptSavePath = browsePath.replace(/['"\\]/g, "\$&"); var script = "app.document.thumbnail = new Thumbnail(decodeURI('" + scriptSavePath + "'));"; // Send the script to bridge and give it 10 sec to launch before assuming an error. bt.target = "bridge"; bt.body = script; result = bt.send(10); } if (result) BridgeTalk.bringToFront('bridge');
Bridgetalk.send()
Availability
Dreamweaver CS3.
Description
Establishes communications with the Bridge application.
Arguments:
timeout
The timeout argument is an optional attribute that sets the time out interval in seconds.
Returns
A Boolean value indicating whether communication with the Bridge application was a success (True = success, False = fail).
Example
result = bridgeTalk.send(10);
BridgeTalk.suppressStartupScreen()
Availability
Dreamweaver CS3.
Description
Searches the launch options for -nostartupscreen to determine whether to suppress the modal windows after startup.
Returns
A Boolean value indicating whether to suppress startup screens.
dw.browseInBridge()
Availability
Dreamweaver CS3.
Description
Allows you to browse files in Bridge from Dreamweaver. The dw.browseInBridge() function launches the Bridge application. If Bridge is already running, dw.browseInBridge switches to the Bridge application.
Arguments:
None.
Returns
A Boolean value indicating whether the browsing script was sent to the Bridge application successfully (true = success, false = fail).