Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Anyone able to use these Photoshop only events?

Advocate ,
Oct 02, 2015 Oct 02, 2015

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

759
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 12, 2018 Sep 12, 2018
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines