我试图使用脚本用AppleScript程序打开CS:GO,但是我收到错误消息:
处理程序无法处理此类-10010
的对象
这是脚本:
set myfilepath to "Macintosh HD:Users:Kasper:Desktop:Counter-Strike Global Offensive"
tell application "Finder" to open myfilepath
delay 5
tell application "System Events" to set unixID to unix id of process "csgo_osx"
do shell script ("renice -20 -p " & unixID) password "2306" with administrator privileges
为什么会发生这种情况?
答案 0 :(得分:0)
你的第二行是告诉Finder的Open命令打开一个字符串。需要给它一个文件或别名。将该行更改为:
tell application "Finder" to open file myfilepath