BridgeTalk in CS6 on Windows

Discussion of actual or possible Bugs, Anomalies and Documentation Errors

Moderators: xbytor, DavideBarranca, Paul MR

kpt

BridgeTalk in CS6 on Windows

Postby kpt » Wed Aug 15, 2012 10:22 pm

Has anyone else noticed that sending messages thru BridgeTalk from Bridge to Photoshop doesn't work anymore?

I have a piece of software where this communication only works if the user installs it on both 32- and 64-bit Photoshop.

If anyone is interested I could write up a smaller example and post here.



jcr6

BridgeTalk in CS6 on Windows

Postby jcr6 » Tue Aug 21, 2012 1:36 pm

It seems that the BridgeTalk result isn't coming back.

Looking at Andrew's example from many years ago (which I was using -- nice code, btw), I see that we're getting a timeout on waiting for the result from Bridge. (It also needs to be modified to deal with different bridge versions and 32 vs 64-bit).

Putting an alert into the code that is SENT to bridge shows that it executes over there. However the object (list of files) is not getting passed back.

Looking at what Image Processor has changed into shows the use of a global variable that is almost always undefined (except under the case that you're PUSHING from bridge), so I draw the conclusion that not only did Adobe break this functionality, they broke it on purpose and are aware that it is broken.

I'm refactoring Andrew's code now to use a temp file on "~/" to pass the results back.

xbytor

BridgeTalk in CS6 on Windows

Postby xbytor » Tue Aug 21, 2012 2:56 pm

From ImageProcessorPro (from Dr Russel Brown's website):

Code: Select all
ImageProcessor.getBridgeFiles = function() {
  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();
    bt.pump();
    $.sleep( 100 );
    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();
  }
  return fileList;
};

kpt

BridgeTalk in CS6 on Windows

Postby kpt » Thu Aug 23, 2012 1:34 am

Hi X, I was just going to find some time to go through ImageProcessor - you beat me to it :-)

What I don't understand is that my BridgeTalk()-code suddenly works in 64-bit, when the same software is installed for the 32-bit version.

Unfortunately, I don't have access to a Windows installation of Photoshop right now.


Return to “Flex, Flash & CS SDK Bugs and Anomalies”

Who is online

Users browsing this forum: No registered users and 1 guest