Nido Apple

Recibe ayuda de expertos

Registrate y pregunta

Es gratis y fácil

Recibe respuestas

Respuestas, votos y comentarios

Vota y selecciona respuestas

Recibe puntos, vota y da la solución

Pregunta

1voto

--====================================================
--Desde Preferencias Del Sistema > Accesibilidad > Control por voz > Comandos:
-- ¿Cómo cambiar a otro panel de Preferencias del Sistema usando AppleScript?
--====================================================

-- Salida:

if running of application "System Preferences" then
    try
        tell application "System Preferences" to quit
    on error --                         Se aprovecha el error que se produce para salir
        do shell script "killall 'System Preferences'"
    end try
end if

-- Cambiamos a otro panel de Preferencias del Sistema:

tell application "System Preferences"
    quit
    repeat while it is running
        delay 0.2
    end repeat
    activate
    set current pane to pane "com.apple.preference.speech" -- Panel Siri, por ejemplo.
end tell

--====================================================
--Sin embargo, si el cambio es al panel principal de Preferencias del Sstema…
-- Lamamos al panel de Preferencias del Sistema:
--====================================================

if running of application "System Preferences" then
    try
        tell application "System Preferences" to quit
    on error --                                Se aprovecha el error que se produce para salir
        do shell script "killall 'System Preferences'"
    end try
end if

delay 2 -- incluso 4

tell application "System Preferences"
    activate
end tell

-- Los resultados no son los esperados (aparece el Panel de Accesibilidad)

--====================================================
-- ¿Alguna sugerencia?
-- Agradecimientos de antemano.
--====================================================

Por favor, accede o regístrate para responder a esta pregunta.

Otras Preguntas y Respuestas


Actividad Reciente

...