Close plugin automatically?

I want to programmatically close my plugin after the task is done. Is it possible?

If you mean the panel, kind of…

UXP needs a lot of features that CSInterface used to have that were AMAZINGLY useful, including the CSInterface.resize function I used so much in my panels

2 Likes

Or watching selected document change.

what do you exactly mean?

When different document window is activated.

That would be a trigger indeed, but how I could implement closing the panel? I searched here in the forums and the one I found seems to be not implemented yet in UXP.

There is a solution in the topic that I linked. Specifically this post:

This toggles the panel, so you just need to check the state and close if it’s open

1 Like

Thank you Karmalakas, I was going to ask if there was a way to read the plugin commandID from the menu and here’s the answer, now I have completed my function, works like a charm. Thank you very much!