在尝试获取桌面界限时获取AppleScript错误-1728

时间:2018-04-12 20:14:36

标签: applescript bounds macos-high-sierra

我试图使用以下代码获取桌面的边界:

tell application "Finder"
    get bounds of window of desktop
end tell

我一直收到以下错误:

  

错误" Finder收到错误:无法获得桌面窗口的界限。"从桌面窗口的边界编号-1728

我发现问了同样的问题 - > get bounds of desktop with applescript但那里的解决方案(关于启用此首选项的内容:默认写com.apple.finder CreateDesktop -bool false)在我尝试时并不适用于我。我使用的是High Sierra,而这个解决方案是在2012年发布的。

任何想法我还可以尝试获取实际屏幕的界限,而不是我的桌面目录?

由于

0 个答案:

没有答案