I don't use the NOAA plugin, just the original NOAA script, but I just have variables
setup that correspond and adapt to whatever the Weather_Condition variable
changes to and using the attached script force it to match my image files.
- Code: Select all
tell application "IndigoServer"
set theText to value of variable "Weather_Condition"
if theText contains "Overcast" then
set the value of variable "Weather_Condition" to "Overcast"
else if theText contains "Rain" and theText contains "Light" then
set the value of variable "Weather_Condition" to "Rain_Light"
else if theText contains "Rain" and theText contains "Freezing" then
set the value of variable "Weather_Condition" to "Sleet"
else if theText contains "Rain" then
set the value of variable "Weather_Condition" to "Rain"
else if theText contains "Scattered" and theText contains "Showers" then
set the value of variable "Weather_Condition" to "Scattered_Showers"
else if theText contains "Sleet" then
set the value of variable "Weather_Condition" to "Sleet"
else if theText contains "Snow" and theText contains "Blowing" then
set the value of variable "Weather_Condition" to "Snow_Blowing"
else if theText contains "Snow" and theText contains "Fog" then
set the value of variable "Weather_Condition" to "Snow_Fog"
else if theText contains "Snow" then
set the value of variable "Weather_Condition" to "Snow"
else if theText contains "Stormy" then
set the value of variable "Weather_Condition" to "Stormy"
else if theText contains "Thunderstorms" then
set the value of variable "Weather_Condition" to "Stormy"
else if theText contains "Thunderstorm" then
set the value of variable "Weather_Condition" to "Stormy"
else if theText contains "Hail" then
set the value of variable "Weather_Condition" to "Hail"
else if theText contains "Unknown Precip" then
set the value of variable "Weather_Condition" to "Overcast"
else if theText contains "Squalls" then
set the value of variable "Weather_Condition" to "Rain"
end if
end tell
I have a few variations of the script that will run depending on the time of day. For instance
the transition from day to night would change the variable from "Fair" to "Moon_Fair",
or whatever the daytime variable was, to switch the image from a sun to a moon version.
Hope this helps. I see some issues on the original files I posted I didn't notice before...mainly
the "nubs" on the moon images. I'll fix these and repost them.
Carl