Skip to main content
Legend
February 12, 2019
Question

Launch "Invisible HTML5 Panel" on host app launch?

  • February 12, 2019
  • 2 replies
  • 2526 views

Hi There,

I would like to force launch an invisible CEP panel when After Effects launches, and I think this is accomplished via the <StartOn> XML element in the manifest which is a child of the <Lifecycle> element.   I thought that maybe at least one of the following Photoshop events might also be dispatched by AE, but for whatever reason, my panel does not initialize when I begin the debugging process. 

  • "com.adobe.csxs.events.AppOnline"
  • "applicationActivate"

The invisible CEP panel runs initialization code that attaches a helper class to the globally accessible $ object that other ExtendScripts can access.  I test by launching AE, then inspecting the $ object.  If I make the CEP panel visible and spawn from AE's "Window > Extensions" menu, I do see that the initialization code runs.

Does AE dispatch any events related to its application lifecycle?  I have attached the manifest below for clarity sake.  I've tried both "com.adobe.csxs.events.AppOnline" and "applicationActivate" with AE and it appears that the invisible CEP panel does not initialize.  Any further information regarding AE specifically is appreciated.

The documentation on invisible panels leaves AE off the list in the table.  Does that mean invisible panels do not function in AE?

Thanks,

Arie

<?xml version="1.0" encoding="UTF-8"?>

<ExtensionManifest Version="5.0" ExtensionBundleId="com.dev.project" ExtensionBundleVersion="5.4.2"

        ExtensionBundleName="com.dev.project" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <ExtensionList>

        <Extension Id="com.dev.project" Version="0.1.0" />

    </ExtensionList>

    <ExecutionEnvironment>

        <HostList>

            <Host Name="AEFT" Version="[13.0,16.0]" Port="8093" />

        </HostList>

        <LocaleList>

            <Locale Code="All" />

        </LocaleList>

        <RequiredRuntimeList>

            <RequiredRuntime Name="CSXS" Version="5.0" />

        </RequiredRuntimeList>

    </ExecutionEnvironment>

    <DispatchInfoList>

        <Extension Id="com.dev.project">

            <DispatchInfo >

                <Resources>

                    <MainPath>./index.html</MainPath>

                    <ScriptPath>./jsx/hostscript.jsx</ScriptPath>

                    <CEFCommandLine>

                        <Parameter>--enable-nodejs</Parameter>

                        <Parameter>--mixed-context</Parameter>

                        <Parameter>--enable-media-stream</Parameter>

                    </CEFCommandLine>

                </Resources>

                <Lifecycle>

                    <AutoVisible>false</AutoVisible>

                    <StartOn>

                        <!-- AppOnline Initialization -->

                        <Event>com.adobe.csxs.events.AppOnline</Event>

                        <!-- Photoshop dispatches this event on startup -->

                        <!-- <Event>applicationActivate</Event>  -->

                        <!-- Premiere Pro dispatches this event on startup -->

                        <!-- <Event>com.adobe.csxs.events.ApplicationActivate</Event> -->

                        <!-- You can add more events -->

                        <!-- <Event>another_event</Event> -->

                    </StartOn>

                </Lifecycle>

                <UI>

                    <Type>Custom</Type>

                    <Geometry>

                        <Size>

                            <Height>1</Height>

                            <Width>1</Width>

                        </Size>

                    </Geometry>

                    <Icons>

                        <Icon Type="Normal">./icons/iconNormal.png</Icon>

                        <Icon Type="RollOver">./icons/iconRollover.png</Icon>

                        <Icon Type="Disabled">./icons/iconDisabled.png</Icon>

                        <Icon Type="DarkNormal">./icons/iconDarkNormal.png</Icon>

                        <Icon Type="DarkRollOver">./icons/iconDarkRollover.png</Icon>

                    </Icons>                   

                </UI>

            </DispatchInfo>

        </Extension>

    </DispatchInfoList>

</ExtensionManifest>

This topic has been closed for replies.

2 replies

Participating Frequently
March 11, 2019

Hi Arie,

applicationActivate fires when the host app regains focus after being blurred.

To initialise on startup you'll want to use com.adobe.csxs.events.ApplicationInitialized

Legend
March 11, 2019

Remcoje​ Many thanks for this tip!  I will investigate and let you know!

Best,

Arie

Participating Frequently
March 11, 2019
erinferinferinf
Adobe Employee
Adobe Employee
February 25, 2019

Hi Arie!

At the very least I can confirm that After Effects is missing from that chart in the docs. I have filed a github issue about it.

In the sample Premiere invisible panel there are two Events called within StartOn... maybe that's the problem?

I'll see if I can find someone else to answer this as well.