AppleScript를 사용하여 시스템 환경 설정을 잠금 해제하려고합니다.GUI를 사용하여 시스템 환경 설정 잠금 해제 AppleScript
는 내가 "변경할 수있는 자물쇠를 클릭"부분을 클릭하는 내 스크립트를 얻는 것을 처리했다, 나는 사용자 이름을 입력합니다 AppleScript로를 얻으려고 노력했지만, 나는 오류
error "System Events got an error: Can’t get window 1 of process \"SecurityAgent\". Invalid index." number -1719 from window 1 of process "SecurityAgent"
가 계속
내 코드는 누구든지 내게 손을 줄 수 있습니까?
activate application "System Preferences"
tell application "System Events"
set preferencesLocked to false
tell process "System Preferences"
delay 1
click menu item "Security & Privacy" of menu "View" of menu bar 1
delay 2.5
if title of button 4 of window 1 is "Click the lock to make changes." then
set preferencesLocked to true
click button "Click the lock to make changes." of window 1
end if
end tell
if preferencesLocked is true then
delay 2.5
activate application "SecurityAgent"
tell application "System Events"
tell process "SecurityAgent"
set value of text field 1 of scroll area 1 of group 1 of window 1 to "username"
end tell
end tell
end if
end tell
도와주세요. 고맙습니다.
로그인 대화 상자를 스크립팅 할 수 없습니다. 나는 애플이 다른 프로그램이 당신의 컴퓨터 나 다른 것들에 접근하는 것을 원하지 않기 때문이라고 생각한다. – fireshadow52
이전 버전의 OSX에서 제대로 작동하는 데 사용 되셨습니까? 이게 내가 최근에 만난 새로운 것 같아. – user754905
지금 무엇을 운영하고 계십니까? – fireshadow52