-1
以下代码在AppleScript中引发错误。我得到error "iTerm got an error: Can’t make class «class Ptrm»." number -2710 from «class Ptrm» to class
。任何可能导致它的建议?我对AppleScript是全新的,但是我交付了这个可能过时的脚本,需要它运行,以便在iTerm中产生5个以下的操作。所有见解欢迎!谢谢AppleScript错误-2710
tell application "iTerm"
set t to (make new «class Ptrm»)
tell t
activate «class Cssn»
«event ITRMLNCH» given «class Pssn»:"Default Session"
tell the last «class Pssn»
«event ITRMWrte» given «class iTxt»:"vagrant ssh"
«event ITRMWrte» given «class iTxt»:"cd /vagrant"
«event ITRMWrte» given «class iTxt»:"./devsettings.sh scripts/runserver.py"
delay 1
end tell
«event ITRMLNCH» given «class Pssn»:"Default Session"
tell the last «class Pssn»
«event ITRMWrte» given «class iTxt»:"vagrant ssh"
«event ITRMWrte» given «class iTxt»:"cd /vagrant"
«event ITRMWrte» given «class iTxt»:"./localsettings.sh ./scripts/runcelery.py worker -c 10 -A plug.tasks -Q celery,pushq"
delay 1
end tell
«event ITRMLNCH» given «class Pssn»:"Default Session"
tell the last «class Pssn»
«event ITRMWrte» given «class iTxt»:"vagrant ssh"
«event ITRMWrte» given «class iTxt»:"cd /vagrant/messaging"
«event ITRMWrte» given «class iTxt»:"python2.7 directoryServer.py"
delay 1
end tell
«event ITRMLNCH» given «class Pssn»:"Default Session"
tell the last «class Pssn»
«event ITRMWrte» given «class iTxt»:"vagrant ssh"
«event ITRMWrte» given «class iTxt»:"cd /vagrant/messaging"
«event ITRMWrte» given «class iTxt»:"python2.7 iHttp.py"
delay 1
end tell
«event ITRMLNCH» given «class Pssn»:"Default Session"
tell the last «class Pssn»
«event ITRMWrte» given «class iTxt»:"vagrant ssh"
«event ITRMWrte» given «class iTxt»:"cd /vagrant/messaging/src"
«event ITRMWrte» given «class iTxt»:"go run wsServer.go"
end tell
end tell
显示的原始数据像'«class Ptrm»'而不是预期的可读术语表示编译后的脚本与当前应用程序字典不匹配。 – vadian
好吧,那么你有什么想法如何去解决它? –
尝试在当前字典的帮助下找出命令和类并重写脚本。 – vadian