Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Determine OS with Script and Apply Preset

  • Determine OS with Script and Apply Preset

    Posted by Dave Currie on June 28, 2018 at 3:26 pm

    As the title suggests, I’m trying to determine which OS the user is on and then apply a preset from the app Presets folder. Here’s what I have:

    var os = os.indexOf("Mac") == 0 ? "MAC": "WINDOWS";
    if (os =="WINDOWS"){
    var myPreset = Folder(Folder.appPackage.parent.absoluteURI + "/Support Files/Presets/MyPreset.ffx");
    }else if (os=="MAC"){
    var myPreset = Folder(Folder.appPackage.parent.absoluteURI + "/Presets/MyPreset.ffx");
    }

    Should be pretty simple and it works on my Windows machine, but the script will not fire on a Mac. Any suggestions?

    Dan Ebberts replied 8 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    June 28, 2018 at 4:07 pm

    I’d try it this way:

    var os = $.os.indexOf(“Mac”) != -1 ? “MAC”: “WINDOWS”;

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy