C equivalent to applescript "tell X to open Y" -


does have c library function equivalent of applescript "tell application x open y"? i'm not using cocoa, plain old c, , ideally able commandl ine application has no gui interface.

this doesn't have fancy, right if don't wait success-or-failure response. needs send right apple event.

i think far simplest solution issue system call osascript command line utility.

#include <stdio.h> #include <stdlib.h>  int main(void) {   system("osascript -e 'tell application \"x\" open posix file \"/path/to/y\"'");   return 0; } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -