|
|
|
![]() |
|
Strumenti |
![]() |
#1401 |
Senior Member
Iscritto dal: Feb 2003
Città: (LC)
Messaggi: 960
|
un problema (spero l'ultimo
![]() se disabilito lo script difatti mi si spu@@anano le news della bbc(a proposito non ci sono news italiane visto che si tratta solo di un po' di link che scorrono?) ![]() ![]() ![]()
__________________
Arcangelo volante dell'Ordine "GLI ADORATORI DELLA PIGNA" pignasite/forum - vespa 50r 1970 -> vespa ts 1975 -> vespa 125(@132) et3 1978 ![]() |
![]() |
![]() |
#1402 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Quote:
|
|
![]() |
![]() |
#1403 | |
Senior Member
Iscritto dal: Feb 2003
Città: (LC)
Messaggi: 960
|
Quote:
però dopo 10 minuti ricompare ![]() vabbè, ci farò il callo anche se questo mi blocca spesso dei giochi ![]() PS forza modena! ![]()
__________________
Arcangelo volante dell'Ordine "GLI ADORATORI DELLA PIGNA" pignasite/forum - vespa 50r 1970 -> vespa ts 1975 -> vespa 125(@132) et3 1978 ![]() |
|
![]() |
![]() |
#1404 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Quote:
PS forza lecco! ![]() |
|
![]() |
![]() |
#1405 |
Senior Member
Iscritto dal: Apr 2002
Città: Verona
Messaggi: 370
|
Tu ti lamenti perche' funziona troppo, il mio invece non vuole funzionare
![]() ![]() ![]()
__________________
Ale: "Ho comprato a un'asta la chitarra di Chopin". Franz: "Ma non dire idiozie, Chopin non suonava la chitarra!". Ale: "E infatti è ancora tutta imballata! |
![]() |
![]() |
#1406 | |
Senior Member
Iscritto dal: Feb 2003
Città: (LC)
Messaggi: 960
|
Quote:
OT vè che tengo veramente al modena(altre che al lecco anche se la stagione non è proprio brillante visto che i tifosi non fanno altro che pestare giocatori e allenatore) ![]() fine OT vabbè grazie
__________________
Arcangelo volante dell'Ordine "GLI ADORATORI DELLA PIGNA" pignasite/forum - vespa 50r 1970 -> vespa ts 1975 -> vespa 125(@132) et3 1978 ![]() |
|
![]() |
![]() |
#1407 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Quote:
|
|
![]() |
![]() |
#1408 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Quote:
|
|
![]() |
![]() |
#1409 |
Senior Member
Iscritto dal: Apr 2003
Città: Napoli
Messaggi: 414
|
Ci riprovo:
Mi scuso in anticipo per la domanda perchè sarà stata sicuramente proposta in precedenza. Volevo tuttavia sapere quale programma avete usato per modificare il colore della barra di scorrimento dei menù. Mi piacerebbe renderla uguale a quella utilizzata dai sistemi operativi della Apple...luccicante blu come quella di psichè sul desktop nella prima pagina di quesa discussione Grazie mille! ![]()
__________________
Enermax noisetaker 420W|ASUS A7N8X-E deluxe|AthlonXP 2.8+|Aereo 7+|2*512Mb DDR400|120GB Maxtor 8Mb cache+40GB|Sapphire 9800 pro|WinXP pro SP2|Alice Apple iPOD 20GB 4g non al denaro non all'amore nè al cielo |
![]() |
![]() |
#1410 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Quote:
|
|
![]() |
![]() |
#1411 |
Senior Member
Iscritto dal: Apr 2002
Città: Verona
Messaggi: 370
|
X PinHead
Ecco qua
'********************************************************************************************************* '* XML weather from weather.com for use with CoolMon Version: 1.03 * '* * '* Created by Jeff Weston * '* You must read the legal statement below for usage restrictions and copyright info. * '* * '* This script will run indefinitely and keep updating your weather text file. * '* There is no reason to use a scheduler for it, just add it to your Startup folder on your Start Menu. * '* * '********************************************************************************************************* ' '********** I N I T I A L S E T U P ********** ' ' First step to get this working is to paste the following in your web browser (without the leading '): ' http://xoap.weather.com/search/search?where="Paris, France" ' replacing "Paris, France", of course, with your own location (zip codes will work too) ' ' This will return one location, or a series of them: ' <loc id="FRXX0076" type="1">Paris, France</loc> ' <loc id="FRXX0077" type="1">Paris/Charles De Gaulle, France</loc> ' What we need is the "loc id" for the location you wish to use. Please paste that in below: ' Note that if you are a US resident, you should be fine just putting in your zip code. const locID = "ITAXX0087" ' NUMBER OF FORECAST DAYS ' This script gets two forecasts for each day -- one for night, one for the daytime. ' One day will get the two forecasts for that day. ' Change this to change the number of forecasts the script will download. ' The max number accepted is 10, though it seems to only output a max of 9 days. ' The advantage to shortening this is it takes slightly less time to download, and places ' less burden on weather.com if you lower this number to only what you will use const numForecastDays = "5" ' UNIT SETUP ' units are "Standard" (US), or "Metric". Please use "s" for standard/US, and "m" for metric: const unitType = "s" ' In the output, you can have the numbers alone, or the units can be added to the lines. ' If you want the units added, keep these as "y", otherwise change them to "n". const showUnitsForTemp = "n" ' degree symbol will be there no matter what. const showUnitsForDistance = "y" const showUnitsForSpeed = "y" const showUnitsForPrecipitation = "y" const showUnitsForBarometer = "y" ' You may need to change this if your font does not have the degree symbol in the correct place. ' can also be used to customize whether you want a space before the symbols or not. const degreeSymbol = "°" const percentSymbol = " %" ' this one will always be added. To not add it, set to "" ' OUTPUT FILES ' Change this to where you want the output file to go const outFile = "weather.com.txt" ' Change this to where you want the error output to go ' if you have any problems with the script, look in this file for a diagnosis of the problem. const errPath = "err-weather.com.txt" ' UPDATE INTERVALS ' Update interval for current conditions info (in minutes). Must be 30 minutes or greater to legally use the script. const ccUpdateInterval = "30" ' Update interval for daily forecast (10-day) info will be 4x the current conditions interval (2 hrs default) ' Update interval for required links will be 24x current conditions interval (12 hrs default). '******************************************************************************************************* '* END OF SETUP, NOW FOR THE LEGAL SECTION * '******************************************************************************************************* ' '********** L E G A L S E C T I O N ********** ' ' All output created by this script is copyrighted by weather.com. The data is the property of weather.com. ' Reformatting of the data output (i.e., changing language or converting values) is prohibited. ' This script is meant to be used directly CoolMon (http://coolmon.arsware.org). Any other use is prohibited. ' This includes, but is not limited to, using the output in another script or program. ' Converting the numbers and changing the output text is prohibited. ' This script is distributed for free. Any attempt to sell it is prohibited. ' ' In order to use this script legally, you must do several things. YOU MUST: ' -use the output file only directly in CoolMon, not in any other program or script ' -not redistribute any of the data output by this script ' -not modify this script in any way other than changing data in the "Initial setup" section above (see note below about modification) ' -only display weather data for one location at a time ' (thus if you want to display data for more than one location, you would have to do something like using the flipper, as well as run 2 copies of this script) ' -clearly separate weather.com data from other data being displayed (i.e., give it a heading to separate it out) ' -identify that the data comes from "The Weather Channel" or "weather.com" (they're the same thing) ' -put in a link to the weather.com homepage (use the one of the links on lines 19-20) (can also be used to satisfy the identify where it comes from instruction) ' -put in 3 promotional links (3 of lines 15-18) together vertically under a heading of "Featured on weather.com®:" ' -not use any other weather data inside CoolMon ' -not do any modifications, translations, conversions, or derivations on the text and data output by this script ' -not modify the included images in any way (except possibly to convert the file type); the images are useless until CM2, but included anyways. ' -not update the info any more often than every 30 minutes for current conditions, every 2 hours for daily forecast, and every 12 hours for links. ' (these are the default values, and you cannot break this rule without illegally modifying the script) ' -display, at a minimum, the current temperature in CoolMon ' (you're also required to display the current conditions icon if possible, but that's unfortunately not possible with CoolMon at this time) ' -display an attribute of "Weather data provided by weather.com®", using the link for the "weather.com®" within the same visual element as the weather data ' (you're also required to display the weather.com logo as a link to the same webpage but again, that's unfortunately not possible with CoolMon at this time) ' -according to the weather.com logo guide, it is "preferred" that whenever "weather.com®" or "The Weather Channel®" are used, they should be either in italics, bold, or both ' (it's not clear if this is "required", or just "preferred") ' ' ' The author takes no responsibility for users who fail to abide by these rules, as they are not permitted to use the script. ' ' If you wish to modify anything below, you must download the SDK and agree to abide by their rules. ' The author takes no responsibility for any script created from this one. ' ' If you wish to modify or create your own script, you must go to http://www.weather.com/services/xmloap.html ' and sign up yourself. Then replace the following fields with your own (you should get them via email): partnerID="1003674105" licenseKey="c88f0f4600bf57be" ' To any officials at weather.com: ' I understand that this tool itself cannot ensure that all users will follow the guidelines I have set ' forth to legally use the script. I also understand that CoolMon, in its current incarnation, cannot ' fully comply with the guidelines set forth due mainly to its inability to display images. When CoolMon2 ' is finished, hopefully we will be able to more closely follow your guidelines. However, I still believe ' this script to be within the spirit of what is meant by the guidelines set forth. If anyone representing ' weather.com in an official context believes this not to be the case, please contact me. At your request, ' this script can be taken off the website. If you are officially representing weather.com, you should ' already know my email address from my Partner ID, so I need not give that here. '******************************************************************************************************* '* F I L E F O R M A T * '******************************************************************************************************* ' '********** FILE FORMAT ******** ' ' 1-5. Legal Statement Stuff ' 6. Location ID (number/zip code) ' 7. Location Descript (city, state) ' 8. Last time any XML was downloaded ' 9. Latitude ' 10. Longitude ' 11. Sunrise Time ' 12. Sunset Time ' 13. Zone (timezone? not quite offset from GMT....) ' 14. "****** REQUIRED LINKS ******" ' 15-22. Promotional links you are required to add (text on first line, link on second, repeated 3x) ' 23-26. weather.com homepage links (text on first line, link on second, repeated 3x) ' 27-28. weather.com link for your local weather (text on first line, link on second) ' 29. "****** CURRENT CONDITIONS ******" ' 30. Last update time for Current Conditions ' 31. Observation station ' 32. Current Temperature ' 33. Feels Like Temperature ' 34. Current Conditions Description/Text ' 35. Current Conditions Image Number ' 36. Current Barometer Reading ' 37. Current Barometer Direction (rising/falling/steady) ' 38. Current Wind Speed ' 39. Current Wind Gust Speed ' 40. Current Wind Direction (in degrees) ' 41. Current Wind Direction Description/Text ' 42. Current Humidity ' 43. Current Visibility ' 44. Current UV Index ' 45. Current UV Description/Text ' 46. Current Dew Point ' 47. "****** FORECAST INFO ******" ' 48. Last update time for all forecasts ' This data is for the first forecast: ' 49. Special Day (Today/Tonight/Tomorrow/Tomorrow Night/Wednesday/Wednesday Night/Thursday/Thursday Night/etc) ' 50. Date ' 51. Day of the week (just Monday through Sunda) ' 52. High Temperature ' 53. Low Temperature ' 54. Sunrise Time ' 55. Sunset Time ' 56. Forecast Conditions Icon Number ' 57. Forecast Conditions Description/Text ' 58. Wind Speed ' 59. Wind Gust Speed ' 60. Wind Direction (in degrees) ' 61. Wind Direction Description/Text ' 62. Chance of Precipitation ' 63. Humidity ' The last 15 items (the ones for the first forecast) then repeat for every available forecast. ' There are a maximum of 20 forecasts, and there are always 2 forecasts per day. ' The first one is from 7AM-7PM, the second from 7PM-7AM. After 2PM, the first forecast may have a lot of blanks or N/As. '******************************************************************************************************* '* YOU CANNOT ALTER ANYTHING BELOW UNLESS YOU DOWNLOAD THE WEATHER.COM SDK AND ABIDE BY THEIR RULES!!! * '******************************************************************************************************* ' INITIAL VARIABLE SETUP On Error Resume Next Err.clear dim headData, locData, ccData, links(5), linkURLS(5), fData(10), c_counter, cd_counter, fLastUpdate ' for parseXML, getXML dim timeoutDetected '0=no timeout, 1=timeout dim xmlURL, xmlDOM, timeout_counter dim tempExtra, distExtra, speedExtra, precipExtra, pressExtra Set headData = CreateObject("Scripting.Dictionary") Set locData = CreateObject("Scripting.Dictionary") Set ccData = CreateObject("Scripting.Dictionary") Set otherData = CreateObject("Scripting.Dictionary") for i = 0 To 9 Set fData(i) = CreateObject("Scripting.Dictionary") next c_counter = 3 cd_counter = 5 set http = createobject("microsoft.xmlhttp") Set fso = CreateObject("Scripting.FileSystemObject") If Err <> 0 Then produceError("Initialization Error!") Wscript.Echo "weather.com.vbs: Initialization Error!" Wscript.Quit() End If Err.clear ' initial variable checking If numForecastDays > 10 Then produceError("Error: number of forecast days must be 10 at most!") Wscript.Echo "weather.com.vbs Error: number of forecast days must be 10 at most!" Wscript.Quit() End If If ccUpdateInterval < 30 Then produceError("Error: Update Interval is set too low. Must be 30 minutes or more!") Wscript.Echo "weather.com.vbs Error: Update Interval is set too low. Must be 30 minutes or more!" Wscript.Quit() End If If unitType <> "s" Then If unitType <> "m" Then produceError("Error: Wrong unitType! must be set to s or m (in quotes)") Wscript.Echo "weather.com.vbs Error: Wrong unitType! must be set to s or m (in quotes)" Wscript.Quit() End If End If ' Interval stuff dim sleepVal sleepVal = ccUpdateInterval * 60000 ' convert to ms ' number of current condition updates per daily forecast update const cc_df_mult = 4 ' number of current condition updates per link update const cc_link_mult = 6 '********** MAIN TIMER LOOP ********** Do Until 0 = 1 'loop forever ' do a current conditions update every time Err.clear ' just in case I forgot somewhere.... c_counter = c_counter + 1 If c_counter >= cc_df_mult Then ' also do a daily forecast update c_counter = 0 cd_counter = cd_counter + 1 If cd_counter >= cc_link_mult Then ' also do a links update cd_counter = 0 tryXML("cdl") Else tryXML("cd") End If Else tryXML("c") End If Wscript.sleep sleepVal Loop '********** F U N C T I O N S ********** function tryXML(theUpdateType) ' tries to getXML and if/when successful, parseXML getXML(theUpdateType) If timeoutDetected = 1 Then ' first timeout, wait 30 seconds Wscript.sleep 30000 getXML(theUpdateType) End If If timeoutDetected = 1 Then ' second timeout, wait 1 minute Wscript.sleep 60000 getXML(theUpdateType) End If If timeoutDetected = 1 Then ' third timeout, wait 5 minutes Wscript.sleep 300000 getXML(theUpdateType) End If If timeoutDetected = 1 Then ' fourth timeout, wait 10 minutes Wscript.sleep 600000 getXML(theUpdateType) End If If timeoutDetected = 0 Then ' if successful parse, else give up parseXML() End If end function function getXML(updateType) ' gets the XML page from the server 'updateType="c" for curr cond only, "cd" for curr cond + daily forecast, "cdl" for "curr cond + daily forecast + links ' GET THE URL If updateType = "c" Then xmlURL = "http://xoap.weather.com/weather/local/" & locID & "?cc=*&prod=xoap&par=" & partnerID & "&key=" & licenseKey & "&unit=" & unitType ElseIf updateType = "cd" Then xmlURL = "http://xoap.weather.com/weather/local/" & locID & "?cc=*&dayf=" & numForecastDays & "&prod=xoap&par=" & partnerID & "&key=" & licenseKey & "&unit=" & unitType ElseIf updateType = "cdl" Then xmlURL = "http://xoap.weather.com/weather/local/" & locID & "?cc=*&dayf=" & numForecastDays & "&link=xoap&prod=xoap&par=" & partnerID & "&key=" & licenseKey & "&unit=" & unitType Else produceError("getXML() Error: unknown updateType " & updateType) Wscript.Echo "weather.com.vbs: getXML() Error: unknown updateType " & updateType Wscript.Quit() End If 'for debugging purposes... 'set inXML = fso.OpenTextFile("xmlexample.txt",1,true) 'xmlData=inXML.ReadAll 'inXML.close 'If Err <> 0 Then ' produceError("getXML() Error: failed to read in file xmlexample.txt") ' Err.clear ' Exit Function 'End If timeoutDetected = 1 ' set default after checking for correct updateType ' SET UP XML OBJECT, GET XML Set xmlDOM = createObject("Msxml.DOMDocument") xmlDOM.setProperty "SelectionLanguage", "XPath" xmlDOM.async = true 'xmlDOM.loadXML(xmlData) 'for debugging purposes... xmlDOM.load(xmlURL) timeout_counter = 0 Do Until xmlDOM.readyState = 4 If timeout_counter > 60 Then produceError("getXML() Error: Could not get XML (timeout)") Exit Function End If WScript.sleep 1000 timeout_counter = timeout_counter + 1 Loop If xmlDOM.xml = "" Then 'nothing was loaded. same as timeout produceError("getXML() Error: Could not get XML (blank)") Exit Function End If If Err <> 0 Then produceError("getXML() Error: Error getting XML") Err.clear Exit Function End If timeoutDetected = 0 ' clear if no errors end function function parseXML() ' parses XML after it has been downloaded tempExtra = degreeSymbol distExtra = "" speedExtra = "" precipExtra = "" pressExtra = "" ' CHECK FOR OFFICIAL WEATHER.COM XML ERRORS If xmlDOM.getElementsByTagName("error").length Then produceError("parseXML() Error: XML Error code " & xmlDOM.selectSingleNode("/error/err").getAttribute("type") & ": " & xmlDOM.selectSingleNode("/error/err").text) If xmlDOM.selectSingleNode("/error/err").getAttribute("type") <> 0 Then Wscript.Echo "weather.com.vbs: parseXML() Error: XML Error code " & xmlDOM.selectSingleNode("/error/err").getAttribute("type") & ": " & xmlDOM.selectSingleNode("/error/err").text Wscript.Quit() End If Exit Function End If '**** EXTRACT VALUES FROM XML **** ' <head> section If xmlDOM.selectSingleNode("/weather").getElementsByTagName("head").length Then ' delete old data headData.RemoveAll() ' get new data headData.add "locale", xmlDOM.selectSingleNode("/weather/head/locale").text headData.add "format", xmlDOM.selectSingleNode("/weather/head/form").text headData.add "tempUnit", xmlDOM.selectSingleNode("/weather/head/ut").text If showUnitsForTemp = "y" Then tempExtra = degreeSymbol & headData.item("tempUnit") End If headData.add "distUnit", xmlDOM.selectSingleNode("/weather/head/ud").text If showUnitsForDistance = "y" Then distExtra = " " & headData.item("distUnit") End If headData.add "speedUnit", xmlDOM.selectSingleNode("/weather/head/us").text If showUnitsForSpeed = "y" Then speedExtra = " " & headData.item("speedUnit") End If headData.add "precipUnit", xmlDOM.selectSingleNode("/weather/head/up").text If showUnitsForPrecipitation = "y" Then precipExtra = " " & headData.item("precipUnit") End If headData.add "pressUnit", xmlDOM.selectSingleNode("/weather/head/ur").text If showUnitsForBarometer = "y" Then pressExtra = " " & headData.item("pressUnit") End If End If ' <loc> section If xmlDOM.selectSingleNode("/weather").getElementsByTagName("loc").length Then ' delete old data locData.RemoveAll() ' get new data locData.add "id", xmlDOM.selectSingleNode("/weather/loc").getAttribute("id") locData.add "name", xmlDOM.selectSingleNode("/weather/loc/dnam").text locData.add "time", xmlDOM.selectSingleNode("/weather/loc/tm").text locData.add "latitude", xmlDOM.selectSingleNode("/weather/loc/lat").text locData.add "longitude", xmlDOM.selectSingleNode("/weather/loc/lon").text locData.add "sunrise", xmlDOM.selectSingleNode("/weather/loc/sunr").text locData.add "sunset", xmlDOM.selectSingleNode("/weather/loc/suns").text locData.add "zone", xmlDOM.selectSingleNode("/weather/loc/zone").text End If ' <lnks> section If xmlDOM.selectSingleNode("/weather").getElementsByTagName("lnks").length Then ' delete old data for i = 0 To 4 links(i) = "" linkURLs(i) = "" Next ' get new data dim linklist, counter counter = 0 Set linklist = xmlDOM.selectNodes("/weather/lnks/link") For Each TheLink in linklist If counter < 5 Then dim text links(counter) = TheLink.getElementsByTagName("t").item(0).text linkURLs(counter) = TheLink.getElementsByTagName("l").item(0).text counter = counter + 1 End If Next End If ' <cc> section If xmlDOM.selectSingleNode("/weather").getElementsByTagName("cc").length Then ' delete old data ccData.RemoveAll() ' get new data ccData.add "lastUpdate", xmlDOM.selectSingleNode("/weather/cc/lsup").text ccData.add "observationStation", xmlDOM.selectSingleNode("/weather/cc/obst").text ccData.add "temp", xmlDOM.selectSingleNode("/weather/cc/tmp").text & tempExtra ccData.add "feelsLikeTemp", xmlDOM.selectSingleNode("/weather/cc/flik").text & tempExtra ccData.add "text", xmlDOM.selectSingleNode("/weather/cc/t").text ccData.add "icon", xmlDOM.selectSingleNode("/weather/cc/icon").text ccData.add "barReading", xmlDOM.selectSingleNode("/weather/cc/bar/r").text & pressExtra ccData.add "barDirection", xmlDOM.selectSingleNode("/weather/cc/bar/d").text ccData.add "windSpeed", xmlDOM.selectSingleNode("/weather/cc/wind/s").text & speedExtra ccData.add "windGust", xmlDOM.selectSingleNode("/weather/cc/wind/gust").text & speedExtra ccData.add "windDirectionDeg", xmlDOM.selectSingleNode("/weather/cc/wind/d").text & degreeSymbol ccData.add "windDirectionText", xmlDOM.selectSingleNode("/weather/cc/wind/t").text ccData.add "humidity", xmlDOM.selectSingleNode("/weather/cc/hmid").text & percentSymbol ccData.add "visibility", xmlDOM.selectSingleNode("/weather/cc/vis").text & distExtra ccData.add "uvIndex", xmlDOM.selectSingleNode("/weather/cc/uv/i").text ccData.add "uvText", xmlDOM.selectSingleNode("/weather/cc/uv/t").text ccData.add "dewPoint", xmlDOM.selectSingleNode("/weather/cc/dewp").text & tempExtra ' does not cover these DTD elements (of which I have no example): ' <wvpd> block of wave period data (bnb only) ' <seat> integer sea water temp (bnb only) ' <ht> decimal wave height (bnb only) End If ' <dayf> section If xmlDOM.selectSingleNode("/weather").getElementsByTagName("dayf").length Then fLastUpdate = xmlDOM.selectSingleNode("/weather/dayf/lsup").text dim daylist, j Set daylist = xmlDOM.selectNodes("/weather/dayf/day") For Each fDay in daylist j = fDay.getAttribute("d") If j < 10 Then ' delete old data fData(j).RemoveAll() ' get new data dim partlist Set partlist = fDay.getElementsByTagName("part") ' PARSE EACH PART OF THE DAY If partlist.length = 0 Then produceError("ParseXML() Error: one forecast day has no <part> section for some reason") Exit Function ElseIf partlist.length = 1 Then ' should only happen on today's forecast, and it should be the day part that is missing. If partlist.item(0).getAttribute("p") <> "n" Then produceError("ParseXML() Error: one <part> section for " & fData(j).date & ", but it is not for night!") Exit Function End If ' save special date (today/tonight/tomorrow/etc) If j = 0 Then fData(j).add "dSpecial", "Today" ElseIf j = 1 Then fData(j).add "dSpecial", "Tomorrow" Else fData(j).add "dSpecial", fDay.getAttribute("t") End If fData(j).add "ddate", fDay.getAttribute("dt") fData(j).add "ddayOfWeek", fDay.getAttribute("t") fData(j).add "dhigh", "" fData(j).add "dlow", "" fData(j).add "dsunrise", "" fData(j).add "dsunset", "" fData(j).add "dIcon", "" fData(j).add "dText", "N/A" fData(j).add "dWindSpeed", "N/A" fData(j).add "dWindGust", "N/A" fData(j).add "dWindDirectionDeg", "" fData(j).add "dWindDirectionText", "" fData(j).add "dPrecipChance", "N/A" fData(j).add "dHumidity", "N/A" ' save special date (today/tonight/tomorrow/etc) If j = 0 Then fData(j).add "nSpecial", "Tonight" ElseIf j = 1 Then fData(j).add "nSpecial", "Tomorrow Night" Else fData(j).add "nSpecial", fDay.getAttribute("t") & " Night" End If fData(j).add "ndate", fDay.getAttribute("dt") fData(j).add "ndayOfWeek", fDay.getAttribute("t") fData(j).add "nhigh", fDay.getElementsByTagName("hi").item(0).text & tempExtra fData(j).add "nlow", fDay.getElementsByTagName("low").item(0).text & tempExtra fData(j).add "nsunrise", fDay.getElementsByTagName("sunr").item(0).text fData(j).add "nsunset", fDay.getElementsByTagName("suns").item(0).text fData(j).add "nIcon", partlist.item(0).getElementsByTagName("icon").item(0).text fData(j).add "nText", partlist.item(0).getElementsByTagName("t").item(0).text fData(j).add "nWindSpeed", partlist.item(0).getElementsByTagName("wind/s").item(0).text & speedExtra fData(j).add "nWindGust", partlist.item(0).getElementsByTagName("wind/gust").item(0).text & speedExtra fData(j).add "nWindDirectionDeg", partlist.item(0).getElementsByTagName("wind/d").item(0).text & degreeSymbol fData(j).add "nWindDirectionText", partlist.item(0).getElementsByTagName("wind/t").item(0).text fData(j).add "nPrecipChance", partlist.item(0).getElementsByTagName("ppcp").item(0).text & percentSymbol fData(j).add "nHumidity", partlist.item(0).getElementsByTagName("hmid").item(0).text & percentSymbol ElseIf partlist.length = 2 Then dim dNum, nNum dNum = 0 ' means that day comes before night nNum = 1 ' means that day comes before night If partlist.item(0).getAttribute("p") <> "d" Then If partlist.item(1).getAttribute("p") <> "d" Then produceError("ParseXML() Error: on " & fData(j).date & ", there is no day <part> element!") Exit Function ElseIf partlist.item(0).getAttribute("p") <> "n" Then produceError("ParseXML() Error: on " & fData(j).date & ", day <part> section exists, but night does not!") Exit Function Else dNum = 1 nNum = 0 End If ElseIf partlist.item(1).getAttribute("p") <> "n" Then produceError("ParseXML() Error: on " & fData(j).date & ", day section exists but night does not!") Exit Function End If ' save special date (today/tonight/tomorrow/etc) If j = 0 Then fData(j).add "dSpecial", "Today" ElseIf j = 1 Then fData(j).add "dSpecial", "Tomorrow" Else fData(j).add "dSpecial", fDay.getAttribute("t") End If fData(j).add "ddate", fDay.getAttribute("dt") fData(j).add "ddayOfWeek", fDay.getAttribute("t") fData(j).add "dhigh", fDay.getElementsByTagName("hi").item(0).text & tempExtra fData(j).add "dlow", fDay.getElementsByTagName("low").item(0).text & tempExtra fData(j).add "dsunrise", fDay.getElementsByTagName("sunr").item(0).text fData(j).add "dsunset", fDay.getElementsByTagName("suns").item(0).text fData(j).add "dIcon", partlist.item(dNum).getElementsByTagName("icon").item(0).text fData(j).add "dText", partlist.item(dNum).getElementsByTagName("t").item(0).text fData(j).add "dWindSpeed", partlist.item(dNum).getElementsByTagName("wind/s").item(0).text & speedExtra fData(j).add "dWindGust", partlist.item(dNum).getElementsByTagName("wind/gust").item(0).text & speedExtra fData(j).add "dWindDirectionDeg", partlist.item(dNum).getElementsByTagName("wind/d").item(0).text & degreeSymbol fData(j).add "dWindDirectionText", partlist.item(dNum).getElementsByTagName("wind/t").item(0).text fData(j).add "dPrecipChance", partlist.item(dNum).getElementsByTagName("ppcp").item(0).text & percentSymbol fData(j).add "dHumidity", partlist.item(dNum).getElementsByTagName("hmid").item(0).text & percentSymbol ' save special date (today/tonight/tomorrow/etc) If j = 0 Then fData(j).add "nSpecial", "Tonight" ElseIf j = 1 Then fData(j).add "nSpecial", "Tomorrow Night" Else fData(j).add "nSpecial", fDay.getAttribute("t") & " Night" End If fData(j).add "ndate", fDay.getAttribute("dt") fData(j).add "ndayOfWeek", fDay.getAttribute("t") fData(j).add "nhigh", fDay.getElementsByTagName("hi").item(0).text & tempExtra fData(j).add "nlow", fDay.getElementsByTagName("low").item(0).text & tempExtra fData(j).add "nsunrise", fDay.getElementsByTagName("sunr").item(0).text fData(j).add "nsunset", fDay.getElementsByTagName("suns").item(0).text fData(j).add "nIcon", partlist.item(nNum).getElementsByTagName("icon").item(0).text fData(j).add "nText", partlist.item(nNum).getElementsByTagName("t").item(0).text fData(j).add "nWindSpeed", partlist.item(nNum).getElementsByTagName("wind/s").item(0).text & speedExtra fData(j).add "nWindGust", partlist.item(nNum).getElementsByTagName("wind/gust").item(0).text & speedExtra fData(j).add "nWindDirectionDeg", partlist.item(nNum).getElementsByTagName("wind/d").item(0).text & degreeSymbol fData(j).add "nWindDirectionText", partlist.item(nNum).getElementsByTagName("wind/t").item(0).text fData(j).add "nPrecipChance", partlist.item(nNum).getElementsByTagName("ppcp").item(0).text & percentSymbol fData(j).add "nHumidity", partlist.item(nNum).getElementsByTagName("hmid").item(0).text & percentSymbol Else produceError("ParseXML() Error: one forecast day has an unexpected number of <part> sections") Exit Function End If End If Next End If ' CHECK FOR PARSING ERRORS If Err <> 0 Then produceError("parseXML() Error: Error occured during XML element extraction") Err.clear Exit Function End If ' WRITE THE OUTPUT FILE set fOutput = fso.CreateTextFile(outFile,true) ' write legal stuff fOutput.writeLine "This data is Copyright The Weather Channel Enterprises, Inc. All Rights Reserved." fOutput.writeLine "This data was taken from an XML page by the weather.com script. The data is the property of weather.com." fOutput.writeLine "This file is meant only for display by CoolMon (http://coolmon.arsware.org/) directly. Any other use is prohibited." fOutput.writeLine "In order to use this file, you must read the Legal Section of the script which created it." fOutput.writeLine "You are not permitted to use this file, or any data therein, unless you agree to the terms described therein." ' write location data keys = locData.Keys For i = 0 To locData.Count-1 fOutput.writeLine locData.Item(keys(i)) Next fOutput.writeLine "****** REQUIRED LINKS ******" for i = 0 To 3 fOutput.writeLine links(i) fOutput.writeLine linkURLs(i) next fOutput.writeLine "weather.com®" fOutput.writeLine "http://www.weather.com/?prod=xoap&par=" & partnerID fOutput.writeLine "The Weather Channel®" fOutput.writeLine "http://www.weather.com/?prod=xoap&par=" & partnerID fOutput.writeLine "My Weather" fOutput.writeLine "http://www.weather.com/weather/local/" & locData.item("id") & "?prod=xoap&par=" & partnerID fOutput.writeLine "****** CURRENT CONDITIONS ******" keys = ccData.Keys For i = 0 To ccData.Count-1 fOutput.writeLine ccData.Item(keys(i)) Next fOutput.writeLine "****** FORECAST INFO ******" fOutput.writeLine fLastUpdate for i = 0 to 9 keys = fData(i).Keys For j = 0 To fData(i).Count-1 fOutput.writeLine fData(i).Item(keys(j)) Next Next fOutput.close If Err <> 0 Then produceError("parseXML() Error: Error occured during file writing phase") Wscript.Echo "weather.com.vbs: parseXML() Error: Error occured during file writing phase" Wscript.Quit() End If fso.DeleteFile ErrPath, true 'if no errors, remove the error file (even if read-only, which it shouldn't be) Err.clear ' clear error that occurs if file does not exist. end function function produceError(msg) ' creates error text file with description set erroutput = fso.CreateTextFile(ErrPath, true) erroutput.writeline msg erroutput.close end function
__________________
Ale: "Ho comprato a un'asta la chitarra di Chopin". Franz: "Ma non dire idiozie, Chopin non suonava la chitarra!". Ale: "E infatti è ancora tutta imballata! |
![]() |
![]() |
#1412 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Re: X PinHead
Quote:
|
|
![]() |
![]() |
#1413 |
Senior Member
Iscritto dal: Apr 2002
Città: Verona
Messaggi: 370
|
oppss scusa
riecco qua
Proc %: <NAME=ProcUsage LEADZERO DECIMAL SIZE=5 FORMAT="ALL"> Processes: <NAME=Processes SIZE=5>Threads: <NAME=Threads SIZE=5> <NAME=Uptime FORMAT="*d* days, *H* hrs, *M* mins, *S* secs" SIZE=20> PageUsed: <NAME=PageUsed>/PageTotal: <NAME=PageTotal> RAMUsed: <NAME=RAMUsed>/RAMTotal: <NAME=RAMTotal> <NAME=DateTime FORMAT="'Date' dd/mm/yy 'Time' hh:nn"> <NAME=IPAddr> <NAME=CompName> <U><C:$9FCAE1><PIXELSTART=0><b><NAME=DateTime FORMAT="dddd dd mmmm yyy"></b> <C:$F5F5F5><PIXELSTART=0><B><NAME=DateTime FORMAT="'Time' hh:nn:ss"> </B> <C:$F5F5F5><PIXELSTART=0><b><NAME=Uptime FORMAT="*d* giorni, *H* ore, *M* minuti" SIZE=20></b> <U><pixelstart=0><C:$9FCAE1><B><U>Sistema</U></B></b></U> <C:$F5F5F5><pixelstart=0>Uso CPU<pixelstart=70>: <b><NAME=ProcUsage LEADZERO SIZE=2 FORMAT="ALL">%</b> <C:$F5F5F5><pixelstart=0>Op. in processo<pixelstart=70>: <NAME=TopProc FORMAT="Title"></B> <C:$F5F5F5><pixelstart=0>Swap usato<pixelstart=70>: <NAME=PageUsed> / <NAME=PageTotal> MB</B> <C:$F5F5F5><PIXELSTART=0>Ram Usata<b><pixelstart=70>: <NAME=RAMUsed> MB</b> <C:$F5F5F5><PIXELSTART=0>Ram Libera<pixelstart=70>: <NAME=RAMFree> MB</b> <C:$F5F5F5><PIXELSTART=0>Ram Totale<pixelstart=70>: <NAME=RAMTotal> MB</b> <C:$F5F5F5><PIXELSTART=0>Chipset<PIXELSTART=70>: <NAME=Temp1 FORMAT="C">º <C:$F5F5F5><PIXELSTART=0>CPU<PIXELSTART=70>: <NAME=Temp2 FORMAT="C">º <U><pixelstart=0><C:$9FCAE1><U><B>Rete</B></U></b> <C:$F5F5F5><pixelstart=0>Download<pixelstart=70>:<B><NAME=NetRead LEADZERO DECIMAL SIZE=5 FORMAT="ALL"> kb/s</B> <C:$F5F5F5><pixelstart=0>Upload<pixelstart=70>:<B><NAME=NetWrite LEADZERO DECIMAL SIZE=5 FORMAT="ALL"> kb/s </B> <C:$F5F5F5><pixelstart=0>Tot. down<pixelstart=70>:<B><NAME=NetSumRead LEADZERO DECIMAL SIZE=5 FORMAT="ALL" DIV=1024> MB </B> <C:$F5F5F5><pixelstart=0>Tot. up<pixelstart=70>:<B><NAME=NetSumWrite LEADZERO DECIMAL SIZE=5 FORMAT="ALL" DIV=1024> MB </B> <c 1E311B> </c> <U><C:$9FCAE1><PIXELSTART=0><b>Tempo a Verona<NAME=FILEDATA FORMAT="c:\Programmi\weather.com.txt,30"> <C:$F5F5F5><PIXELSTART=0>Vento<PIXELSTART=70> : <B><NAME=FILEDATA FORMAT="c:\Programmi\weather.com.txt,38"></B> <C:$F5F5F5><PIXELSTART=0>Tmp adesso<PIXELSTART=70> : <B><NAME=FILEDATA FORMAT="c:\Programmi\weather.com.txt,32"> <C:$F5F5F5><PIXELSTART=0>Max Oggi<PIXELSTART=70> : <B><NAME=FILEDATA FORMAT="c:\Programmi\weather.com.txt,52"></B><PIXELSTART=115> Min: <PIXELSTART=140><B><NAME=FILEDATA FORMAT="c:\Programmi\weather.com.txt,53">C</B><PIXELSTART=190>Umidità: <B><NAME=FILEDATA FORMAT="c:\Programmi\weather.com.txt,42"> <C:$F5F5F5><PIXELSTART=0>Cielo<PIXELSTART=70> : <B><NAME=FILEDATA FORMAT="c:\Programmi\weather.com.txt,34"></B> <U><C:$9FCAE1><b><pixelstart=0><U><B><C:$9FCAE1>Hard Disk</C></B></U></u></c></b> <C:$F5F5F5><PIXELSTART=0>Disco C:<PIXELSTART=70>: <NAME=DriveSpace SIZE=5 FORMAT="C FREE"> <b>Gb liberi</b> <C:$F5F5F5><PIXELSTART=0>Disco C:<PIXELSTART=70>: <NAME=DriveSpace SIZE=5 FORMAT="C TOTAL"> <b>Gb Totali</b> <C:$F5F5F5><PIXELSTART=0>Disco D:<PIXELSTART=70>: <NAME=DriveSpace SIZE=5 FORMAT="D FREE"> <b>Gb liberi</b> <C:$F5F5F5><PIXELSTART=0>Disco D:<PIXELSTART=70>: <NAME=DriveSpace SIZE=5 FORMAT="D TOTAL"> <b>Gb Totali</b> <C:$F5F5F5><PIXELSTART=0>Disco E:<PIXELSTART=70>: <NAME=DriveSpace SIZE=5 FORMAT="E FREE"> <b>Gb liberi</b> <C:$F5F5F5><PIXELSTART=0>Disco E:<PIXELSTART=70>: <NAME=DriveSpace SIZE=5 FORMAT="E TOTAL"> <b>Gb Totali</b> <C:$D3D3D3><PIXELSTART=0>Disco F:<PIXELSTART=70>: <NAME=DriveSpace SIZE=5 FORMAT="F FREE"> <b>Gb liberi</b> <C:$D3D3D3><PIXELSTART=0>Disco F:<PIXELSTART=70>: <NAME=DriveSpace SIZE=5 FORMAT="F TOTAL"> <b>Gb Totali</b>
__________________
Ale: "Ho comprato a un'asta la chitarra di Chopin". Franz: "Ma non dire idiozie, Chopin non suonava la chitarra!". Ale: "E infatti è ancora tutta imballata! |
![]() |
![]() |
#1414 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Re: oppss scusa
Quote:
|
|
![]() |
![]() |
#1415 |
Senior Member
Iscritto dal: Apr 2002
Città: Verona
Messaggi: 370
|
L'ho estratto perche' era zippato qui:C:\Programmi\CoolMon
__________________
Ale: "Ho comprato a un'asta la chitarra di Chopin". Franz: "Ma non dire idiozie, Chopin non suonava la chitarra!". Ale: "E infatti è ancora tutta imballata! |
![]() |
![]() |
#1416 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Quote:
|
|
![]() |
![]() |
#1417 |
Senior Member
Iscritto dal: Apr 2002
Città: Verona
Messaggi: 370
|
certo
__________________
Ale: "Ho comprato a un'asta la chitarra di Chopin". Franz: "Ma non dire idiozie, Chopin non suonava la chitarra!". Ale: "E infatti è ancora tutta imballata! |
![]() |
![]() |
#1418 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Quote:
|
|
![]() |
![]() |
#1419 |
Senior Member
Iscritto dal: Apr 2002
Città: Verona
Messaggi: 370
|
Ciao
Ho corretto il percorso ma non funziona lo stesso.
![]() Poi ho provato a cliccarci sopra per aprirlo e mi da questo errore che trovi in allegato. ![]() ![]() ![]()
__________________
Ale: "Ho comprato a un'asta la chitarra di Chopin". Franz: "Ma non dire idiozie, Chopin non suonava la chitarra!". Ale: "E infatti è ancora tutta imballata! |
![]() |
![]() |
#1420 | |
Bannato
Iscritto dal: Aug 2003
Città: Modena ©2004 Tutti I Diritti Riservati
Messaggi: 938
|
Re: Ciao
Quote:
const locID = "ITAXX0087" aprilo con notepad e togli la A const locID = "ITXX0087" Salvalo e lancialo (devi essere collegato). Ultima modifica di PinHead : 25-11-2003 alle 20:47. |
|
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 23:05.