error "No se puede obtener el botón devuelto de \" C \ "." Número -1728 del botón devuelto de "C"

-1
set buttonChoice to (display dialog "Play game?" buttons {"Yes", "No"} with title "Play?")
if button returned of buttonChoice = "No" then
return "No"
end if
repeat
 set levelnum to text returned of (display dialog "How many levels will you play?" buttons {"Ok"} default answer "1" with title "Levels?")
set Letters_ to {"A", "B", "C", "D", "E", "F", "G"}
set buttonChoice2 to (choose from list Letters_ with prompt "Choose A Letter" with title "Pick One" without multiple selections allowed) as text
if button returned of buttonChoice2 = "C" then
    display dialog "You Win!" buttons {"Yay!, Proceed to next level"}
    exit repeat
else
    display dialog "Try again :("
end if
end repeat

¿Puedo corregir el error "No se puede obtener el botón devuelto de \" C \ "." número -1728 del botón               devuelto de "C"

    
pregunta MindCrap Capper 14.09.2014 - 17:43

1 respuesta

0

buttonChoice2 ya contiene la letra seleccionada, así que

set buttonChoice2 to (choose from list Letters_ with prompt "Choose A Letter" with title "Pick One" without multiple selections allowed) as text
if buttonChoice2 = "C" then
    display dialog "You Win!" buttons {"Yay!, Proceed to next level"}
    exit repeat
else
    display dialog "Try again :("
end if
    
respondido por el nohillside 14.09.2014 - 17:47

Lea otras preguntas en las etiquetas