Tener problemas con un AppleScript

0

¡Esto no es el lanzamiento de FaceTime cuando lo deseo! Quiero que inicie una aplicación, y usted elige qué aplicación lanza, así que si presiono Google Chrome, entonces se inicia Google Chrome, pero no se ejecuta FaceTime.

set the_results to (display dialog "Please Choose User!" buttons {"Admin", "Guest", "Cancel"})
set button_returned to button returned of the_results
if button_returned is "Guest" then display dialog "Guest is not functioning!"
if button_returned is "Admin" then display dialog "Please insert password!" buttons {"Cancel", "Continue"} default button 2 default answer "" cancel button 1 with hidden answer
if the text returned of the result is "Test" then
    set the_results to (display dialog "Welcome! What would you like to do?" buttons {"Chrome", "Messages", "More"})
    set button_returned to button returned of the_results
    if button_returned is "Chrome" then tell application "Google Chrome"
        activate
    end tell
    if button_returned is "Messages" then tell application "Messages"
        activate
    end tell
    if button_returned is "More" then display dialog "Second Page" buttons {"FaceTime", "Thank You!"}
end if
if button_returned is "FaceTime" then tell application "FaceTime"
    activate
end tell
    
pregunta PLASMAGHOST 06.02.2016 - 19:35

1 respuesta

1

Es un error similar al de su última pregunta :

Puede reutilizar button_returned y the_results (como ya hizo en las líneas 6 y 7 < - > 1 y 2):

...
    if button_returned is "More" then set the_results to (display dialog "Second Page" buttons {"FaceTime", "Thank You!"})
    set button_returned to button returned of the_results
end if
if button_returned is "FaceTime" then tell application "FaceTime"
    activate
end tell

o introduzca dos nuevas variables: button_returned2 y the_nextresults :

...
    if button_returned is "More" then set the_nextresults to (display dialog "Second Page" buttons {"FaceTime", "Thank You!"})
    set button_returned2 to button returned of the_nextresults
end if
if button_returned2 is "FaceTime" then tell application "FaceTime"
    activate
end tell
    
respondido por el klanomath 06.02.2016 - 20:36

Lea otras preguntas en las etiquetas