Re: Wind Chill (corrected & full)
Re: Wind Chill (corrected & full)
- Subject: Re: Wind Chill (corrected & full)
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 01 Mar 2002 09:35:13 -0800
I'm sorry to have to be a bit rough here. There were about 7 responses to
the original question. All except the one you're trying to use here (the one
submitted by "PPCGod") were equivalent to each other, and correct. The one
submitted by PPCGod had several errors, and that's why it's not working
right for you. Just use one of the others. (For a start, always be
suspicious of scripts that put everything into a Finder tell block when it's
not necessary.)
--
Paul Berkowitz
>
From: David Groover <email@hidden>
>
Date: Fri, 1 Mar 2002 09:24:45 -0500
>
To: "AppleScript Users" <email@hidden>
>
Subject: RE: Wind Chill (corrected & full)
>
>
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.
_______________________________________________
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.