저는 AppleScript 코딩에 새로운 것이므로이 코드에 어떤 문제가 있는지 궁금합니다. 오류는 "변수 결과가 정의되지 않았습니다."입니다. 오류가 발생하는 이유는 무엇입니까? 내 코드는 다음과 같습니다 : 문, 그들은 3 가능한 버튼 선택을 잡으려고 올바른 구조를 얻기 위해 else if
와 함께 묶여 될 필요가있는 경우변수 결과가 정의되지 않았습니다.
display dialog "Hello and welcome to my app!" buttons {"Login", "Quit"} default button 1
if the button returned of the result is "Login" then
display dialog "Username:" buttons {"Raphi", "Guest"} default button 1 with title "Choose user"
else
tell application "My app" to quit
end if
if the button returned of the result is "Raphi" then
display dialog "Password:" default answer "" buttons {"Submit"} with title "Enter password" with hidden answer
else
display dialog "You have selected guest! Guest is not currenty enabled, please ask Raphi to enable it. Thank you!" buttons {"OK"}
end if
if the text returned of the result is "123" then
display dialog "Would you like to continue or exit?" buttons {"Continue", "Exit"}
else
display dialog "Incorrect password" buttons {"OK"} default button 1 with icon stop
end if
if the button returned of the result is "OK" then
tell application "My app" to quit
end if
if the button returned of the result is "Continue" then
display dialog ""
else
tell application "My app" to quit
end if