Skip to main content
DBarranca
Legend
October 2, 2015
Question

Anyone able to use these Photoshop only events?

  • October 2, 2015
  • 1 reply
  • 764 views

Hi,

I'm referring to these ones:

  • com.adobe.PhotoshopWorkspaceSet
  • com.adobe.PhotoshopWorkspaceGet
  • com.adobe.PhotoshopWorkspaceAware
  • com.adobe.PhotoshopWorkspaceData
  • com.adobe.PhotoshopWorkspaceRequest
  • com.adobe.PhotoshopQueryDockingState

Has someone been able to find a way to use them?

I've naively tried:

var csInterface = new CSInterface();

var event = new CSEvent();

event.type = "com.adobe.PhotoshopWorkspaceSet";

event.scope = "APPLICATION";

event.appId = csInterface.getApplicationID(); // "PHXS"

event.extensionId = csInterface.getExtensionID()

csInterface.dispatchEvent(event);

var PhotoshopCallback = function(evt) {

    console.log("Fired!", evt);

}

csInterface.addEventListener("com.adobe.PhotoshopWorkspaceSet", PhotoshopCallback);

but I'm not sure whether I'm supposed to only dispatch the Event in order to make something happen (like the com.adobe.PhotoshopLoseFocus, returning focus from the panel back to PS), or the addEventListener is needed too.

Hints? 😉

Thanks,

Davide Barranca

---

www.davidebarranca.com

www.cs-extensions.com

    This topic has been closed for replies.

    1 reply

    Participant
    September 12, 2018

    Hi Davide,

    It's been years and probably you've already figured it out, but just in case someone stumbles upon this thread

    You were doing everything right, but you were firing the event BEFORE adding an event listener for it, so it had nothing to react to. You should have put csInterface.addEventListener call before csInterface.dispatchEvent.

    Hope this helps,

    Yuriy