Skip to main content
October 24, 2019
Answered

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

  • October 24, 2019
  • 2 replies
  • 934 views

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 has been closed for replies.
    Correct answer GNDGN

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

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

     

    2 replies

    PECourtejoie
    Community Expert
    Community Expert
    January 15, 2020

    Thread moved to the Exchange forum

    GNDGN
    GNDGNCorrect answer
    Inspiring
    November 5, 2019

    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