从C运行applescript

如何在C命令行实用程序中运行AppleScript? 谷歌搜索不起作用,它只给了我Objective- C解决方案……

编辑:糟糕,我应该谷歌搜索’运行shell脚本C’…
现在我找到了system()函数……

我会使用exec系列函数,它比system更安全:

 int exitCode = execlp("osascript", "osascript", "-e", "say \"Hello World\"", NULL); 
Interesting Posts