Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Current temperature
#1
This macro will display the current temperature based on zipcode (US only).
Code:
Copy      Help
str Src Message zipcode url
zipcode="29455" ;;enter your zipcode here
ARRAY(str) Temp FeelsLike
url.from("http://www.weather.com/weather/local/" zipcode "?lswe=" zipcode "&lwsa=WeatherLocalUndeclared&from=whatwhere")
int MatchSucess

IntGetFile
if findrx(Src "<B CLASS=obsTempTextA>([\d]{1,3})" 0 0 Temp) ;;([\d]{1,3}+)
,if findrx(Src "<B CLASS=obsTextA>Feels Like<BR> ([\d]{1,3})" 0 0 FeelsLike)
,,Message.from("Temperature: " Temp[1] "F" "[]Feels Like: " FeelsLike[1] "F")
,,mes(Message "Current Temperature" "isa")
Matt B


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)