Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var url = 'http://api.wunderground.com/api/api_key/conditions/forecast10day/astronomy/lang:HU/q/'+(global('%LOCN'))+'.json';
- var http = new XMLHttpRequest();
- http.open("GET", url, false);
- http.send();
- if(http.status == 200) {
- Weather = JSON.parse(http.responseText);
- Srise = Weather.sun_phase.sunrise.hour; if (Srise != "") {
- Sunrise1 = Weather.sun_phase.sunrise.hour+'.'+Weather.sun_phase.sunrise.minute;
- Sunrise2 = Weather.sun_phase.sunrise.hour+':'+Weather.sun_phase.sunrise.minute;
- setGlobal('%Sunrise1',Sunrise1);
- setGlobal('%Sunrise2',Sunrise2); }
- Sset = Weather.sun_phase.sunset.hour; if (Sset != "") {
- Sunset1 = Weather.sun_phase.sunset.hour+'.'+Weather.sun_phase.sunset.minute;
- Sunset2 = Weather.sun_phase.sunset.hour+':'+Weather.sun_phase.sunset.minute;
- setGlobal('%Sunset1',Sunset1);
- setGlobal('%Sunset2',Sunset2); }
- Sunicon = 'file:///sdcard/Tasker/temp/icon/1.png';
- setGlobal('%Sunicon',Sunicon);
- Background = 'file:///sdcard/Tasker/temp/background/background.png';
- setGlobal('%Background',Background);
- var icontxtLookup = {
- 'http://icons.wxug.com/i/c/k/clear.gif': 'a',
- 'http://icons.wxug.com/i/c/k/sunny.gif': 'a',
- 'http://icons.wxug.com/i/c/k/nt_clear.gif': 'e',
- 'http://icons.wxug.com/i/c/k/nt_sunny.gif': 'e',
- 'http://icons.wxug.com/i/c/k/partlycloudy.gif': 'd',
- 'http://icons.wxug.com/i/c/k/partlysunny.gif': 'd',
- 'http://icons.wxug.com/i/c/k/mostlycloudy.gif': 'd',
- 'http://icons.wxug.com/i/c/k/mostlysunny.gif': 'd',
- 'http://icons.wxug.com/i/c/k/nt_partlycloudy.gif': 'f',
- 'http://icons.wxug.com/i/c/k/nt_partlysunny.gif': 'f',
- 'http://icons.wxug.com/i/c/k/nt_mostlycloudy.gif': 'f',
- 'http://icons.wxug.com/i/c/k/nt_mostlysunny.gif': 'f',
- 'http://icons.wxug.com/i/c/k/cloudy.gif': 'b',
- 'http://icons.wxug.com/i/c/k/nt_cloudy.gif': 'b',
- 'http://icons.wxug.com/i/c/k/fog.gif': 'c',
- 'http://icons.wxug.com/i/c/k/hazy.gif': 'c',
- 'http://icons.wxug.com/i/c/k/nt_fog.gif': 'c',
- 'http://icons.wxug.com/i/c/k/nt_hazy.gif': 'c',
- 'http://icons.wxug.com/i/c/k/chancesleet.gif': 'h',
- 'http://icons.wxug.com/i/c/k/sleet.gif': 'h',
- 'http://icons.wxug.com/i/c/k/nt_chancesleet.gif': 'h',
- 'http://icons.wxug.com/i/c/k/nt_sleet.gif': 'h',
- 'http://icons.wxug.com/i/c/k/chancerain.gif': 'g',
- 'http://icons.wxug.com/i/c/k/rain.gif': 'g',
- 'http://icons.wxug.com/i/c/k/nt_chancerain.gif': 'g',
- 'http://icons.wxug.com/i/c/k/nt_rain.gif': 'g',
- 'http://icons.wxug.com/i/c/k/chancetstorms.gif': 'j',
- 'http://icons.wxug.com/i/c/k/tstorms.gif': 'j',
- 'http://icons.wxug.com/i/c/k/nt_chancetstorms.gif': 'j',
- 'http://icons.wxug.com/i/c/k/nt_tstorms.gif': 'j',
- 'http://icons.wxug.com/i/c/k/chanceflurries.gif': 'i',
- 'http://icons.wxug.com/i/c/k/chancesnow.gif': 'i',
- 'http://icons.wxug.com/i/c/k/flurries.gif': 'i',
- 'http://icons.wxug.com/i/c/k/snow.gif': 'i',
- 'http://icons.wxug.com/i/c/k/nt_chanceflurries.gif': 'i',
- 'http://icons.wxug.com/i/c/k/nt_chancesnow.gif': 'i',
- 'http://icons.wxug.com/i/c/k/nt_flurries.gif': 'i',
- 'http://icons.wxug.com/i/c/k/nt_snow.gif': 'i',
- 'http://icons.wxug.com/i/c/k/unknown.gif': ' ',
- 'http://icons.wxug.com/i/c/k/nt_unknown.gif': ' ',
- '': ' ',
- };
- var iconLookup = {
- 'http://icons.wxug.com/i/c/k/clear.gif': 'file:///sdcard/Tasker/temp/icon/1.png',
- 'http://icons.wxug.com/i/c/k/sunny.gif': 'file:///sdcard/Tasker/temp/icon/1.png',
- 'http://icons.wxug.com/i/c/k/nt_clear.gif': 'file:///sdcard/Tasker/temp/icon/2.png',
- 'http://icons.wxug.com/i/c/k/nt_sunny.gif': 'file:///sdcard/Tasker/temp/icon/2.png',
- 'http://icons.wxug.com/i/c/k/partlycloudy.gif': 'file:///sdcard/Tasker/temp/icon/4.png',
- 'http://icons.wxug.com/i/c/k/partlysunny.gif': 'file:///sdcard/Tasker/temp/icon/4.png',
- 'http://icons.wxug.com/i/c/k/mostlycloudy.gif': 'file:///sdcard/Tasker/temp/icon/4.png',
- 'http://icons.wxug.com/i/c/k/mostlysunny.gif': 'file:///sdcard/Tasker/temp/icon/4.png',
- 'http://icons.wxug.com/i/c/k/nt_partlycloudy.gif': 'file:///sdcard/Tasker/temp/icon/5.png',
- 'http://icons.wxug.com/i/c/k/nt_partlysunny.gif': 'file:///sdcard/Tasker/temp/icon/5.png',
- 'http://icons.wxug.com/i/c/k/nt_mostlycloudy.gif': 'file:///sdcard/Tasker/temp/icon/5.png',
- 'http://icons.wxug.com/i/c/k/nt_mostlysunny.gif': 'file:///sdcard/Tasker/temp/icon/5.png',
- 'http://icons.wxug.com/i/c/k/cloudy.gif': 'file:///sdcard/Tasker/temp/icon/3.png',
- 'http://icons.wxug.com/i/c/k/nt_cloudy.gif': 'file:///sdcard/Tasker/temp/icon/3.png',
- 'http://icons.wxug.com/i/c/k/fog.gif': 'file:///sdcard/Tasker/temp/icon/6.png',
- 'http://icons.wxug.com/i/c/k/hazy.gif': 'file:///sdcard/Tasker/temp/icon/6.png',
- 'http://icons.wxug.com/i/c/k/nt_fog.gif': 'file:///sdcard/Tasker/temp/icon/6.png',
- 'http://icons.wxug.com/i/c/k/nt_hazy.gif': 'file:///sdcard/Tasker/temp/icon/6.png',
- 'http://icons.wxug.com/i/c/k/chancesleet.gif': 'file:///sdcard/Tasker/temp/icon/7.png',
- 'http://icons.wxug.com/i/c/k/sleet.gif': 'file:///sdcard/Tasker/temp/icon/7.png',
- 'http://icons.wxug.com/i/c/k/nt_chancesleet.gif': 'file:///sdcard/Tasker/temp/icon/7.png',
- 'http://icons.wxug.com/i/c/k/nt_sleet.gif': 'file:///sdcard/Tasker/temp/icon/7.png',
- 'http://icons.wxug.com/i/c/k/chancerain.gif': 'file:///sdcard/Tasker/temp/icon/8.png',
- 'http://icons.wxug.com/i/c/k/rain.gif': 'file:///sdcard/Tasker/temp/icon/8.png',
- 'http://icons.wxug.com/i/c/k/nt_chancerain.gif': 'file:///sdcard/Tasker/temp/icon/8.png',
- 'http://icons.wxug.com/i/c/k/nt_rain.gif': 'file:///sdcard/Tasker/temp/icon/8.png',
- 'http://icons.wxug.com/i/c/k/chancetstorms.gif': 'file:///sdcard/Tasker/temp/icon/9.png',
- 'http://icons.wxug.com/i/c/k/tstorms.gif': 'file:///sdcard/Tasker/temp/icon/9.png',
- 'http://icons.wxug.com/i/c/k/nt_chancetstorms.gif': 'file:///sdcard/Tasker/temp/icon/9.png',
- 'http://icons.wxug.com/i/c/k/nt_tstorms.gif': 'file:///sdcard/Tasker/temp/icon/9.png',
- 'http://icons.wxug.com/i/c/k/chanceflurries.gif': 'file:///sdcard/Tasker/temp/icon/10.png',
- 'http://icons.wxug.com/i/c/k/chancesnow.gif': 'file:///sdcard/Tasker/temp/icon/10.png',
- 'http://icons.wxug.com/i/c/k/flurries.gif': 'file:///sdcard/Tasker/temp/icon/10.png',
- 'http://icons.wxug.com/i/c/k/snow.gif': 'file:///sdcard/Tasker/temp/icon/10.png',
- 'http://icons.wxug.com/i/c/k/nt_chanceflurries.gif': 'file:///sdcard/Tasker/temp/icon/10.png',
- 'http://icons.wxug.com/i/c/k/nt_chancesnow.gif': 'file:///sdcard/Tasker/temp/icon/10.png',
- 'http://icons.wxug.com/i/c/k/nt_flurries.gif': 'file:///sdcard/Tasker/temp/icon/10.png',
- 'http://icons.wxug.com/i/c/k/nt_snow.gif': 'file:///sdcard/Tasker/temp/icon/10.png',
- 'http://icons.wxug.com/i/c/k/unknown.gif': 'file:///sdcard/Tasker/temp/icon/11.png',
- 'http://icons.wxug.com/i/c/k/nt_unknown.gif': 'file:///sdcard/Tasker/temp/icon/11.png',
- '': 'file:///sdcard/Tasker/temp/icon/11.png',
- };
- var windDirectionLookup = {
- 'északi': 'É',
- 'déli': 'D',
- 'keleti': 'K',
- 'nyugati': 'Ny',
- 'északkeleti': 'ÉK',
- 'északnyugati': 'ÉNy',
- 'délkeleti': 'DK',
- 'délnyugati': 'DNy',
- 'észak-északkeleti': 'ÉÉK',
- 'észak-északnyugati': 'ÉÉNy',
- 'dél-délkeleti': 'DDK',
- 'dél-délnyugati': 'DDNy',
- 'kelet-északkeleti': 'KÉK',
- 'kelet-délkeleti': 'KDK',
- 'nyugat-északnyugati': 'NyÉNy',
- 'nyugat-délnyugati': 'NyDNy',
- };
- Location1 = Weather.current_observation.display_location.city; if (Location1 == "") {
- setGlobal('%Location1'," "); } if (Location1 != "") { setGlobal('%Location1',Location1); }
- Location2 = Weather.current_observation.display_location.country; if (Location2 == "") {
- setGlobal('%Location2'," "); } if (Location2 != "") { setGlobal('%Location2',Location2); }
- Currentweather = Weather.current_observation.weather; if (Currentweather == "") {
- setGlobal('%Currentweather'," "); } if (Currentweather != "") {
- Currentweather2 = convert( Currentweather, 'htmlToText');
- setGlobal('%Currentweather',Currentweather2); }
- Currenttemp = Weather.current_observation.temp_c; if (Currenttemp == null) {
- setGlobal('%Currenttemp',"-"); } if (Currenttemp != null) {
- Currenttemp2 = Currenttemp.toFixed(0);
- setGlobal('%Currenttemp',Currenttemp2); }
- Currentwind = Weather.current_observation.wind_dir; if (Currentwind == "") {
- setGlobal('%Currentwind',"-"); } if (Currentwind != "") {
- setGlobal('%Currentwind',windDirectionLookup[Currentwind] || '-'); }
- Currentwindspeed = Weather.current_observation.wind_kph; if (Currentwindspeed == null) {
- setGlobal('%Currentwindspeed',"0 km/h"); } if (Currentwindspeed != null) {
- setGlobal('%Currentwindspeed',Currentwindspeed+' km/h'); }
- Currentwindgust = Weather.current_observation.wind_gust_kph; if (Currentwindgust == null) {
- setGlobal('%Currentwindgust',"0 km/h"); } if (Currentwindgust != null) {
- setGlobal('%Currentwindgust',Currentwindgust+' km/h'); }
- Currenticon = Weather.current_observation.icon_url;
- setGlobal('%Currenticontxt',icontxtLookup[Currenticon] || ' ');
- setGlobal('%Currenticon1',iconLookup[Currenticon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Currenthumidity = Weather.current_observation.relative_humidity; if (Currenthumidity == "") {
- setGlobal('%Currenthumidity',"-%"); } if (Currenthumidity != "") {
- setGlobal('%Currenthumidity',Currenthumidity); }
- setGlobal('%Forecast1ms',Weather.forecast.simpleforecast.forecastday[0].date.monthname_short);
- setGlobal('%Forecast1dy',Weather.forecast.simpleforecast.forecastday[0].date.day);
- setGlobal('%Forecast1d',Weather.forecast.simpleforecast.forecastday[0].date.weekday);
- setGlobal('%Forecast1ds',Weather.forecast.simpleforecast.forecastday[0].date.weekday_short);
- Forecast1w = Weather.forecast.simpleforecast.forecastday[0].conditions; if (Forecast1w == "") {
- setGlobal('%Forecast1w'," "); } if (Forecast1w != "") {
- Forecast1w2 = convert( Forecast1w, 'htmlToText');
- setGlobal('%Forecast1w',Forecast1w2); }
- Forecast1h = Weather.forecast.simpleforecast.forecastday[0].high.celsius; if (Forecast1h == null) {
- setGlobal('%Forecast1h',"-"); } if (Forecast1h != null) {
- setGlobal('%Forecast1h',Forecast1h); }
- Forecast1l = Weather.forecast.simpleforecast.forecastday[0].low.celsius; if (Forecast1l == null) {
- setGlobal('%Forecast1l',"-"); } if (Forecast1l != null) {
- setGlobal('%Forecast1l',Forecast1l); }
- Forecast1qd = Weather.forecast.simpleforecast.forecastday[0].qpf_day.mm; if (Forecast1qd == null) {
- setGlobal('%Forecast1qd',"0 mm"); } if (Forecast1qd != null) {
- setGlobal('%Forecast1qd',Forecast1qd+' mm'); }
- Forecast1qn = Weather.forecast.simpleforecast.forecastday[0].qpf_night.mm; if (Forecast1qn == null) {
- setGlobal('%Forecast1qn',"0 mm"); } if (Forecast1qn != null) {
- setGlobal('%Forecast1qn',Forecast1qn+' mm'); }
- Forecast1sd = Weather.forecast.simpleforecast.forecastday[0].snow_day.cm; if (Forecast1sd == null) {
- setGlobal('%Forecast1sd',"0 cm"); } if (Forecast1sd != null) {
- setGlobal('%Forecast1sd',Forecast1sd+' cm'); }
- Forecast1sn = Weather.forecast.simpleforecast.forecastday[0].snow_night.cm; if (Forecast1sn == null)
- { setGlobal('%Forecast1sn',"0 cm"); } if (Forecast1sn != null) {
- setGlobal('%Forecast1sn',Forecast1sn+' cm'); }
- Forecast1icon = Weather.forecast.simpleforecast.forecastday[0].icon_url;
- setGlobal('%Forecast1icontxt',icontxtLookup[Forecast1icon] || ' ');
- setGlobal('%Forecast1icon1',iconLookup[Forecast1icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast1hm = Weather.forecast.simpleforecast.forecastday[0].avehumidity; if (Forecast1hm == null) {
- setGlobal('%Forecast1hm',"0%"); } if (Forecast1hm != null) {
- setGlobal('%Forecast1hm',Forecast1hm+'%'); }
- Forecast1td = Weather.forecast.txt_forecast.forecastday[0].fcttext_metric;
- Forecast1td2 = Forecast1td; if (Forecast1td2.indexOf('legmagasabb') === -1) {
- setGlobal('%Forecast1td1'," ");
- }
- else { setGlobal('%Forecast1td1',Forecast1td2);
- }
- Forecast1td3 = Forecast1td.replace('°C', ' fok');
- Forecast1td32 = Forecast1td3; if (Forecast1td32.indexOf('legmagasabb') === -1) {
- setGlobal('%Forecast1td2'," ");
- }
- else { setGlobal('%Forecast1td2',Forecast1td32);
- }
- Forecast1tn = Weather.forecast.txt_forecast.forecastday[1].fcttext_metric; if (Forecast1tn == "") {
- setGlobal('%Forecast1tn1'," ");
- setGlobal('%Forecast1tn2'," "); } if (Forecast1tn != "") {
- Forecast1tn2 = Forecast1tn;
- Forecast1tn3 = Forecast1tn2.replace('°C', ' fok');
- setGlobal('%Forecast1tn1',Forecast1tn2);
- setGlobal('%Forecast1tn2',Forecast1tn3); }
- setGlobal('%Forecast2ms',Weather.forecast.simpleforecast.forecastday[1].date.monthname_short);
- setGlobal('%Forecast2dy',Weather.forecast.simpleforecast.forecastday[1].date.day);
- setGlobal('%Forecast2d',Weather.forecast.simpleforecast.forecastday[1].date.weekday);
- setGlobal('%Forecast2ds',Weather.forecast.simpleforecast.forecastday[1].date.weekday_short);
- Forecast2w = Weather.forecast.simpleforecast.forecastday[1].conditions; if (Forecast2w == "") {
- setGlobal('%Forecast2w'," "); } if (Forecast2w != "") {
- Forecast2w2 = convert( Forecast2w, 'htmlToText');
- setGlobal('%Forecast2w',Forecast2w2); }
- Forecast2h = Weather.forecast.simpleforecast.forecastday[1].high.celsius; if (Forecast2h == null) {
- setGlobal('%Forecast2h',"-"); } if (Forecast2h != null) {
- setGlobal('%Forecast2h',Forecast2h); }
- Forecast2l = Weather.forecast.simpleforecast.forecastday[1].low.celsius; if (Forecast2l == null) {
- setGlobal('%Forecast2l',"-"); } if (Forecast2l != null) {
- setGlobal('%Forecast2l',Forecast2l); }
- Forecast2qd = Weather.forecast.simpleforecast.forecastday[1].qpf_day.mm; if (Forecast2qd == null) {
- setGlobal('%Forecast2qd',"0 mm"); } if (Forecast2qd != null) {
- setGlobal('%Forecast2qd',Forecast2qd+' mm'); }
- Forecast2qn = Weather.forecast.simpleforecast.forecastday[1].qpf_night.mm; if (Forecast2qn == null) {
- setGlobal('%Forecast2qn',"0 mm"); } if (Forecast2qn != null) {
- setGlobal('%Forecast2qn',Forecast2qn+' mm'); }
- Forecast2sd = Weather.forecast.simpleforecast.forecastday[1].snow_day.cm; if (Forecast2sd == null) {
- setGlobal('%Forecast2sd',"0 cm"); } if (Forecast2sd != null) {
- setGlobal('%Forecast2sd',Forecast2sd+' cm'); }
- Forecast2sn = Weather.forecast.simpleforecast.forecastday[1].snow_night.cm; if (Forecast2sn == null)
- { setGlobal('%Forecast2sn',"0 cm"); } if (Forecast2sn != null) {
- setGlobal('%Forecast2sn',Forecast2sn+' cm'); }
- Forecast2icon = Weather.forecast.simpleforecast.forecastday[1].icon_url;
- setGlobal('%Forecast2icontxt',icontxtLookup[Forecast2icon] || ' ');
- setGlobal('%Forecast2icon1',iconLookup[Forecast2icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast2hm = Weather.forecast.simpleforecast.forecastday[1].avehumidity; if (Forecast2hm == null) {
- setGlobal('%Forecast2hm',"0%"); } if (Forecast2hm != null) {
- setGlobal('%Forecast2hm',Forecast2hm+'%'); }
- Forecast2td = Weather.forecast.txt_forecast.forecastday[2].fcttext_metric; if (Forecast2td == "") {
- setGlobal('%Forecast2td1'," ");
- setGlobal('%Forecast2td2'," "); } if (Forecast2td != "") {
- Forecast2td2 = Forecast2td;
- setGlobal('%Forecast2td1',Forecast2td2);
- Forecast2td3 = Forecast2td2.replace('°C', ' fok');
- setGlobal('%Forecast2td2',Forecast2td3); }
- Forecast2tn = Weather.forecast.txt_forecast.forecastday[3].fcttext_metric; if (Forecast2tn == "") {
- setGlobal('%Forecast2tn1'," ");
- setGlobal('%Forecast2tn2'," "); } if (Forecast2tn != "") {
- Forecast2tn2 = Forecast2tn;
- setGlobal('%Forecast2tn1',Forecast2tn2);
- Forecast2tn3 = Forecast2tn2.replace('°C', ' fok');
- setGlobal('%Forecast2tn2',Forecast2tn3); }
- setGlobal('%Forecast3ms',Weather.forecast.simpleforecast.forecastday[2].date.monthname_short);
- setGlobal('%Forecast3dy',Weather.forecast.simpleforecast.forecastday[2].date.day);
- setGlobal('%Forecast3d',Weather.forecast.simpleforecast.forecastday[2].date.weekday);
- setGlobal('%Forecast3ds',Weather.forecast.simpleforecast.forecastday[2].date.weekday_short);
- Forecast3w = Weather.forecast.simpleforecast.forecastday[2].conditions; if (Forecast3w == "") {
- setGlobal('%Forecast3w'," "); } if (Forecast3w != "") {
- Forecast3w2 = convert( Forecast3w, 'htmlToText');
- setGlobal('%Forecast3w',Forecast3w2); }
- Forecast3h = Weather.forecast.simpleforecast.forecastday[2].high.celsius; if (Forecast3h == null) {
- setGlobal('%Forecast3h',"-"); } if (Forecast3h != null) {
- setGlobal('%Forecast3h',Forecast3h); }
- Forecast3l = Weather.forecast.simpleforecast.forecastday[2].low.celsius; if (Forecast3l == null) {
- setGlobal('%Forecast3l',"-"); } if (Forecast3l != null) {
- setGlobal('%Forecast3l',Forecast3l); }
- Forecast3qd = Weather.forecast.simpleforecast.forecastday[2].qpf_day.mm; if (Forecast3qd == null) {
- setGlobal('%Forecast3qd',"0 mm"); } if (Forecast3qd != null) {
- setGlobal('%Forecast3qd',Forecast3qd+' mm'); }
- Forecast3qn = Weather.forecast.simpleforecast.forecastday[2].qpf_night.mm; if (Forecast3qn == null) {
- setGlobal('%Forecast3qn',"0 mm"); } if (Forecast3qn != null) {
- setGlobal('%Forecast3qn',Forecast3qn+' mm'); }
- Forecast3sd = Weather.forecast.simpleforecast.forecastday[2].snow_day.cm; if (Forecast3sd == null) {
- setGlobal('%Forecast3sd',"0 cm"); } if (Forecast3sd != null) {
- setGlobal('%Forecast3sd',Forecast3sd+' cm'); }
- Forecast3sn = Weather.forecast.simpleforecast.forecastday[2].snow_night.cm; if (Forecast3sn == null)
- { setGlobal('%Forecast3sn',"0 cm"); } if (Forecast3sn != null) {
- setGlobal('%Forecast3sn',Forecast3sn+' cm'); }
- Forecast3icon = Weather.forecast.simpleforecast.forecastday[2].icon_url;
- setGlobal('%Forecast3icontxt',icontxtLookup[Forecast3icon] || ' ');
- setGlobal('%Forecast3icon1',iconLookup[Forecast3icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast3hm = Weather.forecast.simpleforecast.forecastday[2].avehumidity; if (Forecast3hm == null) {
- setGlobal('%Forecast3hm',"0%"); } if (Forecast3hm != null) {
- setGlobal('%Forecast3hm',Forecast3hm+'%'); }
- Forecast3td = Weather.forecast.txt_forecast.forecastday[4].fcttext_metric; if (Forecast3td == "") {
- setGlobal('%Forecast3td1'," ");
- setGlobal('%Forecast3td2'," "); } if (Forecast3td != "") {
- Forecast3td2 = Forecast3td;
- setGlobal('%Forecast3td1',Forecast3td2);
- Forecast3td3 = Forecast3td2.replace('°C', ' fok');
- setGlobal('%Forecast3td2',Forecast3td3); }
- Forecast3tn = Weather.forecast.txt_forecast.forecastday[5].fcttext_metric; if (Forecast3tn == "") {
- setGlobal('%Forecast3tn1'," ");
- setGlobal('%Forecast3tn2'," "); } if (Forecast3tn != "") {
- Forecast3tn2 = Forecast3tn;
- setGlobal('%Forecast3tn1',Forecast3tn2);
- Forecast3tn3 = Forecast3tn2.replace('°C', ' fok');
- setGlobal('%Forecast3tn2',Forecast3tn3); }
- setGlobal('%Forecast4ms',Weather.forecast.simpleforecast.forecastday[3].date.monthname_short);
- setGlobal('%Forecast4dy',Weather.forecast.simpleforecast.forecastday[3].date.day);
- setGlobal('%Forecast4d',Weather.forecast.simpleforecast.forecastday[3].date.weekday);
- setGlobal('%Forecast4ds',Weather.forecast.simpleforecast.forecastday[3].date.weekday_short);
- Forecast4w = Weather.forecast.simpleforecast.forecastday[3].conditions; if (Forecast4w == "") {
- setGlobal('%Forecast4w'," "); } if (Forecast4w != "") {
- Forecast4w2 = convert( Forecast4w, 'htmlToText');
- setGlobal('%Forecast4w',Forecast4w2); }
- Forecast4h = Weather.forecast.simpleforecast.forecastday[3].high.celsius; if (Forecast4h == null) {
- setGlobal('%Forecast4h',"-"); } if (Forecast4h != null) {
- setGlobal('%Forecast4h',Forecast4h); }
- Forecast4l = Weather.forecast.simpleforecast.forecastday[3].low.celsius; if (Forecast4l == null) {
- setGlobal('%Forecast4l',"-"); } if (Forecast4l != null) {
- setGlobal('%Forecast4l',Forecast4l); }
- Forecast4qd = Weather.forecast.simpleforecast.forecastday[3].qpf_day.mm; if (Forecast4qd == null) {
- setGlobal('%Forecast4qd',"0 mm"); } if (Forecast4qd != null) {
- setGlobal('%Forecast4qd',Forecast4qd+' mm'); }
- Forecast4qn = Weather.forecast.simpleforecast.forecastday[3].qpf_night.mm; if (Forecast4qn == null) {
- setGlobal('%Forecast4qn',"0 mm"); } if (Forecast4qn != null) {
- setGlobal('%Forecast4qn',Forecast4qn+' mm'); }
- Forecast4sd = Weather.forecast.simpleforecast.forecastday[3].snow_day.cm; if (Forecast4sd == null) {
- setGlobal('%Forecast4sd',"0 cm"); } if (Forecast4sd != null) {
- setGlobal('%Forecast4sd',Forecast4sd+' cm'); }
- Forecast4sn = Weather.forecast.simpleforecast.forecastday[3].snow_night.cm; if (Forecast4sn == null)
- { setGlobal('%Forecast4sn',"0 cm"); } if (Forecast4sn != null) {
- setGlobal('%Forecast4sn',Forecast4sn+' cm'); }
- Forecast4icon = Weather.forecast.simpleforecast.forecastday[3].icon_url;
- setGlobal('%Forecast4icontxt',icontxtLookup[Forecast4icon] || ' ');
- setGlobal('%Forecast4icon1',iconLookup[Forecast4icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast4hm = Weather.forecast.simpleforecast.forecastday[3].avehumidity; if (Forecast4hm == null) {
- setGlobal('%Forecast4hm',"0%"); } if (Forecast4hm != null) {
- setGlobal('%Forecast4hm',Forecast4hm+'%'); }
- Forecast4td = Weather.forecast.txt_forecast.forecastday[6].fcttext_metric; if (Forecast4td == "") {
- setGlobal('%Forecast4td1'," ");
- setGlobal('%Forecast4td2'," "); } if (Forecast4td != "") {
- Forecast4td2 = Forecast4td;
- setGlobal('%Forecast4td1',Forecast4td2);
- Forecast4td3 = Forecast4td2.replace('°C', ' fok');
- setGlobal('%Forecast4td2',Forecast4td3); }
- Forecast4tn = Weather.forecast.txt_forecast.forecastday[7].fcttext_metric; if (Forecast4tn == "") {
- setGlobal('%Forecast4tn1'," ");
- setGlobal('%Forecast4tn2'," "); } if (Forecast4tn != "") {
- Forecast4tn2 = Forecast4tn;
- setGlobal('%Forecast4tn1',Forecast4tn2);
- Forecast4tn3 = Forecast4tn2.replace('°C', ' fok');
- setGlobal('%Forecast4tn2',Forecast4tn3); }
- setGlobal('%Forecast5ms',Weather.forecast.simpleforecast.forecastday[4].date.monthname_short);
- setGlobal('%Forecast5dy',Weather.forecast.simpleforecast.forecastday[4].date.day);
- setGlobal('%Forecast5d',Weather.forecast.simpleforecast.forecastday[4].date.weekday);
- setGlobal('%Forecast5ds',Weather.forecast.simpleforecast.forecastday[4].date.weekday_short);
- Forecast5w = Weather.forecast.simpleforecast.forecastday[4].conditions; if (Forecast5w == "") {
- setGlobal('%Forecast5w'," "); } if (Forecast5w != "") {
- Forecast5w2 = convert( Forecast5w, 'htmlToText');
- setGlobal('%Forecast5w',Forecast5w2); }
- Forecast5h = Weather.forecast.simpleforecast.forecastday[4].high.celsius; if (Forecast5h == null) {
- setGlobal('%Forecast5h',"-"); } if (Forecast5h != null) {
- setGlobal('%Forecast5h',Forecast5h); }
- Forecast5l = Weather.forecast.simpleforecast.forecastday[4].low.celsius; if (Forecast5l == null) {
- setGlobal('%Forecast5l',"-"); } if (Forecast5l != null) {
- setGlobal('%Forecast5l',Forecast5l); }
- Forecast5qd = Weather.forecast.simpleforecast.forecastday[4].qpf_day.mm; if (Forecast5qd == null) {
- setGlobal('%Forecast5qd',"0 mm"); } if (Forecast5qd != null) {
- setGlobal('%Forecast5qd',Forecast5qd+' mm'); }
- Forecast5qn = Weather.forecast.simpleforecast.forecastday[4].qpf_night.mm; if (Forecast5qn == null) {
- setGlobal('%Forecast5qn',"0 mm"); } if (Forecast5qn != null) {
- setGlobal('%Forecast5qn',Forecast5qn+' mm'); }
- Forecast5sd = Weather.forecast.simpleforecast.forecastday[4].snow_day.cm; if (Forecast5sd == null) {
- setGlobal('%Forecast5sd',"0 cm"); } if (Forecast5sd != null) {
- setGlobal('%Forecast5sd',Forecast5sd+' cm'); }
- Forecast5sn = Weather.forecast.simpleforecast.forecastday[4].snow_night.cm; if (Forecast5sn == null)
- { setGlobal('%Forecast5sn',"0 cm"); } if (Forecast5sn != null) {
- setGlobal('%Forecast5sn',Forecast5sn+' cm'); }
- Forecast5icon = Weather.forecast.simpleforecast.forecastday[4].icon_url;
- setGlobal('%Forecast5icontxt',icontxtLookup[Forecast5icon] || ' ');
- setGlobal('%Forecast5icon1',iconLookup[Forecast5icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast5hm = Weather.forecast.simpleforecast.forecastday[4].avehumidity; if (Forecast5hm == null) {
- setGlobal('%Forecast5hm',"0%"); } if (Forecast5hm != null) {
- setGlobal('%Forecast5hm',Forecast5hm+'%'); }
- Forecast5td = Weather.forecast.txt_forecast.forecastday[8].fcttext_metric; if (Forecast5td == "") {
- setGlobal('%Forecast5td1'," ");
- setGlobal('%Forecast5td2'," "); } if (Forecast5td != "") {
- Forecast5td2 = Forecast5td;
- setGlobal('%Forecast5td1',Forecast5td2);
- Forecast5td3 = Forecast5td2.replace('°C', ' fok');
- setGlobal('%Forecast5td2',Forecast5td3); }
- Forecast5tn = Weather.forecast.txt_forecast.forecastday[9].fcttext_metric; if (Forecast5tn == "") {
- setGlobal('%Forecast5tn1'," ");
- setGlobal('%Forecast5tn2'," "); } if (Forecast5tn != "") {
- Forecast5tn2 = Forecast5tn;
- setGlobal('%Forecast5tn1',Forecast5tn2);
- Forecast5tn3 = Forecast5tn2.replace('°C' , ' fok');
- setGlobal('%Forecast5tn2',Forecast5tn3); }
- setGlobal('%Forecast6ms',Weather.forecast.simpleforecast.forecastday[5].date.monthname_short);
- setGlobal('%Forecast6dy',Weather.forecast.simpleforecast.forecastday[5].date.day);
- setGlobal('%Forecast6d',Weather.forecast.simpleforecast.forecastday[5].date.weekday);
- setGlobal('%Forecast6ds',Weather.forecast.simpleforecast.forecastday[5].date.weekday_short);
- Forecast6w = Weather.forecast.simpleforecast.forecastday[5].conditions; if (Forecast6w == "") {
- setGlobal('%Forecast6w'," "); } if (Forecast6w != "") {
- Forecast6w2 = convert( Forecast6w, 'htmlToText');
- setGlobal('%Forecast6w',Forecast6w2); }
- Forecast6h = Weather.forecast.simpleforecast.forecastday[5].high.celsius; if (Forecast6h == null) {
- setGlobal('%Forecast6h',"-"); } if (Forecast6h != null) {
- setGlobal('%Forecast6h',Forecast6h); }
- Forecast6l = Weather.forecast.simpleforecast.forecastday[5].low.celsius; if (Forecast6l == null) {
- setGlobal('%Forecast6l',"-"); } if (Forecast6l != null) {
- setGlobal('%Forecast6l',Forecast6l); }
- Forecast6qd = Weather.forecast.simpleforecast.forecastday[5].qpf_day.mm; if (Forecast6qd == null) {
- setGlobal('%Forecast6qd',"0 mm"); } if (Forecast6qd != null) {
- setGlobal('%Forecast6qd',Forecast6qd+' mm'); }
- Forecast6qn = Weather.forecast.simpleforecast.forecastday[5].qpf_night.mm; if (Forecast6qn == null) {
- setGlobal('%Forecast6qn',"0 mm"); } if (Forecast6qn != null) {
- setGlobal('%Forecast6qn',Forecast6qn+' mm'); }
- Forecast6sd = Weather.forecast.simpleforecast.forecastday[5].snow_day.cm; if (Forecast6sd == null) {
- setGlobal('%Forecast6sd',"0 cm"); } if (Forecast6sd != null) {
- setGlobal('%Forecast6sd',Forecast6sd+' cm'); }
- Forecast6sn = Weather.forecast.simpleforecast.forecastday[5].snow_night.cm; if (Forecast6sn == null)
- { setGlobal('%Forecast6sn',"0 cm"); } if (Forecast6sn != null) {
- setGlobal('%Forecast6sn',Forecast6sn+' cm'); }
- Forecast6icon = Weather.forecast.simpleforecast.forecastday[5].icon_url;
- setGlobal('%Forecast6icontxt',icontxtLookup[Forecast6icon] || ' ');
- setGlobal('%Forecast6icon1',iconLookup[Forecast6icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast6hm = Weather.forecast.simpleforecast.forecastday[5].avehumidity; if (Forecast6hm == null) {
- setGlobal('%Forecast6hm',"0%"); } if (Forecast6hm != null) {
- setGlobal('%Forecast6hm',Forecast6hm+'%'); }
- Forecast6td = Weather.forecast.txt_forecast.forecastday[10].fcttext_metric; if (Forecast6td == "") {
- setGlobal('%Forecast6td1'," ");
- setGlobal('%Forecast6td2'," "); } if (Forecast6td != "") {
- Forecast6td2 = Forecast6td;
- setGlobal('%Forecast6td1',Forecast6td2);
- Forecast6td3 = Forecast6td2.replace('°C', ' fok');
- setGlobal('%Forecast6td2',Forecast6td3); }
- Forecast6tn = Weather.forecast.txt_forecast.forecastday[11].fcttext_metric; if (Forecast6tn == "") {
- setGlobal('%Forecast6tn1'," ");
- setGlobal('%Forecast6tn2'," "); } if (Forecast6tn != "") {
- Forecast6tn2 = Forecast6tn;
- setGlobal('%Forecast6tn1',Forecast6tn2);
- Forecast6tn3 = Forecast6tn2.replace('°C', ' fok');
- setGlobal('%Forecast6tn2',Forecast6tn3); }
- setGlobal('%Forecast7ms',Weather.forecast.simpleforecast.forecastday[6].date.monthname_short);
- setGlobal('%Forecast7dy',Weather.forecast.simpleforecast.forecastday[6].date.day);
- setGlobal('%Forecast7d',Weather.forecast.simpleforecast.forecastday[6].date.weekday);
- setGlobal('%Forecast7ds',Weather.forecast.simpleforecast.forecastday[6].date.weekday_short);
- Forecast7w = Weather.forecast.simpleforecast.forecastday[6].conditions; if (Forecast7w == "") {
- setGlobal('%Forecast7w'," "); } if (Forecast7w != "") {
- Forecast7w2 = convert( Forecast7w, 'htmlToText');
- setGlobal('%Forecast7w',Forecast7w2); }
- Forecast7h = Weather.forecast.simpleforecast.forecastday[6].high.celsius; if (Forecast7h == null) {
- setGlobal('%Forecast7h',"-"); } if (Forecast7h != null) {
- setGlobal('%Forecast7h',Forecast7h); }
- Forecast7l = Weather.forecast.simpleforecast.forecastday[6].low.celsius; if (Forecast7l == null) {
- setGlobal('%Forecast7l',"-"); } if (Forecast7l != null) {
- setGlobal('%Forecast7l',Forecast7l); }
- Forecast7qd = Weather.forecast.simpleforecast.forecastday[6].qpf_day.mm; if (Forecast7qd == null) {
- setGlobal('%Forecast7qd',"0 mm"); } if (Forecast7qd != null) {
- setGlobal('%Forecast7qd',Forecast7qd+' mm'); }
- Forecast7qn = Weather.forecast.simpleforecast.forecastday[6].qpf_night.mm; if (Forecast7qn == null) {
- setGlobal('%Forecast7qn',"0 mm"); } if (Forecast7qn != null) {
- setGlobal('%Forecast7qn',Forecast7qn+' mm'); }
- Forecast7sd = Weather.forecast.simpleforecast.forecastday[6].snow_day.cm; if (Forecast7sd == null) {
- setGlobal('%Forecast7sd',"0 cm"); } if (Forecast7sd != null) {
- setGlobal('%Forecast7sd',Forecast7sd+' cm'); }
- Forecast7sn = Weather.forecast.simpleforecast.forecastday[6].snow_night.cm; if (Forecast7sn == null)
- { setGlobal('%Forecast7sn',"0 cm"); } if (Forecast7sn != null) {
- setGlobal('%Forecast7sn',Forecast7sn+' cm'); }
- Forecast7icon = Weather.forecast.simpleforecast.forecastday[6].icon_url;
- setGlobal('%Forecast7icontxt',icontxtLookup[Forecast7icon] || ' ');
- setGlobal('%Forecast7icon1',iconLookup[Forecast7icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast7hm = Weather.forecast.simpleforecast.forecastday[6].avehumidity; if (Forecast7hm == null) {
- setGlobal('%Forecast7hm',"0%"); } if (Forecast7hm != null) {
- setGlobal('%Forecast7hm',Forecast7hm+'%'); }
- Forecast7td = Weather.forecast.txt_forecast.forecastday[12].fcttext_metric; if (Forecast7td == "") {
- setGlobal('%Forecast7td1'," ");
- setGlobal('%Forecast7td2'," "); } if (Forecast7td != "") {
- Forecast7td2 = Forecast7td;
- setGlobal('%Forecast7td1',Forecast7td2);
- Forecast7td3 = Forecast7td2.replace('°C', ' fok');
- setGlobal('%Forecast7td2',Forecast7td3); }
- Forecast7tn = Weather.forecast.txt_forecast.forecastday[13].fcttext_metric; if (Forecast7tn == "") {
- setGlobal('%Forecast7tn1'," ");
- setGlobal('%Forecast7tn2'," "); } if (Forecast7tn != "") {
- Forecast7tn2 = Forecast7tn;
- setGlobal('%Forecast7tn1',Forecast7tn2);
- Forecast7tn3 = Forecast7tn2.replace('°C', ' fok');
- setGlobal('%Forecast7tn2',Forecast7tn3); }
- setGlobal('%Forecast8ms',Weather.forecast.simpleforecast.forecastday[7].date.monthname_short);
- setGlobal('%Forecast8dy',Weather.forecast.simpleforecast.forecastday[7].date.day);
- setGlobal('%Forecast8d',Weather.forecast.simpleforecast.forecastday[7].date.weekday);
- setGlobal('%Forecast8ds',Weather.forecast.simpleforecast.forecastday[7].date.weekday_short);
- Forecast8w = Weather.forecast.simpleforecast.forecastday[7].conditions; if (Forecast8w == "") {
- setGlobal('%Forecast8w'," "); } if (Forecast8w != "") {
- Forecast8w2 = convert( Forecast8w, 'htmlToText');
- setGlobal('%Forecast8w',Forecast8w2); }
- Forecast8h = Weather.forecast.simpleforecast.forecastday[7].high.celsius; if (Forecast8h == null) {
- setGlobal('%Forecast8h',"-"); } if (Forecast8h != null) {
- setGlobal('%Forecast8h',Forecast8h); }
- Forecast8l = Weather.forecast.simpleforecast.forecastday[7].low.celsius; if (Forecast8l == null) {
- setGlobal('%Forecast8l',"-"); } if (Forecast8l != null) {
- setGlobal('%Forecast8l',Forecast8l); }
- Forecast8qd = Weather.forecast.simpleforecast.forecastday[7].qpf_day.mm; if (Forecast8qd == null) {
- setGlobal('%Forecast8qd',"0 mm"); } if (Forecast8qd != null) {
- setGlobal('%Forecast8qd',Forecast8qd+' mm'); }
- Forecast8qn = Weather.forecast.simpleforecast.forecastday[7].qpf_night.mm; if (Forecast8qn == null) {
- setGlobal('%Forecast8qn',"0 mm"); } if (Forecast8qn != null) {
- setGlobal('%Forecast8qn',Forecast8qn+' mm'); }
- Forecast8sd = Weather.forecast.simpleforecast.forecastday[7].snow_day.cm; if (Forecast8sd == null) {
- setGlobal('%Forecast8sd',"0 cm"); } if (Forecast8sd != null) {
- setGlobal('%Forecast8sd',Forecast8sd+' cm'); }
- Forecast8sn = Weather.forecast.simpleforecast.forecastday[7].snow_night.cm; if (Forecast8sn == null)
- { setGlobal('%Forecast8sn',"0 cm"); } if (Forecast8sn != null) {
- setGlobal('%Forecast8sn',Forecast8sn+' cm'); }
- Forecast8icon = Weather.forecast.simpleforecast.forecastday[7].icon_url;
- setGlobal('%Forecast8icontxt',icontxtLookup[Forecast8icon] || ' ');
- setGlobal('%Forecast8icon1',iconLookup[Forecast8icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast8hm = Weather.forecast.simpleforecast.forecastday[7].avehumidity; if (Forecast8hm == null) {
- setGlobal('%Forecast8hm',"0%"); } if (Forecast8hm != null) {
- setGlobal('%Forecast8hm',Forecast8hm+'%'); }
- Forecast8td = Weather.forecast.txt_forecast.forecastday[14].fcttext_metric; if (Forecast8td == "") {
- setGlobal('%Forecast8td1'," ");
- setGlobal('%Forecast8td2'," "); } if (Forecast8td != "") {
- Forecast8td2 = Forecast8td;
- setGlobal('%Forecast8td1',Forecast8td2);
- Forecast8td3 = Forecast8td2.replace('°C', ' fok');
- setGlobal('%Forecast8td2',Forecast8td3); }
- Forecast8tn = Weather.forecast.txt_forecast.forecastday[15].fcttext_metric; if (Forecast8tn == "") {
- setGlobal('%Forecast8tn1'," ");
- setGlobal('%Forecast8tn2'," "); } if (Forecast8tn != "") {
- Forecast8tn2 = Forecast8tn;
- setGlobal('%Forecast8tn1',Forecast8tn2);
- Forecast8tn3 = Forecast8tn2.replace('°C', ' fok');
- setGlobal('%Forecast8tn2',Forecast8tn3); }
- setGlobal('%Forecast9ms',Weather.forecast.simpleforecast.forecastday[8].date.monthname_short);
- setGlobal('%Forecast9dy',Weather.forecast.simpleforecast.forecastday[8].date.day);
- setGlobal('%Forecast9d',Weather.forecast.simpleforecast.forecastday[8].date.weekday);
- setGlobal('%Forecast9ds',Weather.forecast.simpleforecast.forecastday[8].date.weekday_short);
- Forecast9w = Weather.forecast.simpleforecast.forecastday[8].conditions; if (Forecast9w == "") {
- setGlobal('%Forecast9w'," "); } if (Forecast9w != "") {
- Forecast9w2 = convert( Forecast9w, 'htmlToText');
- setGlobal('%Forecast9w',Forecast9w2); }
- Forecast9h = Weather.forecast.simpleforecast.forecastday[8].high.celsius; if (Forecast9h == null) {
- setGlobal('%Forecast9h',"-"); } if (Forecast9h != null) {
- setGlobal('%Forecast9h',Forecast9h); }
- Forecast9l = Weather.forecast.simpleforecast.forecastday[8].low.celsius; if (Forecast9l == null) {
- setGlobal('%Forecast9l',"-"); } if (Forecast9l != null) {
- setGlobal('%Forecast9l',Forecast9l); }
- Forecast9qd = Weather.forecast.simpleforecast.forecastday[8].qpf_day.mm; if (Forecast9qd == null) {
- setGlobal('%Forecast9qd',"0 mm"); } if (Forecast9qd != null) {
- setGlobal('%Forecast9qd',Forecast9qd+' mm'); }
- Forecast9qn = Weather.forecast.simpleforecast.forecastday[8].qpf_night.mm; if (Forecast9qn == null) {
- setGlobal('%Forecast9qn',"0 mm"); } if (Forecast9qn != null) {
- setGlobal('%Forecast9qn',Forecast9qn+' mm'); }
- Forecast9sd = Weather.forecast.simpleforecast.forecastday[8].snow_day.cm; if (Forecast9sd == null) {
- setGlobal('%Forecast9sd',"0 cm"); } if (Forecast9sd != null) {
- setGlobal('%Forecast9sd',Forecast9sd+' cm'); }
- Forecast9sn = Weather.forecast.simpleforecast.forecastday[8].snow_night.cm; if (Forecast9sn == null)
- { setGlobal('%Forecast9sn',"0 cm"); } if (Forecast9sn != null) {
- setGlobal('%Forecast9sn',Forecast9sn+' cm'); }
- Forecast9icon = Weather.forecast.simpleforecast.forecastday[8].icon_url;
- setGlobal('%Forecast9icontxt',icontxtLookup[Forecast9icon] || ' ');
- setGlobal('%Forecast9icon1',iconLookup[Forecast9icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast9hm = Weather.forecast.simpleforecast.forecastday[8].avehumidity; if (Forecast9hm == null) {
- setGlobal('%Forecast9hm',"0%"); } if (Forecast9hm != null) {
- setGlobal('%Forecast9hm',Forecast9hm+'%'); }
- Forecast9td = Weather.forecast.txt_forecast.forecastday[16].fcttext_metric; if (Forecast9td == "") {
- setGlobal('%Forecast9td1'," ");
- setGlobal('%Forecast9td2'," "); } if (Forecast9td != "") {
- Forecast9td2 = Forecast9td;
- setGlobal('%Forecast9td1',Forecast9td2);
- Forecast9td3 = Forecast9td2.replace('°C', ' fok');
- setGlobal('%Forecast9td2',Forecast9td3); }
- Forecast9tn = Weather.forecast.txt_forecast.forecastday[17].fcttext_metric; if (Forecast9tn == "") {
- setGlobal('%Forecast9tn1'," ");
- setGlobal('%Forecast9tn2'," "); } if (Forecast9tn != "") {
- Forecast9tn2 = Forecast9tn;
- setGlobal('%Forecast9tn1',Forecast9tn2);
- Forecast9tn3 = Forecast9tn2.replace('°C', ' fok');
- setGlobal('%Forecast9tn2',Forecast9tn3); }
- setGlobal('%Forecast10ms',Weather.forecast.simpleforecast.forecastday[9].date.monthname_short);
- setGlobal('%Forecast10dy',Weather.forecast.simpleforecast.forecastday[9].date.day);
- setGlobal('%Forecast10d',Weather.forecast.simpleforecast.forecastday[9].date.weekday);
- setGlobal('%Forecast10ds',Weather.forecast.simpleforecast.forecastday[9].date.weekday_short);
- Forecast10w = Weather.forecast.simpleforecast.forecastday[9].conditions; if (Forecast10w == "") {
- setGlobal('%Forecast10w'," "); } if (Forecast10w != "") {
- Forecast10w2 = convert( Forecast10w, 'htmlToText');
- setGlobal('%Forecast10w',Forecast10w2); }
- Forecast10h = Weather.forecast.simpleforecast.forecastday[9].high.celsius; if (Forecast10h == null) {
- setGlobal('%Forecast10h',"-"); } if (Forecast10h != null) {
- setGlobal('%Forecast10h',Forecast10h); }
- Forecast10l = Weather.forecast.simpleforecast.forecastday[9].low.celsius; if (Forecast10l == null) {
- setGlobal('%Forecast10l',"-"); } if (Forecast10l != null) {
- setGlobal('%Forecast10l',Forecast10l); }
- Forecast10qd = Weather.forecast.simpleforecast.forecastday[9].qpf_day.mm; if (Forecast10qd == null) {
- setGlobal('%Forecast10qd',"0 mm"); } if (Forecast10qd != null) {
- setGlobal('%Forecast10qd',Forecast10qd+' mm'); }
- Forecast10qn = Weather.forecast.simpleforecast.forecastday[9].qpf_night.mm; if (Forecast10qn == null) {
- setGlobal('%Forecast10qn',"0 mm"); } if (Forecast10qn != null) {
- setGlobal('%Forecast10qn',Forecast10qn+' mm'); }
- Forecast10sd = Weather.forecast.simpleforecast.forecastday[9].snow_day.cm; if (Forecast10sd == null) {
- setGlobal('%Forecast10sd',"0 cm"); } if (Forecast10sd != null) {
- setGlobal('%Forecast10sd',Forecast10sd+' cm'); }
- Forecast10sn = Weather.forecast.simpleforecast.forecastday[9].snow_night.cm; if (Forecast10sn == null)
- { setGlobal('%Forecast10sn',"0 cm"); } if (Forecast10sn != null) {
- setGlobal('%Forecast10sn',Forecast10sn+' cm'); }
- Forecast10icon = Weather.forecast.simpleforecast.forecastday[9].icon_url;
- setGlobal('%Forecast10icontxt',icontxtLookup[Forecast10icon] || ' ');
- setGlobal('%Forecast10icon1',iconLookup[Forecast10icon] || 'file:///sdcard/Tasker/temp/icon/11.png');
- Forecast10hm = Weather.forecast.simpleforecast.forecastday[9].avehumidity; if (Forecast10hm == null) {
- setGlobal('%Forecast10hm',"0%"); } if (Forecast10hm != null) {
- setGlobal('%Forecast10hm',Forecast10hm+'%'); }
- Forecast10td = Weather.forecast.txt_forecast.forecastday[18].fcttext_metric; if (Forecast10td == "") {
- setGlobal('%Forecast10td1'," ");
- setGlobal('%Forecast10td2'," "); } if (Forecast10td != "") {
- Forecast10td2 = Forecast10td;
- setGlobal('%Forecast10td1',Forecast10td2);
- Forecast10td3 = Forecast10td2.replace('°C', ' fok');
- setGlobal('%Forecast10td2',Forecast10td3); }
- Forecast10tn = Weather.forecast.txt_forecast.forecastday[19].fcttext_metric; if (Forecast10tn == "") {
- setGlobal('%Forecast10tn1'," ");
- setGlobal('%Forecast10tn2'," "); } if (Forecast10tn != "") {
- Forecast10tn2 = Forecast10tn;
- setGlobal('%Forecast10tn1',Forecast10tn2);
- Forecast10tn3 = Forecast10tn2.replace('°C', ' fok');
- setGlobal('%Forecast10tn2',Forecast10tn3); }
- var Update = global('%TIME');
- Update2 = Update.replace('.', ':');
- setGlobal('%Update',Update2);
- flashLong('A script sikeresen lefutott!');
- }
- else{
- flashLong('Nem sikerült letölteni az adatokat...');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement