Skip to main content
April 11, 2013
Answered

Event register problem

  • April 11, 2013
  • 1 reply
  • 821 views

hi,

i am new in adobe bridge.

when i select a thumbnail or file in content that time i want to $.writeln("someting");

for this i register e event but that is not working please help me in this regards. i'm working on adobe bridge cs5

i'm writing this code in  SnpListenDocEvents.jsx file.

onThumbnailEvent = function( event ){

          if( event.object .constructor.name == "Thumbnail" ){  // also use if( event.object instanceof Thumbnail ){

                    if( event.type == "select" ) {

                              $.writeln("your code is here");

                              return {handled:true};//stop processing event handlers

                    }

          }

}

// register the handler

allDocEventHandlers = { handler: onThumbnailEvent };

app.eventHandlers.push( allDocEventHandlers );

This topic has been closed for replies.
Correct answer Muppet Mark

#target bridge

thumbSelected = function( event ) {

   

    if  ( event.object instanceof Document && event.type == 'selectionsChanged' ) {

       

        $.writeln( 'Fluff…' );

   

    } return { handled:false };

   

};

app.eventHandlers.push( {handler: thumbSelected} );

1 reply

Muppet MarkCorrect answer
Inspiring
April 11, 2013

#target bridge

thumbSelected = function( event ) {

   

    if  ( event.object instanceof Document && event.type == 'selectionsChanged' ) {

       

        $.writeln( 'Fluff…' );

   

    } return { handled:false };

   

};

app.eventHandlers.push( {handler: thumbSelected} );

April 15, 2013

Hi,

thank you very much for your valuable reply.

would you pls give me reference of list event type like event.type == 'selectionsChanged' and more

which is help me to build custom plugin

thanks

mahedi

Inspiring
April 15, 2013

These are all listed in the Bridge Scripting Guide… This is available as PDF as part of the SDK download from the dev center… or you can find them listed in the ESTK Object Model Viewer…