Skip to main content
Inspiring
January 26, 2022
Question

PS Plugin - self trigger event ?

  • January 26, 2022
  • 2 replies
  • 342 views

Hey

 

So I've been going over photoshop SDK left and right for MAC.

I need to trigger my plugin from within plugin without photoshop requesting the action... 

For example if I run a processing thread, when finish, I'd like to tell ps to "run my plugin" and then properly handle the result when PS call my plugin and put it in correct thread loop.

 

Can any1 suggest if/how that can be done? Or alternatively, how can I trigger plugin from outside PS on MAC ?

On windows I can do it via MFC for example, but on MAC?

Ideas?

TIA.

This topic has been closed for replies.

2 replies

Tom Ruark
Inspiring
January 27, 2022

If your plugin is scriptable then create an Apple Script event and send that to Photoshop. OLE/COM/VBScript/Automation event on windows.

Inspiring
January 28, 2022

Hey @Tom Ruark 

Thank you for info!


Hmmm. Do  you mean that I should call from plugin thread applescript event ? Is that a "fast" action ? I want to remotely control photoshop & allow user to manipulate it as if he was using it directly. If say user scroll a widget to adjust exposure, would it be a good idea to spam that apple script event? Hints? - I'm fairly new to Mac dev, mostly win here.

 

Also, if say I run my plugin 1x and it creates javascript engine & never deletes it after plugin end...  what if I then send commands to that engine from thread? Would that be thread save by any chance? I take c++ code would be not, but maybe it is... ? o.o

 

COM is that MFC ? 

Inspiring
January 27, 2022

Hey @Tom Ruark any chance you could help out with this topic maybe ? 

Regards

Dariusz