Again I am here with new quarry! Last time “Jilm” solved my problem.
I like to add Auto Detect Location and put latitude, longitude in Dark Sky API. This is a desktop client for casparCG.
My Button code is below:
Code: Select all
on mouseUp
put the text of fld "city" into tCityName
put the text of fld "country" into tCountry
put "?units=si" into si
put "[https]://api.darksky.[net]/forecast/f75094a5a6e929acb6e7274f363dadab/23.727785,90.413495"&si into tURL
put URL tURL into tRawJSON
put textDecode(tRawJSON,"UTF8") into fld "weatherdata"
put arrayFromJson(tRawJSON) into tArray
put tArray["currently"]["summary"] into fld "Status"
put tArray["currently"]["temperature"] into fld "Temp"
put tArray["currently"]["apparentTemperature"] into fld "RealFeels"
put tArray["currently"]["windSpeed"] into fld "WindSpeed"
put tArray["currently"]["humidity"] into fld "Humidity"
end mouseUp
Please advice..