天道酬勤,学无止境

nsapplescript

当我将 OS X 升级到 10.9 时,我的 applescript 不再起作用(My applescript doesn't work any more when I upgrade my OS X to 10.9)

问题 以下代码试图打开代理设置对话框, NSAppleScript *a = [[NSAppleScript alloc] initWithSource:@"tell application \"System Preferences\"\nset current pane to pane \"com.apple.preference.network\"\nactivate\nend tell\ntell application \"System Events\" to tell process \"System Preferences\" to tell window 1\n click button -3\nclick radio button -2 of tab group 1 of sheet 1\nend tell"]; [a executeAndReturnError:nil]; 在我将 Mac OS 升级到 10.9 之前,它一直运行良好。 应用程序的第二部分, tell application \"System Events\" to tell process \"System Preferences\" to tell window 1\n click button -3\nclick radio button -2 of tab group 1 of sheet

2021-06-11 10:54:30    分类:技术分享    objective-c   applescript   sandbox   osx-mavericks   nsapplescript

My applescript doesn't work any more when I upgrade my OS X to 10.9

The following code is trying to open the proxies settings dialog, NSAppleScript *a = [[NSAppleScript alloc] initWithSource:@"tell application \"System Preferences\"\nset current pane to pane \"com.apple.preference.network\"\nactivate\nend tell\ntell application \"System Events\" to tell process \"System Preferences\" to tell window 1\n click button -3\nclick radio button -2 of tab group 1 of sheet 1\nend tell"]; [a executeAndReturnError:nil]; it has been working well until I upgrade my Mac OS to 10.9. The second part of the applescript, tell application \"System Events\" to tell process \

2021-05-01 18:39:10    分类:问答    objective-c   applescript   sandbox   osx-mavericks   nsapplescript