RE: Wind Chill (corrected & full)
RE: Wind Chill (corrected & full)
- Subject: RE: Wind Chill (corrected & full)
- From: David Groover <email@hidden>
- Date: Fri, 1 Mar 2002 09:24:45 -0500
Thus spake email@hidden:
>
Never try to paste anything when you're in a coma, is my advice.
>
Mr Tea
I appreciate that. Not enough coffee equates to comatose reasoning. :-)
Forgive me please.
The script did compile. But it's results are quite problematic. I saved
it as an AS App. Launching it as a stand alone, works the first time
through if I choose the defaults, but won't quit when it's over. After
Apple - period it will stop, but running it again produces no results at
all, and another non quit.
I appreciate the suggestions that have taken me this far. Is there an
idea of something that I am missing?
I have:
---------------------
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
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
---------------------
I also ran it successfully with my own numbers and it (sometimes)
returned inconsistent results. I think temp 32 and wind 15 gave 2.xxx
once, that can't be correct? I am going out for appointments and won't
check back until much later so take your time.
Thanks.
Dave Groover
_______________________________________________
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.