Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. display dialog "Hello and welcome to my app!" buttons {"Login", "Quit"} default button 1
  2.  
  3. if the button returned of the result is "Login" then
  4. display dialog "Username:" buttons {"Admin", "Guest"} default button 1 with title "Choose user"
  5. else
  6. return
  7. end if
  8.  
  9. if the button returned of the result is "Admin" then
  10. display dialog "Enter Pasword" default answer "" buttons {"Submit"} with title "Enter password" with hidden answer
  11. else
  12. display dialog "You have selected guest! Guest is not currenty enabled, since this build is in beta. Thank you!" buttons {"OK"}
  13. return
  14. end if
  15.  
  16. if the text returned of the result is "Cameron67" then
  17. display dialog "Welcome! What would you like to do?" buttons {"Chrome", "Messages", "More"}
  18. if the button returned of the result is "Chrome" then tell application "Google Chrome"
  19. activate
  20. end tell
  21. if the button returned is "Messages" then tell application "Messages"
  22. activate
  23. end tell
  24. else
  25. display dialog "Incorrect password" buttons {"OK"} default button 1 with icon stop
  26. end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement