4 Replies Latest reply on Jun 17, 2011 6:40 AM by emerasoft.srl

    Event Watcher Utility now Available in Samples

    Bob Stucky Adobe Employee

      Hi Guys


      I wanted to announce to the group that we added a new Sample project to Extension Builder, EventWatcher.


      As a general tip, we add sample projects as we think of (and create) them. Periodically scanning the list of samples could prove handy.


      Anyway, what EventWatcher does is allow you to register for events in Illustrator, InDesign, and Photoshop. It then displays those events when they are fired by the host application.


      For it to work in AI and PS, you must install the host adapter plugins.


      I find this utility exceedingly handy. You'll likely find yourself a little surprised as to what events are fired when. In my book, a must-have for SDK developers.


      If you haven't looked at the samples and are wondering what the heck I am talking about...


      Select Import (File menu or right-click in the Package Explorer) in Flash Builder with Extension Builder installed. If you get there from the File menu, select "Other". Select Adobe Creative Suite Extension Builder->Remove Creative Suite SDK Examples.






        • 1. Re: Event Watcher Utility now Available in Samples
          DBarranca Level 4

          Thanks for the sample Bob!

          What's next?! ;-)



          • 2. Re: Event Watcher Utility now Available in Samples
            emerasoft.srl Level 1

            Hello Bob,


            very useful example. In the "EventWatcherInDesign.as" file I can see this line:


            eventList.addItem( new EventRecord( "Before Delete", Event.BEFORE_DELETE, false ) );


            But it seems to me this event is never fired


            Could this be possible?




            • 3. Re: Event Watcher Utility now Available in Samples
              Bob Stucky Adobe Employee



              The possible events are defined in the scripting docs, but ID has never fully implemented all of them.


              Glad you're finding it useful!





              Bob Stucky

              Solutions Enablement Engineer

              Adobe Systems, Inc.


              • 4. Re: Event Watcher Utility now Available in Samples
                emerasoft.srl Level 1

                Hello Bob,


                I made some comparison between the events written by you and the Scripting documentation. This small study helped me also to better understand what you ment with "not fully implemented". I.e. the BEFORE_DELETE and AFTER_DELETE are perfectly working with "placed objects" because the events has been implemented at the "Links" plug-in level.


                BTW, let me go back to the comparison I made. I found that these events are missing from the sample application:



                1. eventList.addItem( new EventRecord( "Before New", DocumentEvent.BEFORE_NEW, false ) );
                2. eventList.addItem( new EventRecord( "Before Open", DocumentEvent.BEFORE_OPEN, false ) );
                3. eventList.addItem( new EventRecord( "OnInvoke", Event.ON_INVOKE, false ) );
                4. eventList.addItem( new EventRecord( "After Export", DocumentEvent.AFTER_EXPORT, false ) );
                5. eventList.addItem( new EventRecord( "After Import", DocumentEvent.AFTER_IMPORT, false ) );
                6. eventList.addItem( new EventRecord( "Before Export", DocumentEvent.BEFORE_EXPORT, false ) );
                7. eventList.addItem( new EventRecord( "Before Import", DocumentEvent.BEFORE_IMPORT, false ) );
                8. eventList.addItem( new EventRecord( "Failed Export", DocumentEvent.FAILED_EXPORT, false ) );



                The first 3 are ok, I was able to add them; the last 5 I caould not because they don't exist. In my opinion, having a look to the scripting documentation, they should be present and accessible; also they should be "DocumentEvent" events.


                What do you think?