7 Replies Latest reply on Jul 9, 2014 12:17 AM by dinghui

    How to catch event when active document is chnaged in Photoshop CC HTML 5 extension

    skacperski

      I want to know when active document is changed in Photoshop CC (14.1.2).

      My HTML5 extension is using CSInterface-4.0.0.js.

       

      I tried many events but neither of them works (callback is never called):

       

      DocumentAfterActivate

      DocumentAfterDeActivate

      ApplicationActive

      ApplicationBeforeQuit

      DocumentEdited

      AppOnline

      AppOffline

       

      as well with namespace:

       

      com.adobe.csxs.events.DocumentAfterActivate

      com.adobe.csxs.events.DocumentAfterDeActivate

      com.adobe.csxs.events.ApplicationActive

      com.adobe.csxs.events.ApplicationBeforeQuit

      com.adobe.csxs.events.DocumentEdited

      com.adobe.csxs.events.AppOnline

      com.adobe.csxs.events.AppOffline

       

      I tried it like this:

      var cs = new CSInterface();

      cs.addEventListener('DocumentAfterActivate',function(){ console.log('success'); });

      // or

      cs.addEventListener('com.adobe.csxs.events.DocumentAfterActivate',function(){ console.log('success'); });

       

      Looking for solution...