• 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
How do you get a stay-open applet to quit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do you get a stay-open applet to quit?


  • Subject: How do you get a stay-open applet to quit?
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 1 Jan 2006 17:38:16 -0700

This didn't work for me:

repeat
(display dialog "Enter the heart rate or percentage" default answer eightyPercent buttons {"Cancel", "Percentage", "Heart rate"} default button 3)
set {TR, BR} to {text returned of the result, button returned of the result}
set NR to TR as number


if ((NR is greater than MaxSafe) and (BR is "heart rate")) or ((NR is greater than 100) and (BR is "percentage")) then
set icn to warning
else
set icn to informational
end if
if BR is "Heart rate" then
set percentage to ((NR / MaxSafe) * 100) as integer
display alert "Your heart rate was " & (percentage as text) & "% of the Maximum safe heart rate." as icn
else if BR is "Percentage" then
set heart_rate to (MaxSafe * NR) / 100 as integer
display alert "Your heart rate was " & (heart_rate as text) & " beats per minute." as icn
else
tell me to quit
end if
end repeat

-- Michelle
-- 
Prius:  Kicks Gas

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How do you get a stay-open applet to quit?
      • From: Adam Bell <email@hidden>
  • Prev by Date: Re: Selection of Finder's Second Window (Dave Lyons?)
  • Next by Date: Re: How do you get a stay-open applet to quit?
  • Previous by thread: Re: Selection of Finder's Second Window (Dave Lyons?)
  • Next by thread: Re: How do you get a stay-open applet to quit?
  • Index(es):
    • Date
    • Thread