我是applecript的新手,这个简单的AppleScript必须等到任何应用程序午餐然后显示测试通知,但什么都没发生!
任何解决方案? 感谢
script Autopilot
property NSWorkspace : class "NSWorkspace"
on run
tell (NSWorkspace's sharedWorkspace())'s notificationCenter() to ¬
addObserver:me selector:"notificationDelegate:" |name|:"NSWorkspaceDidLaunchApplicationNotification" object:(missing value)
end run
on notificationDelegate:sender
display notification "notify"
end notificationDelegate:
end script
答案 0 :(得分:0)
试试这个
property NSWorkspace : class "NSWorkspace" of current application