# Is there a autoload option on manifest?

**URL:** <https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927>\
**Category:** UXP Plugin API\
**Tags:** manifest\
**Created:** [May 10, 2021, 7:45pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927 "2021-05-10T19:45:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lvilasboas-dti](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@lvilasboas-dti](https://forums.creativeclouddeveloper.com/u/lvilasboas-dti)\
**Post date:** [May 10, 2021, 7:45pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927/1 "2021-05-10T19:45:51Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [May 10, 2021, 8:42pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927/2 "2021-05-10T20:42:07Z")

</div>

_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?

---

<div class="post-metadata">

**Author:** ![lvilasboas-dti](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@lvilasboas-dti](https://forums.creativeclouddeveloper.com/u/lvilasboas-dti)\
**Post date:** [May 10, 2021, 8:48pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927/3 "2021-05-10T20:48:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [May 11, 2021, 1:36pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927/4 "2021-05-11T13:36:50Z")

</div>

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:

> [@Multiple Panel Example for React/Typescript](http://forums.creativeclouddeveloper.com/t/multiple-panel-example-for-react-typescript/2550/4):
>
> One thing I want to hone in on as well — don’t assume that your plugin will _always_ be active in the current Ps context. It is _currently_ , but may not be in the future should Ps decide to be more strict about memory management and the like. For example, once you have the other lifecycle methods that you can use, you may want to reload your settings on `plugin#create` . But you can’t do that just yet – just letting you know for the future.

---

<div class="post-metadata">

**Author:** ![lvilasboas-dti](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@lvilasboas-dti](https://forums.creativeclouddeveloper.com/u/lvilasboas-dti)\
**Post date:** [May 11, 2021, 2:28pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927/5 "2021-05-11T14:28:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [May 12, 2021, 1:46pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927/6 "2021-05-12T13:46:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [May 12, 2021, 8:24pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927/7 "2021-05-12T20:24:44Z")

</div>

@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.)

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [May 12, 2021, 8:37pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-autoload-option-on-manifest/2927/8 "2021-05-12T20:37:35Z")

</div>

Alright, makes sense 👍
