从C运行applescript
如何从C命令行实用程序中运行AppleScript? 谷歌搜索不起作用,它只给了我Objective-C解决方案 编辑: 哎呀,我应该在谷歌上搜索“运行shell脚本C”…从C运行applescript,c,applescript,C,Applescript,如何从C命令行实用程序中运行AppleScript? 谷歌搜索不起作用,它只给了我Objective-C解决方案 编辑: 哎呀,我应该在谷歌上搜索“运行shell脚本C”… 现在我找到了system()函数…我将使用exec函数系列,它比system更安全: int exitCode = execlp("osascript", "osascript", "-e", "say \"Hello World\"", NULL); 我已经解决了我自己的问题。。。下次我会寻找更好的解决方案!为什么你不能
现在我找到了
system()
函数…我将使用exec
函数系列,它比system
更安全:
int exitCode = execlp("osascript", "osascript", "-e", "say \"Hello World\"", NULL);
我已经解决了我自己的问题。。。下次我会寻找更好的解决方案!为什么你不能在你的项目中使用基金会?CoreFoundation(基于C的API)是一个选项吗?