Skip to main content
Oct 24, 2019 3:11 PM UTC
Answered

ExtendScript: How to find out which App is running the script?

Hello. Is it possible in ExtendScript to determine if the script is running by Premiere or AfterEffects?

I mean something like:

if (app.name == "Premiere") {
... do something in Premiere ... }
else if (app.name == "AfterEffects") {
... do something in AE ... }
    This topic is closed to new replies. Start a new post to keep the conversation going.
    GNDGN
    GNDGNCorrect answer
    Inspiring
    Nov 5, 2019 2:51 PM UTC

    getHostEnvironment().appName inside CSInterface.js is your friend: 

    var csInterface = new CSInterface();
    var myCurrentAdobeApp = csInterface.getHostEnvironment().appName;

     

    ____________________Robotic Process Automation in Desktop Publishing (Book): https://doi.org/10.1007/978-3-658-39375-5

    2 replies

    PECourtejoie
    Community Expert
    Community Expert
    Jan 15, 2020 3:38 PM UTC

    Thread moved to the Exchange forum

    Translate
    GNDGN
    GNDGNCorrect answer
    Inspiring
    Nov 5, 2019 2:51 PM UTC

    getHostEnvironment().appName inside CSInterface.js is your friend: 

    var csInterface = new CSInterface();
    var myCurrentAdobeApp = csInterface.getHostEnvironment().appName;

     

    Translate
    ____________________Robotic Process Automation in Desktop Publishing (Book): https://doi.org/10.1007/978-3-658-39375-5