• 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
RE: Wind Chill (corrected & full)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Wind Chill (corrected & full)


  • Subject: RE: Wind Chill (corrected & full)
  • From: David Groover <email@hidden>
  • Date: Fri, 1 Mar 2002 07:24:03 -0500

Great question and responses. I appreciate a real world, non computer
oriented, practical result from an AS. Helps my learning. But, I pasted
the following in my text editor, only to have the formula hang on a coma
(the one immediately following "Cancel", "OK"}") when it expected an end
of line. I tried moving several things around but without success. My
essentials are:

AppleScript 1.3.7
Apple system 8.6
Mac 7300 w XLR8 G3/400

Was the script intended to be ready to go? Or did I presume and miss
something I should have taken out?

Thanks

Dave Groover
----------------------------------

Thus spake email@hidden:

>tell application "Finder"
>
> display dialog "Please enter the temp in degrees Fahrenheit: " buttons {"
>Cancel", "OK"} ,
> default button 2 default answer "54"
> set TheEntryTemp to the text returned of the result as string -- don't
>force the coercion yet
>
> display dialog "Please enter the wind speed in miles per hour: " buttons
>{"Cancel", "OK"} ,
> default button 2 default answer "10"
> set TheEntryMPH to the text returned of the result as string
>
> -- insert a little error checking to make sure a number was entered for
>each and in range here (-220 to +210 for temp, 0 to 240 for MPH ). You can
>write that yourself :)
>
> set TheTemp to TheEntryTemp as integer
> set TheSpeed to TheEntryMPH as integer
>
> set TheWindChill to (35.74 + (0.6215 * TheTemp) - (35.75 * TheSpeed *
>0.16
>) + (0.4275 * TheTemp * TheSpeed * 0.16))
>
> display dialog "The temp including wind chill is: " & TheWindChill
>buttons {"OK"} default button 1
>end tell
_______________________________________________
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.

  • Follow-Ups:
    • Re: Wind Chill (corrected & full)
      • From: Markus Erndl <email@hidden>
    • RE: Wind Chill (corrected & full)
      • From: Mr Tea <email@hidden>
  • Prev by Date: Re: Application responses
  • Next by Date: RE: Wind Chill (corrected & full)
  • Previous by thread: RE: Wind Chill (corrected & full)
  • Next by thread: RE: Wind Chill (corrected & full)
  • Index(es):
    • Date
    • Thread