Is there a autoload option on manifest?

Hi everyone,

I was wondering if there is some autoload option on manifest.json, to make my UXP plugin’s panel show up automatically once a user launches Photoshop.

If not, is there any workaround? I don’t want my plugin to be invasive to users, I’ll add an toggle to enable/disable it, but some of the potential users I’ve interviewed before starting the development have asked for it to be automatically shown to them.

Any response or comment on this issue will be greatly appreciated!

1 Like

If Photoshop is running while the plugin is installed, your plugin will be launched automatically. (If PS is not, then nothing happens).

Plugin panels will remember their state; if it was open when Ps was closed, it’ll be visible on launch.

There is currently no mechanism to automatically show your panel if it wasn’t already visible when Ps was shut down.

I would be curious about your users’ use cases here, since adding the panel as part of a workspace might be sufficient?

Hi @kerrishotts, thank you for your answer!

The usecase here is that the plugin is listening to specific events (via addNotificationListener), and two of said events are make and open; so, if the user closes the panel, when Photoshop is launched, the plugin will not be able to track those events (because the plugin is not shown at first, but the user might go to the plugins menu and enable it back again - but they might not remember to do so every single time).

Even with the plugin as part of the workspace, if it is closed, it’ll only actually run once the user opens it.

So, if there was an option to automatically display the panel once Photoshop launches, our plugin would start listening to the events from the first moment the user uses Photoshop.

Right now, plugins are always persistent, so you wouldn’t even need to open the panel for your listeners to work. I just tested this again by adding a console log to an event callback - it does the log even if the panel is closed / not visible.
However, this might change in the future, quoting Kerri:

Hi @simonhenke, thank you very much for your response!

But I tried what you said, several times, with several different configurations (panel entrypoint, command entrypoint, no entrypoint, panel importing the js script…).

Using UDT, it works everytime I load the plugin. But if I package the plugin and import it to PS, it works as @kerrishotts mentioned: if the panel was closed when PS was shut down, it’ll remain closed and my code will not run until I open the panel (I checked that by adding a showAlert whenever my listener was set. Result: the alert is only shown when PS starts up if the panel was opened when PS was shutdown - otherwise, ie the panel was opened when PS was shutdown, the alert shows as soon as PS is started back up again).

Would you mind sharing your code? Including the manifest setup, if that’s okay with you.
Just to check out what you did, and what I’ve done differently.

I didn’t try it in a packaged plugin, maybe the behavior is different there. The code isn’t anything special, just photoshop.action.addNotificationListener and a console.log in the event callback.

@simonhenke Behavior is a little different, because when the developer tool loads a plugin in Ps, Ps automatically starts the plugin (the intent, after all, is usually to start debugging the plugin, so you’d want the plugin to start up.)

Alright, makes sense :+1: