- Code: Select all
tell application "IndigoServer"
set theText to value of variable "WUForecast"
set swapOut to "Snow Showers" as string
set swapIn to "Snow" as string
if the theText contains the swapOut then
set AppleScript's text item delimiters to the swapOut
set the text_item_list to every text item of theText
set AppleScript's text item delimiters to the swapIn
set the theText to the text_item_list as string
set AppleScript's text item delimiters to ""
end if
set the value of variable "WUForecast" to theText
end tell
Thanks,
Carl