Teil einer Anwendung ändert die Bildlaufrichtung des Trackpads mit diesem AppleScript (verwendet als AppleScriptObjC in Xcode AppleScript-Anwendung).Anwendung automatisch hinzufügen, um assistiven Zugriff zu ermöglichen
Beim Laufen, es erscheint oft mit einer Nachricht auf, um mich zu sagen, dass mein App wurde Zugänglichkeit Zugang nicht erlaubt (die übliche Meldung ...)
Hier ist der Code:
on TrackpadIsAttached()
try
tell application "System Preferences" to quit
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.trackpad"
end tell
tell application "System Events" to tell application process "System Preferences"
tell radio button 2 of tab group 1 of window 1 to if value is 0 then click
tell checkbox 1 of tab group 1 of window 1 to if value is 1 then click
end tell
tell application "System Preferences" to quit
functionSuccessful("Mouse control optimisation completed successfully.")
on error errMsg
my errorReporting(errMsg, "Fatal Mouse Optimisation (Trackpad) Error")
tell application "System Preferences" to quit
end try
end TrackpadIsAttached
Ich weiß, ich kann es manuell mit: System Preferences
>Security & Privacy
>Privacy
>Accessibility
aber kann es auch automatisch mit AppleScriptObjC oder 'Do Shell Script' getan werden? - Ich habe nichts dagegen, wenn der Benutzer eingeben muss, ist ein Passwort zur Authentifizierung usw.
Jede Hilfe wird sehr geschätzt.