Unable to call applescript from extension[CS6]


hi,

 

i need mount directory automatically through code. accomplish i've applescript run script action script need script run. saw code in "http://forums.adobe.com/message/3238998" see there no attribute called applescript_language in api. has script language vb script , javascript no applescript. i'm using flex 4 indesign cs6 extension.

 

var app:application = indesign.app;     if(os.tolowercase() == 'mac')        {            var applescript:file = new file("automounting.scpt");                app.doscript(applescript.nativepath, scriptlanguage.?);            }   

 

could 1 me out done ?


many in advance.

 

mac

to run script, can use nativeprocess api launch native script utility ("osascript" on mac). here's quick example:

 

var scriptfile:file = new file('yourscript.scpt'); var scriptutility:file = new file('/usr/bin/osascript'); if (scriptutility.exists) {      var processinfo:nativeprocessstartupinfo = new nativeprocessstartupinfo();      processinfo.executable = scriptutility;      processinfo.arguments = new vector.();      processinfo.arguments.push(scriptfile.nativepath);       var process:nativeprocess = new nativeprocess();      process.start(processinfo); }


More discussions in Creative Suite SDK


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account