【发布时间】:2011-06-03 13:45:11
【问题描述】:
我在网络上的每一个地方搜索以下信息: 如何在“站点”文件夹中执行 applescript。让我解释 : 我制作了一个 litthe 脚本(PHP),它执行一个打开文件的 applescript 苹果脚本:
tell application "Finder"
open file "Macintosh HD:Utilisateurs:my-user:FOO.pdf"
end tell
我的 php 脚本:
exec("osascript ShutDown.scpt");
当我从本地主机执行它时,它正在工作。但是当我使用站点文件夹访问它时 http://my-user.home/myPhpScript.php 它不工作。您可以在下面的 apache 中找到错误:
my-user.home osascript[1323] <Error>: kCGErrorFailure: Set a breakpoint @
CGErrorBreakpoint() to catch errors as they are logged.
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer,
_CGSDefaultConnection() is NULL.
您知道任何解决方案可以使它工作吗?
非常感谢
【问题讨论】:
标签: macos applescript