ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Determine OS with Script and Apply Preset

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dave Currie
Determine OS with Script and Apply Preset
on Jun 28, 2018 at 3:26:22 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?


Return to posts index

Dan Ebberts
Re: Determine OS with Script and Apply Preset
on Jun 28, 2018 at 4:07:38 pm

I'd try it this way:

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


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]