• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
if-then script (was: (no subject))
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

if-then script (was: (no subject))


  • Subject: if-then script (was: (no subject))
  • From: Christopher Stone <email@hidden>
  • Date: Thu, 29 Jul 2004 05:37:19 -0500

At 17:19 -0700 07/28/2004, Patrick Zittle wrought:

Hey Everyone! I was just wondering what the format for a if-then script? I would like to ask a display a question and if they insert anything but the answer it asks the question again. How can I do this?

property theAnswer : "yes"
set theText to ""

on dd()
return text returned of ,
(display dialog "Are you out of your mind?" default answer "")
end dd

repeat while theText is not theAnswer
set theText to dd()
end repeat

if theText is "yes" then
display dialog "Join the club. :)"
end if



Chris
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >(no subject) (From: Patrick Zittle <email@hidden>)

  • Prev by Date: Re: Determining File Path of Running Script Application
  • Next by Date: Re: Duntdown script (was Non Privileged shutdown (was Privileged shutdown)
  • Previous by thread: Re: repeat dialog (was (no subject))
  • Next by thread: Re: repeat dialog (was (no subject))
  • Index(es):
    • Date
    • Thread