actionscript 3 - AIR Native process Error -


i try launch programm nativeprocess on mac.

pathev="/applications/myfolder/myapposx.app" var nativeprocessstartupinfo:nativeprocessstartupinfo = new nativeprocessstartupinfo(); var fileev:file = new file(); fileev=fileev.resolvepath(pathev); nativeprocessstartupinfo.executable = fileev; var process:nativeprocess = new nativeprocess(); process.start(nativeprocessstartupinfo);  

but error appear: error #3214: nativeprocessstartupinfo.executable not specify valid executable file

can me solve that? thanks

haven't tested yet, assume you'd need run open path application parameter, this:

pathev:string="/applications/myfolder/myapposx.app" var nativeprocessstartupinfo:nativeprocessstartupinfo = new nativeprocessstartupinfo(); var fileev:file = new file(); fileev=fileev.resolvepath( '/usr/bin/open' ); nativeprocessstartupinfo.arguments = vector.<string>([pathev]); nativeprocessstartupinfo.executable = fileev; var process:nativeprocess = new nativeprocess(); process.start(nativeprocessstartupinfo);  

and yes, needs extendeddesktop rights

fyi: vector shizzle correct, use convert array vector, not constructor function

here's explanation how launch .app files terminal


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -