Accueil > > > JOURNAL SUR IRC (EN DIALOGUE). SE RÉFÈRE À LEMONDE.FR (SOCKETS). ET MÉTÉO EN DEUX IMAGES
JOURNAL SUR IRC (EN DIALOGUE). SE RÉFÈRE À LEMONDE.FR (SOCKETS). ET MÉTÉO EN DEUX IMAGES
Information sur la source
Description
Ce script va chercher tous les titres des infos, et les rassemble dans une boîte de dialogue présentée comme un journal (moins bien, je l'admet; voir screen).
On peut pour l'instant choisir les infos parmis 10 rubriques :
A la UNE, International, France, Régional, Sciences, Sports, Société, Entreprises, Culture.
Derrière chaque titre d'info, il y a un lien qui va sur le site, à la page concernée.
Tout est mis-à-jour par LeMonde.fr
(C'est mon premier script en sockets donc soyez indulgents :p)
Il y a également la météo en images (copié d'un autre gars sur ce site, je sais plus qui), mais modifié. Il y a maintenant deux images côtes à côtes (temps et température, sinon deux jours de suite).
Pour lancer la fenêtre, tapez /journal
Il y a aussi /tps (ou /meteo ou /météo)
Source
- alias meteo tps
- alias météo tps
- alias tps { if ($dialog(tps)) { dialog -x tps tps } | dialog -mdr tps tps }
- dialog tps {
- title [/tps] Modify by ArKanis
- size -1 -1 400 180
- option dbu
- icon ArKanis/ArKanis.ico
- button "OK" 1, 355 3 40 10, center ok default
- icon 2, 0 8 200 175
- combo 3, 1 1 100 200, drop
- icon 4, 200 8 200 175
- link "" 5, 180 2 50 10
- check "" 6, 110 2 50 10
- combo 7, 250 1 100 200, drop
- }
-
- ON *:DIALOG:tps:*:*:{
- if ($devent == init) {
- did -c $dname 6
- did -o $dname 5 1 La Chaine météo
- did -o $dname 6 1 Synchro
- meteo.refaire
- return
- }
- if (($devent == sclick) && ($did == 2) && (%meteo.img1)) { if ($active != Status Window) { msg $active 12,1[ 0Consultez la carte de prévision météo $+(",$did(3).text,") sur ce lien : $+(www.lachainemeteo.com/ImagesLCM/,%meteo.img1) 12::14 S15cript By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ] | return } | echo -a 12,1[ 0Carte de prévision météo $+(",$did(3).text,") sur ce lien : $+(www.lachainemeteo.com/ImagesLCM/,%meteo.img1) 12::14 S15cript By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ] | return }
- if (($devent == sclick) && ($did == 4) && (%meteo.img2)) { if ($active != Status Window) { msg $active 12,1[ 0Consultez la carte de prévision météo $+(",$iif($did(7).text,$ifmatch,La Chaine météo),") sur ce lien : $+(www.lachainemeteo.com/ImagesLCM/,%meteo.img2) 12::14 S15cript By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ] | return } | echo -a 12,1[ 0Carte de prévision météo $+(",$iif($did(7).text,$ifmatch,La Chaine météo),") sur ce lien : $+(www.lachainemeteo.com/ImagesLCM/,%meteo.img2) 12::14 S15cript By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ] | return }
- if (($devent == sclick) && ($did == 5)) { url -n www.lachainemeteo.com | return }
- if (($devent == sclick) && ($did == 6)) { did -r $dname 3 | meteo.refaire | return }
- if (($devent == sclick) && ($did == 3)) {
- if ($did(6).state == 1) {
- if ($did(3).sel == 1) { tps.img 1 franNebP0AM.jpg | tps.img 2 franTmpP0AM.jpg }
- if ($did(3).sel == 2) { tps.img 1 franNebP0PM.jpg | tps.img 2 franTmpP0PM.jpg }
- if ($did(3).sel == 3) { tps.img 1 franNebP1AM.jpg | tps.img 2 franTmpP1AM.jpg }
- if ($did(3).sel == 4) { tps.img 1 franNebP1PM.jpg | tps.img 2 franTmpP1PM.jpg }
- if ($did(3).sel == 5) { tps.img 1 frantenJ2.jpg | tps.img 2 frantenJ3.jpg }
- if ($did(3).sel == 6) { tps.img 1 frantenJ4.jpg | tps.img 2 frantenJ5.jpg }
- if ($did(3).sel == 7) { tps.img 1 frantenJ6.jpg | tps.img 2 frantenJ7.jpg }
- if ($did(3).sel == 9) { tps.img 1 vigilance.jpg | tps.img 2 ImageRAD/comporad.jpg }
- if ($did(3).sel == 11) { tps.img 1 franventp0soiree.jpg | tps.img 2 franventp0nuit.jpg }
- if ($did(3).sel == 12) { tps.img 1 precinuit.jpg | tps.img 2 precimatin.jpg }
- if ($did(3).sel == 13) { tps.img 1 franNebP0nuit.jpg | tps.img 2 massair.jpg }
- else return
- }
- if ($did(6).state == 0) {
- if ($did(3).sel == 1) tps.img 1 franNebP0AM.jpg
- if ($did(3).sel == 2) tps.img 1 franTmpP0AM.jpg
- if ($did(3).sel == 3) tps.img 1 franNebP0PM.jpg
- if ($did(3).sel == 4) tps.img 1 franTmpP0PM.jpg
- if ($did(3).sel == 5) tps.img 1 franNebP1AM.jpg
- if ($did(3).sel == 6) tps.img 1 franTmpP1AM.jpg
- if ($did(3).sel == 7) tps.img 1 franNebP1PM.jpg
- if ($did(3).sel == 8) tps.img 1 franTmpP1PM.jpg
- if ($did(3).sel == 9) tps.img 1 frantenJ2.jpg
- if ($did(3).sel == 10) tps.img 1 frantenJ3.jpg
- if ($did(3).sel == 11) tps.img 1 frantenJ4.jpg
- if ($did(3).sel == 12) tps.img 1 frantenJ5.jpg
- if ($did(3).sel == 13) tps.img 1 frantenJ6.jpg
- if ($did(3).sel == 14) tps.img 1 frantenJ7.jpg
- if ($did(3).sel == 16) tps.img 1 vigilance.jpg
- if ($did(3).sel == 17) tps.img 1 ImageRAD/comporad.jpg
- if ($did(3).sel == 19) tps.img 1 franventp0soiree.jpg
- if ($did(3).sel == 20) tps.img 1 franventp0nuit.jpg
- if ($did(3).sel == 21) tps.img 1 precinuit.jpg
- if ($did(3).sel == 22) tps.img 1 precimatin.jpg
- if ($did(3).sel == 23) tps.img 1 franNebP0nuit.jpg
- if ($did(3).sel == 24) tps.img 1 massair.jpg
- }
- }
- if (($devent == sclick) && ($did == 7) && ($did(6).state == 0)) {
- if ($did(7).sel == 1) tps.img 2 franNebP0AM.jpg
- if ($did(7).sel == 2) tps.img 2 franTmpP0AM.jpg
- if ($did(7).sel == 3) tps.img 2 franNebP0PM.jpg
- if ($did(7).sel == 4) tps.img 2 franTmpP0PM.jpg
- if ($did(7).sel == 5) tps.img 2 franNebP1AM.jpg
- if ($did(7).sel == 6) tps.img 2 franTmpP1AM.jpg
- if ($did(7).sel == 7) tps.img 2 franNebP1PM.jpg
- if ($did(7).sel == 8) tps.img 2 franTmpP1PM.jpg
- if ($did(7).sel == 9) tps.img 2 frantenJ2.jpg
- if ($did(7).sel == 10) tps.img 2 frantenJ3.jpg
- if ($did(7).sel == 11) tps.img 2 frantenJ4.jpg
- if ($did(7).sel == 12) tps.img 2 frantenJ5.jpg
- if ($did(7).sel == 13) tps.img 2 frantenJ6.jpg
- if ($did(7).sel == 14) tps.img 2 frantenJ7.jpg
- if ($did(7).sel == 16) tps.img 2 vigilance.jpg
- if ($did(7).sel == 17) tps.img 2 ImageRAD/comporad.jpg
- if ($did(7).sel == 19) tps.img 2 franventp0soiree.jpg
- if ($did(7).sel == 20) tps.img 2 franventp0nuit.jpg
- if ($did(7).sel == 21) tps.img 2 precinuit.jpg
- if ($did(7).sel == 22) tps.img 2 precimatin.jpg
- if ($did(7).sel == 23) tps.img 2 franNebP0nuit.jpg
- if ($did(7).sel == 24) tps.img 2 massair.jpg
- }
- }
-
- alias meteo.refaire {
- if ($did(tps,6).state == 1) {
- did -o $dname 6 1 Synchro
- did -a $dname 3 Ce Matin
- did -a $dname 3 Cet Après Midi
- did -a $dname 3 Demain Matin
- did -a $dname 3 Demain Après Midi
- did -a $dname 3 Dans 2 et 3 jours
- did -a $dname 3 Dans 4 et 5 jours
- did -a $dname 3 Dans 6 et 7 jours
- did -a $dname 3 * * * * * * *
- did -a $dname 3 Vigilance et Radar
- did -a $dname 3 * * * * * * *
- did -a $dname 3 Vents
- did -a $dname 3 Précipitations
- did -a $dname 3 Soir et masses d'air
- did -c $dname 3 1
- did -r $dname 7 1
- tps.img 1 franNebP0AM.jpg | tps.img 2 franTmpP0AM.jpg
- }
- if ($did(tps,6).state == 0) {
- did -a $dname 3 Ce Matin (Temps)
- did -a $dname 3 Ce Matin (Température)
- did -a $dname 3 Cet Après Midi (Temps)
- did -a $dname 3 Cet Après Midi (Température)
- did -a $dname 3 Demain Matin (Temps)
- did -a $dname 3 Demain Matin (Température)
- did -a $dname 3 Demain Après Midi (Temps)
- did -a $dname 3 Demain Après Midi (Température)
- did -a $dname 3 Dans 2 jours
- did -a $dname 3 Dans 3 jours
- did -a $dname 3 Dans 4 jours
- did -a $dname 3 Dans 5 jours
- did -a $dname 3 Dans 6 jours
- did -a $dname 3 Dans 7 jours
- did -a $dname 3 * * * * * * *
- did -a $dname 3 Vigilance
- did -a $dname 3 Radar
- did -a $dname 3 * * * * * * *
- did -a $dname 3 Vents (1)
- did -a $dname 3 Vents (2)
- did -a $dname 3 Précipitations (1)
- did -a $dname 3 Précipitations (2)
- did -a $dname 3 Soir
- did -a $dname 3 Masses d'air
- did -c $dname 3 1
- did -a $dname 7 Ce Matin (Temps)
- did -a $dname 7 Ce Matin (Température)
- did -a $dname 7 Cet Après Midi (Temps)
- did -a $dname 7 Cet Après Midi (Température)
- did -a $dname 7 Demain Matin (Temps)
- did -a $dname 7 Demain Matin (Température)
- did -a $dname 7 Demain Après Midi (Temps)
- did -a $dname 7 Demain Après Midi (Température)
- did -a $dname 7 Dans 2 jours
- did -a $dname 7 Dans 3 jours
- did -a $dname 7 Dans 4 jours
- did -a $dname 7 Dans 5 jours
- did -a $dname 7 Dans 6 jours
- did -a $dname 7 Dans 7 jours
- did -a $dname 7 * * * * * * *
- did -a $dname 7 Vigilance
- did -a $dname 7 Radar
- did -a $dname 7 * * * * * * *
- did -a $dname 7 Vents (1)
- did -a $dname 7 Vents (2)
- did -a $dname 7 Précipitations (1)
- did -a $dname 7 Précipitations (2)
- did -a $dname 7 Soir
- did -a $dname 7 Masses d'air
- did -c $dname 7 1
- tps.img 1 franNebP0AM.jpg | tps.img 2 franNebP0AM.jpg
- }
- }
-
- alias tps.img {
- if (!$2) return
- sockclose $1
- set %mimg. [ $+ [ $1 ] ] $2
- sockopen $1 www.lachainemeteo.com 80
- }
-
- on *:sockopen:1:{ if ($sockerr) { return } | .remove meteotemp1.jpg | sockwrite -n 1 GET /ImagesLCM/ $+ %mimg.1 }
- on *:sockopen:2:{ if ($sockerr) { return } | .remove meteotemp2.jpg | sockwrite -n 2 GET /ImagesLCM/ $+ %mimg.2 }
-
- on *:sockread:1:{ sockread &a | bwrite meteotemp1.jpg -1 -1 &a }
- on *:sockread:2:{ sockread &a | bwrite meteotemp2.jpg -1 -1 &a }
-
- on *:sockclose:1:{ if ($did(tps,6).state == 1) { if (!%mimg.2) { did -g tps 2 meteotemp1.jpg | did -g tps 4 meteotemp2.jpg } | set %meteo.img1 %mimg.1 | unset %mimg.1 | return } | did -g tps 2 meteotemp1.jpg | set %meteo.img1 %mimg.1 | unset %mimg.1 | set %meteo.img2 %mimg.2 | unset %mimg.2 }
- on *:sockclose:2:{ if ($did(tps,6).state == 1) { if (!%mimg.1) { did -g tps 2 meteotemp1.jpg | did -g tps 4 meteotemp2.jpg } | set %meteo.img2 %mimg.2 | unset %mimg.1 | return } | did -g tps 4 meteotemp2.jpg | set %meteo.img1 %mimg.1 | unset %mimg.1 | set %meteo.img2 %mimg.2 | unset %mimg.2 }
-
- on *:sockopen:infos:{
- if ($sockerr) return
- if (!$hget(LeMonde,URL)) return
- ;echo -a k1 $hget(LeMonde,URL)
- sockwrite -n infos GET $hget(LeMonde,URL) HTTP/1.0
- sockwrite -n infos $crlf
- }
- on *:sockread:infos:{
- var %a
- sockread %a
- if ($sock($sockname).mark) {
- if ($regex(%a,<title>(.+)</title>)) hadd -m LeMonde Title $regml(1)
- if ($regex(%a,<link>(.+)</link>)) { write lemonde.txt $hget(LeMonde,Title) ¥¥¥ $regml(1) | hdel LeMonde Title }
- }
- if (<item> isin %a) sockmark $sockname 1
- }
- alias journal.repl {
- if (!$1) return
- return $replace($1-, é , é , ' , ' , è , è , æ , æ , à , à , Ï , $chr(207) , î , $chr(238) , ê , $chr(234) , î , $chr(238) , à , $chr(224) , ô , $chr(244) ,   , $chr(160) , ï , $chr(239) , ù , $chr(249) , É , $chr(201), ç , $chr(231))
- }
- on *:sockclose:infos:{
- if ($dialog(journal)) {
- var %t = 1
- while (%t <= 11) { did -o journal $calc(100 + %t) 1 %t | did -r journal $calc(200 + %t) 1 | inc %t }
- var %l = 1, %art = $lines(lemonde.txt), %max = $iif(%art > 11,11,%art)
- while %l <= %max {
- var %read = $read(lemonde.txt,%l), %news = $gettok(%read,1,165)
- hadd LeMonde $+(URL,%l) $gettok(%read,-1,165)
- if ($len(%news) > 80) var %news = $left(%news,90) ...
- did -o journal $calc(100 + %l) 1 $iif($right($gettok(%news,1,32),1) == $chr(58),$gettok(%news,1,58),Titre %l)
- did -o journal $calc(200 + %l) 1 $iif($gettok(%news,2-,58),$ifmatch,$gettok(%news,1-,32))
- inc %l
- }
- did -o journal 11 1 $calc(%l -1) Articles
- did -o journal 13 1 %art Articles au total
- var %t = 301
- while %t <= 311 {
- did -f journal %t
- inc %t
- }
- did -f journal 10
- }
- }
- alias lemonde { sockclose infos | write -c lemonde.txt | sockopen infos www.lemonde.fr 80 }
- alias journal { if ($dialog(journal)) { dialog -x journal } | dialog -md journal journal }
- dialog journal {
- title Journal LeMonde (by ArKanis)
- size -1 -1 170 255
- option dbu
- icon ArKanis/ArKanis.ico
- button "OK" 1, 149 1 20 10, ok default
- text "Le Monde" 2, 45 2 40 10, center
- text "" 3, 1 2 40 10
- combo 10, 89 1 60 80, drop
- text "" 11, 115 192 50 10, center
- link "LeMonde©" 12, 140 245 28 10
- text "" 13, 115 202 50 10, center
- link "Voir la page" 14, 126 225 50 10, center
- text "By ArKanis" 15, 115 235 50 10, center
- button "Météo" 16, 130 212 20 10
- box "" 101, 1 15 50 55
- link "" 201, 4 22 45 50
- box "" 102, 59 15 50 55
- link "" 202, 62 22 45 50
- box "" 103, 117 15 50 55
- link "" 203, 121 22 45 50
- box "" 104, 1 75 50 55
- link "" 204, 4 82 45 50
- box "" 105, 59 75 50 55
- link "" 205, 62 82 45 50
- box "" 106, 117 75 50 55
- link "" 206, 121 82 45 50
- box "" 107, 1 135 50 55
- link "" 207, 4 142 45 50
- box "" 108, 59 135 50 55
- link "" 208, 62 142 45 50
- box "" 109, 117 135 50 55
- link "" 209, 121 142 45 50
- box "" 110, 1 190 50 55
- link "" 210, 4 197 45 50
- box "" 111, 59 190 50 55
- link "" 211, 62 197 45 50
- button "s" 301, 42 61 8 8
- button "s" 302, 100 61 8 8
- button "s" 303, 158 61 8 8
- button "s" 304, 42 121 8 8
- button "s" 305, 100 121 8 8
- button "s" 306, 158 121 8 8
- button "s" 307, 42 181 8 8
- button "s" 308, 100 181 8 8
- button "s" 309, 158 181 8 8
- button "s" 310, 42 236 8 8
- button "s" 311, 100 236 8 8
- }
- ON *:DIALOG:journal:*:*:{
- if ($devent == init) {
- if (!$hget(LeMonde)) hmake LeMonde 5
- hdel LeMonde Title
- did -o $dname 3 1 $asctime(ddd dd/mm/yy)
- ;1
- did -a $dname 10 A la UNE
- did -a $dname 10 International
- did -a $dname 10 Europe
- did -a $dname 10 France
- ;5
- did -a $dname 10 Régions
- did -a $dname 10 Sciences
- did -a $dname 10 Sports
- did -a $dname 10 Société
- did -a $dname 10 Entreprises
- ;10
- did -a $dname 10 Culture
- did -a $dname 10 Médias
- did -a $dname 10 Aujourd'hui
- did -c $dname 10 1
- hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml
- lemonde
- }
- if (($devent == sclick) && ($did == 12)) url -n www.lemonde.fr
- if (($devent == sclick) && ($did == 16)) tps
- if (($devent == sclick) && ($did == 14)) url -n $hget(LeMonde,URL)
- if (($devent == sclick) && ($did == 10)) {
- if ($did(10).sel == 1) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml?xts=43260&xtor=3208
- if ($did(10).sel == 2) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3210,1-0,0.xml?xts=43260&xtor=3210
- if ($did(10).sel == 3) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3214,1-0,0.xml?xts=43260&xtor=3214
- if ($did(10).sel == 4) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3224,1-0,0.xml?xts=43260&xtor=3224
- if ($did(10).sel == 5) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3228,1-0,0.xml?xts=43260&xtor=3228
- if ($did(10).sel == 6) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3244,1-0,0.xml?xts=43260&xtor=3244
- if ($did(10).sel == 7) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3242,1-0,0.xml?xts=43260&xtor=3242
- if ($did(10).sel == 8) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3226,1-0,0.xml?xts=43260&xtor=3226
- if ($did(10).sel == 9) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3234,1-0,0.xml?xts=43260&xtor=3234
- if ($did(10).sel == 10) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3246,1-0,0.xml?xts=43260&xtor=3246
- if ($did(10).sel == 11) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3236,1-0,0.xml?xts=43260&xtor=3236
- if ($did(10).sel == 12) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3238,1-0,0.xml?xts=43260&xtor=3238
- lemonde
- }
- if (($devent == sclick) && ($did > 200) && ($did < 300)) {
- url -n $hget(LeMonde,$+(URL,$calc($did - 200)))
- }
- if (($did > 300) && ($devent == sclick)) {
- if (!$active) return
- unset %t
- if (!$did($calc($did - 100)).text) return
- if (titre !isin $did($calc($did -200))) var %t = 15 $+ $did($calc($did -200)) 12:0
- msg $active 12,1[ 0News "Le Monde" By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ::0 Partie : $did(10).seltext 12::0 %t $did($calc($did - 100)).text 12::0 Lien : $hget(LeMonde,$+(URL,$calc($did - 300))) 12]
- }
- }
alias meteo tps
alias météo tps
alias tps { if ($dialog(tps)) { dialog -x tps tps } | dialog -mdr tps tps }
dialog tps {
title [/tps] Modify by ArKanis
size -1 -1 400 180
option dbu
icon ArKanis/ArKanis.ico
button "OK" 1, 355 3 40 10, center ok default
icon 2, 0 8 200 175
combo 3, 1 1 100 200, drop
icon 4, 200 8 200 175
link "" 5, 180 2 50 10
check "" 6, 110 2 50 10
combo 7, 250 1 100 200, drop
}
ON *:DIALOG:tps:*:*:{
if ($devent == init) {
did -c $dname 6
did -o $dname 5 1 La Chaine météo
did -o $dname 6 1 Synchro
meteo.refaire
return
}
if (($devent == sclick) && ($did == 2) && (%meteo.img1)) { if ($active != Status Window) { msg $active 12,1[ 0Consultez la carte de prévision météo $+(",$did(3).text,") sur ce lien : $+(www.lachainemeteo.com/ImagesLCM/,%meteo.img1) 12::14 S15cript By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ] | return } | echo -a 12,1[ 0Carte de prévision météo $+(",$did(3).text,") sur ce lien : $+(www.lachainemeteo.com/ImagesLCM/,%meteo.img1) 12::14 S15cript By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ] | return }
if (($devent == sclick) && ($did == 4) && (%meteo.img2)) { if ($active != Status Window) { msg $active 12,1[ 0Consultez la carte de prévision météo $+(",$iif($did(7).text,$ifmatch,La Chaine météo),") sur ce lien : $+(www.lachainemeteo.com/ImagesLCM/,%meteo.img2) 12::14 S15cript By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ] | return } | echo -a 12,1[ 0Carte de prévision météo $+(",$iif($did(7).text,$ifmatch,La Chaine météo),") sur ce lien : $+(www.lachainemeteo.com/ImagesLCM/,%meteo.img2) 12::14 S15cript By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ] | return }
if (($devent == sclick) && ($did == 5)) { url -n www.lachainemeteo.com | return }
if (($devent == sclick) && ($did == 6)) { did -r $dname 3 | meteo.refaire | return }
if (($devent == sclick) && ($did == 3)) {
if ($did(6).state == 1) {
if ($did(3).sel == 1) { tps.img 1 franNebP0AM.jpg | tps.img 2 franTmpP0AM.jpg }
if ($did(3).sel == 2) { tps.img 1 franNebP0PM.jpg | tps.img 2 franTmpP0PM.jpg }
if ($did(3).sel == 3) { tps.img 1 franNebP1AM.jpg | tps.img 2 franTmpP1AM.jpg }
if ($did(3).sel == 4) { tps.img 1 franNebP1PM.jpg | tps.img 2 franTmpP1PM.jpg }
if ($did(3).sel == 5) { tps.img 1 frantenJ2.jpg | tps.img 2 frantenJ3.jpg }
if ($did(3).sel == 6) { tps.img 1 frantenJ4.jpg | tps.img 2 frantenJ5.jpg }
if ($did(3).sel == 7) { tps.img 1 frantenJ6.jpg | tps.img 2 frantenJ7.jpg }
if ($did(3).sel == 9) { tps.img 1 vigilance.jpg | tps.img 2 ImageRAD/comporad.jpg }
if ($did(3).sel == 11) { tps.img 1 franventp0soiree.jpg | tps.img 2 franventp0nuit.jpg }
if ($did(3).sel == 12) { tps.img 1 precinuit.jpg | tps.img 2 precimatin.jpg }
if ($did(3).sel == 13) { tps.img 1 franNebP0nuit.jpg | tps.img 2 massair.jpg }
else return
}
if ($did(6).state == 0) {
if ($did(3).sel == 1) tps.img 1 franNebP0AM.jpg
if ($did(3).sel == 2) tps.img 1 franTmpP0AM.jpg
if ($did(3).sel == 3) tps.img 1 franNebP0PM.jpg
if ($did(3).sel == 4) tps.img 1 franTmpP0PM.jpg
if ($did(3).sel == 5) tps.img 1 franNebP1AM.jpg
if ($did(3).sel == 6) tps.img 1 franTmpP1AM.jpg
if ($did(3).sel == 7) tps.img 1 franNebP1PM.jpg
if ($did(3).sel == 8) tps.img 1 franTmpP1PM.jpg
if ($did(3).sel == 9) tps.img 1 frantenJ2.jpg
if ($did(3).sel == 10) tps.img 1 frantenJ3.jpg
if ($did(3).sel == 11) tps.img 1 frantenJ4.jpg
if ($did(3).sel == 12) tps.img 1 frantenJ5.jpg
if ($did(3).sel == 13) tps.img 1 frantenJ6.jpg
if ($did(3).sel == 14) tps.img 1 frantenJ7.jpg
if ($did(3).sel == 16) tps.img 1 vigilance.jpg
if ($did(3).sel == 17) tps.img 1 ImageRAD/comporad.jpg
if ($did(3).sel == 19) tps.img 1 franventp0soiree.jpg
if ($did(3).sel == 20) tps.img 1 franventp0nuit.jpg
if ($did(3).sel == 21) tps.img 1 precinuit.jpg
if ($did(3).sel == 22) tps.img 1 precimatin.jpg
if ($did(3).sel == 23) tps.img 1 franNebP0nuit.jpg
if ($did(3).sel == 24) tps.img 1 massair.jpg
}
}
if (($devent == sclick) && ($did == 7) && ($did(6).state == 0)) {
if ($did(7).sel == 1) tps.img 2 franNebP0AM.jpg
if ($did(7).sel == 2) tps.img 2 franTmpP0AM.jpg
if ($did(7).sel == 3) tps.img 2 franNebP0PM.jpg
if ($did(7).sel == 4) tps.img 2 franTmpP0PM.jpg
if ($did(7).sel == 5) tps.img 2 franNebP1AM.jpg
if ($did(7).sel == 6) tps.img 2 franTmpP1AM.jpg
if ($did(7).sel == 7) tps.img 2 franNebP1PM.jpg
if ($did(7).sel == 8) tps.img 2 franTmpP1PM.jpg
if ($did(7).sel == 9) tps.img 2 frantenJ2.jpg
if ($did(7).sel == 10) tps.img 2 frantenJ3.jpg
if ($did(7).sel == 11) tps.img 2 frantenJ4.jpg
if ($did(7).sel == 12) tps.img 2 frantenJ5.jpg
if ($did(7).sel == 13) tps.img 2 frantenJ6.jpg
if ($did(7).sel == 14) tps.img 2 frantenJ7.jpg
if ($did(7).sel == 16) tps.img 2 vigilance.jpg
if ($did(7).sel == 17) tps.img 2 ImageRAD/comporad.jpg
if ($did(7).sel == 19) tps.img 2 franventp0soiree.jpg
if ($did(7).sel == 20) tps.img 2 franventp0nuit.jpg
if ($did(7).sel == 21) tps.img 2 precinuit.jpg
if ($did(7).sel == 22) tps.img 2 precimatin.jpg
if ($did(7).sel == 23) tps.img 2 franNebP0nuit.jpg
if ($did(7).sel == 24) tps.img 2 massair.jpg
}
}
alias meteo.refaire {
if ($did(tps,6).state == 1) {
did -o $dname 6 1 Synchro
did -a $dname 3 Ce Matin
did -a $dname 3 Cet Après Midi
did -a $dname 3 Demain Matin
did -a $dname 3 Demain Après Midi
did -a $dname 3 Dans 2 et 3 jours
did -a $dname 3 Dans 4 et 5 jours
did -a $dname 3 Dans 6 et 7 jours
did -a $dname 3 * * * * * * *
did -a $dname 3 Vigilance et Radar
did -a $dname 3 * * * * * * *
did -a $dname 3 Vents
did -a $dname 3 Précipitations
did -a $dname 3 Soir et masses d'air
did -c $dname 3 1
did -r $dname 7 1
tps.img 1 franNebP0AM.jpg | tps.img 2 franTmpP0AM.jpg
}
if ($did(tps,6).state == 0) {
did -a $dname 3 Ce Matin (Temps)
did -a $dname 3 Ce Matin (Température)
did -a $dname 3 Cet Après Midi (Temps)
did -a $dname 3 Cet Après Midi (Température)
did -a $dname 3 Demain Matin (Temps)
did -a $dname 3 Demain Matin (Température)
did -a $dname 3 Demain Après Midi (Temps)
did -a $dname 3 Demain Après Midi (Température)
did -a $dname 3 Dans 2 jours
did -a $dname 3 Dans 3 jours
did -a $dname 3 Dans 4 jours
did -a $dname 3 Dans 5 jours
did -a $dname 3 Dans 6 jours
did -a $dname 3 Dans 7 jours
did -a $dname 3 * * * * * * *
did -a $dname 3 Vigilance
did -a $dname 3 Radar
did -a $dname 3 * * * * * * *
did -a $dname 3 Vents (1)
did -a $dname 3 Vents (2)
did -a $dname 3 Précipitations (1)
did -a $dname 3 Précipitations (2)
did -a $dname 3 Soir
did -a $dname 3 Masses d'air
did -c $dname 3 1
did -a $dname 7 Ce Matin (Temps)
did -a $dname 7 Ce Matin (Température)
did -a $dname 7 Cet Après Midi (Temps)
did -a $dname 7 Cet Après Midi (Température)
did -a $dname 7 Demain Matin (Temps)
did -a $dname 7 Demain Matin (Température)
did -a $dname 7 Demain Après Midi (Temps)
did -a $dname 7 Demain Après Midi (Température)
did -a $dname 7 Dans 2 jours
did -a $dname 7 Dans 3 jours
did -a $dname 7 Dans 4 jours
did -a $dname 7 Dans 5 jours
did -a $dname 7 Dans 6 jours
did -a $dname 7 Dans 7 jours
did -a $dname 7 * * * * * * *
did -a $dname 7 Vigilance
did -a $dname 7 Radar
did -a $dname 7 * * * * * * *
did -a $dname 7 Vents (1)
did -a $dname 7 Vents (2)
did -a $dname 7 Précipitations (1)
did -a $dname 7 Précipitations (2)
did -a $dname 7 Soir
did -a $dname 7 Masses d'air
did -c $dname 7 1
tps.img 1 franNebP0AM.jpg | tps.img 2 franNebP0AM.jpg
}
}
alias tps.img {
if (!$2) return
sockclose $1
set %mimg. [ $+ [ $1 ] ] $2
sockopen $1 www.lachainemeteo.com 80
}
on *:sockopen:1:{ if ($sockerr) { return } | .remove meteotemp1.jpg | sockwrite -n 1 GET /ImagesLCM/ $+ %mimg.1 }
on *:sockopen:2:{ if ($sockerr) { return } | .remove meteotemp2.jpg | sockwrite -n 2 GET /ImagesLCM/ $+ %mimg.2 }
on *:sockread:1:{ sockread &a | bwrite meteotemp1.jpg -1 -1 &a }
on *:sockread:2:{ sockread &a | bwrite meteotemp2.jpg -1 -1 &a }
on *:sockclose:1:{ if ($did(tps,6).state == 1) { if (!%mimg.2) { did -g tps 2 meteotemp1.jpg | did -g tps 4 meteotemp2.jpg } | set %meteo.img1 %mimg.1 | unset %mimg.1 | return } | did -g tps 2 meteotemp1.jpg | set %meteo.img1 %mimg.1 | unset %mimg.1 | set %meteo.img2 %mimg.2 | unset %mimg.2 }
on *:sockclose:2:{ if ($did(tps,6).state == 1) { if (!%mimg.1) { did -g tps 2 meteotemp1.jpg | did -g tps 4 meteotemp2.jpg } | set %meteo.img2 %mimg.2 | unset %mimg.1 | return } | did -g tps 4 meteotemp2.jpg | set %meteo.img1 %mimg.1 | unset %mimg.1 | set %meteo.img2 %mimg.2 | unset %mimg.2 }
on *:sockopen:infos:{
if ($sockerr) return
if (!$hget(LeMonde,URL)) return
;echo -a k1 $hget(LeMonde,URL)
sockwrite -n infos GET $hget(LeMonde,URL) HTTP/1.0
sockwrite -n infos $crlf
}
on *:sockread:infos:{
var %a
sockread %a
if ($sock($sockname).mark) {
if ($regex(%a,<title>(.+)</title>)) hadd -m LeMonde Title $regml(1)
if ($regex(%a,<link>(.+)</link>)) { write lemonde.txt $hget(LeMonde,Title) ¥¥¥ $regml(1) | hdel LeMonde Title }
}
if (<item> isin %a) sockmark $sockname 1
}
alias journal.repl {
if (!$1) return
return $replace($1-, é , é , ' , ' , è , è , æ , æ , à , à , Ï , $chr(207) , î , $chr(238) , ê , $chr(234) , î , $chr(238) , à , $chr(224) , ô , $chr(244) ,   , $chr(160) , ï , $chr(239) , ù , $chr(249) , É , $chr(201), ç , $chr(231))
}
on *:sockclose:infos:{
if ($dialog(journal)) {
var %t = 1
while (%t <= 11) { did -o journal $calc(100 + %t) 1 %t | did -r journal $calc(200 + %t) 1 | inc %t }
var %l = 1, %art = $lines(lemonde.txt), %max = $iif(%art > 11,11,%art)
while %l <= %max {
var %read = $read(lemonde.txt,%l), %news = $gettok(%read,1,165)
hadd LeMonde $+(URL,%l) $gettok(%read,-1,165)
if ($len(%news) > 80) var %news = $left(%news,90) ...
did -o journal $calc(100 + %l) 1 $iif($right($gettok(%news,1,32),1) == $chr(58),$gettok(%news,1,58),Titre %l)
did -o journal $calc(200 + %l) 1 $iif($gettok(%news,2-,58),$ifmatch,$gettok(%news,1-,32))
inc %l
}
did -o journal 11 1 $calc(%l -1) Articles
did -o journal 13 1 %art Articles au total
var %t = 301
while %t <= 311 {
did -f journal %t
inc %t
}
did -f journal 10
}
}
alias lemonde { sockclose infos | write -c lemonde.txt | sockopen infos www.lemonde.fr 80 }
alias journal { if ($dialog(journal)) { dialog -x journal } | dialog -md journal journal }
dialog journal {
title Journal LeMonde (by ArKanis)
size -1 -1 170 255
option dbu
icon ArKanis/ArKanis.ico
button "OK" 1, 149 1 20 10, ok default
text "Le Monde" 2, 45 2 40 10, center
text "" 3, 1 2 40 10
combo 10, 89 1 60 80, drop
text "" 11, 115 192 50 10, center
link "LeMonde©" 12, 140 245 28 10
text "" 13, 115 202 50 10, center
link "Voir la page" 14, 126 225 50 10, center
text "By ArKanis" 15, 115 235 50 10, center
button "Météo" 16, 130 212 20 10
box "" 101, 1 15 50 55
link "" 201, 4 22 45 50
box "" 102, 59 15 50 55
link "" 202, 62 22 45 50
box "" 103, 117 15 50 55
link "" 203, 121 22 45 50
box "" 104, 1 75 50 55
link "" 204, 4 82 45 50
box "" 105, 59 75 50 55
link "" 205, 62 82 45 50
box "" 106, 117 75 50 55
link "" 206, 121 82 45 50
box "" 107, 1 135 50 55
link "" 207, 4 142 45 50
box "" 108, 59 135 50 55
link "" 208, 62 142 45 50
box "" 109, 117 135 50 55
link "" 209, 121 142 45 50
box "" 110, 1 190 50 55
link "" 210, 4 197 45 50
box "" 111, 59 190 50 55
link "" 211, 62 197 45 50
button "s" 301, 42 61 8 8
button "s" 302, 100 61 8 8
button "s" 303, 158 61 8 8
button "s" 304, 42 121 8 8
button "s" 305, 100 121 8 8
button "s" 306, 158 121 8 8
button "s" 307, 42 181 8 8
button "s" 308, 100 181 8 8
button "s" 309, 158 181 8 8
button "s" 310, 42 236 8 8
button "s" 311, 100 236 8 8
}
ON *:DIALOG:journal:*:*:{
if ($devent == init) {
if (!$hget(LeMonde)) hmake LeMonde 5
hdel LeMonde Title
did -o $dname 3 1 $asctime(ddd dd/mm/yy)
;1
did -a $dname 10 A la UNE
did -a $dname 10 International
did -a $dname 10 Europe
did -a $dname 10 France
;5
did -a $dname 10 Régions
did -a $dname 10 Sciences
did -a $dname 10 Sports
did -a $dname 10 Société
did -a $dname 10 Entreprises
;10
did -a $dname 10 Culture
did -a $dname 10 Médias
did -a $dname 10 Aujourd'hui
did -c $dname 10 1
hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml
lemonde
}
if (($devent == sclick) && ($did == 12)) url -n www.lemonde.fr
if (($devent == sclick) && ($did == 16)) tps
if (($devent == sclick) && ($did == 14)) url -n $hget(LeMonde,URL)
if (($devent == sclick) && ($did == 10)) {
if ($did(10).sel == 1) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml?xts=43260&xtor=3208
if ($did(10).sel == 2) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3210,1-0,0.xml?xts=43260&xtor=3210
if ($did(10).sel == 3) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3214,1-0,0.xml?xts=43260&xtor=3214
if ($did(10).sel == 4) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3224,1-0,0.xml?xts=43260&xtor=3224
if ($did(10).sel == 5) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3228,1-0,0.xml?xts=43260&xtor=3228
if ($did(10).sel == 6) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3244,1-0,0.xml?xts=43260&xtor=3244
if ($did(10).sel == 7) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3242,1-0,0.xml?xts=43260&xtor=3242
if ($did(10).sel == 8) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3226,1-0,0.xml?xts=43260&xtor=3226
if ($did(10).sel == 9) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3234,1-0,0.xml?xts=43260&xtor=3234
if ($did(10).sel == 10) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3246,1-0,0.xml?xts=43260&xtor=3246
if ($did(10).sel == 11) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3236,1-0,0.xml?xts=43260&xtor=3236
if ($did(10).sel == 12) hadd LeMonde URL http://www.lemonde.fr/rss/sequence/0,2-3238,1-0,0.xml?xts=43260&xtor=3238
lemonde
}
if (($devent == sclick) && ($did > 200) && ($did < 300)) {
url -n $hget(LeMonde,$+(URL,$calc($did - 200)))
}
if (($did > 300) && ($devent == sclick)) {
if (!$active) return
unset %t
if (!$did($calc($did - 100)).text) return
if (titre !isin $did($calc($did -200))) var %t = 15 $+ $did($calc($did -200)) 12:0
msg $active 12,1[ 0News "Le Monde" By 12-14A12-14r12-15K12-0a12-15n12-14i12-14s12- ::0 Partie : $did(10).seltext 12::0 %t $did($calc($did - 100)).text 12::0 Lien : $hget(LeMonde,$+(URL,$calc($did - 300))) 12]
}
}
Conclusion
Tout ce script est reprit dans mon propre script disponible sur http://www.arkanis.info
C'est assez régulièrement mis-à-jour, et ça reprend encore d'autres bonus.
Si ca peut être amélioré dites-le moi svp :p
HF
Historique
- 31 mai 2005 10:16:07 :
- Le site avait entièrement changé, du coup le code aussi :p
Il prend maintenant la page en .xml (RSS), donc beaucoup plus rapide
Code optimisé (hash-tables) et divers
Rajout de plusieurs images dans la météo (nuit, vents, ...)
- 07 mai 2006 21:30:23 :
- Changement des urls au niveau du site, donc rectification
Sources du même auteur
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
KLIENT : Sockets.NewClientSocket function [ par vbtom ]
Need help en VBS KLIENTSockets.NewClientSocket functiong un problème ac cette fonciton je sais pas quel type de parametre il faut passer: alias?foncti
Sockets [ par PetitCoeur ]
personne a un code ou un très bon tutorial pour expliquer les sockets en français de pref lolmerci d'avance ;)
sockets (comment on sen sert?) [ par nitro120 ]
svp comment on utilise les sockets ?JavaScript forever !
Urgent !!! [ par anzize ]
Bonjour tout le monde !Ca fait un siècle que je tourne en rond te, désespéré, je vous envoie donc un SOS.En fait, j'ai un projet java sur la concéptio
sockets-UDP@mirc-script [ par vbtom ]
Salut,Si quelquun arrive a utiliser les sockets UDP en mirc script je veux bien quil mexplique (:merci d'avance !a+vbom
mIRC :: SOCKETS.ERRORS [ par vbtom ]
Bonjour,Je cherche les descriptions des erreurs de sockets en mIRC script. Alors si vous avez ca :DMerci d'avance.a+ToM
IP2NICK [ par ypnoz ]
salut tout le monde, j'utilise Nonamescript , qui comprend IP2NICK (on rentre une Ip et il nous donne le nick) ...impossible de le faire fonctionner,
Comment faire un take-over un peu special ! ... [ par juki_webmaster ]
Bonjour .Je voudrais crée un take over à distance.Un bot contiendrait ce systemeet un operateur (donc un level important ) pourez executer comme :!tak
Tutorial : Les sockets TCP [ par SornDrixer ]
Voila encore un autre petit tutorial de ma création, expliquant comment utiliser les sockets tcp pour se connecter à un site web, et récupèrer une inf
IRC et les sockets [ par Koe ]
Bon en fait je voulais tester les sockets (vu que je ne connais pas et que je suis curieux de nature)Pour le moment j'arrive à ouvrir une connection (
|
Derniers Blogs
UNE JOLIE-HORLOGE ET PAS QU'UN PEU !UNE JOLIE-HORLOGE ET PAS QU'UN PEU ! par neodante
Pour les possesseurs d'iPhone, ça y est Bijin Tokei - qui se traduit littéralement en Français par " Jolie Horloge " - est arrivé et GRATUITEMENT s'il vous plaît ! Après la version Tokyo, Hokkaido, night club, racing, Gal, "pour les mademoiselles'", . voi...
Cliquez pour lire la suite de l'article par neodante TECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICESTECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICES par ROMELARD Fabrice
Animé par: Gaetan Bouveret et Julien Chomarat Business Connectivity Services (BCS) est dans SharePoint 2010 la version 2 de Business Data Catalog (BDC dans SharePoint 2007). Il s'agit de la solution permettant de visualiser des données provenan...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice [DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE[DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE par orion
Comme de nombreux geek, je suis un grand amateur de série TV et je rate régulièrement des épisodes de mes séries préférés. Une solution s'offre à vous avec ce merveilleux site : Tv Gorge - www.tvgorge.com Moteur de recherche à l'appui, vous pouvez ...
Cliquez pour lire la suite de l'article par orion TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010 par ROMELARD Fabrice
Animé par: Vincent Bellet et Baptiste Giraudier La BI dans SharePoint 2010, Les nouveaux services d'application dans SP2010 et SQL Server Reporting services 2008 R2. La BI dans SharePoint est généralisée pour tous afin de permettre à tous les coll...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Forum
RE : ON RAWMODERE : ON RAWMODE par WorldDMT
Cliquez pour lire la suite par WorldDMT AVERTISSMENT ET KIKKAVERTISSMENT ET KIKK par mouhcine951990
Cliquez pour lire la suite par mouhcine951990
Logiciels
DB-MAIN (9.1.0)DB-MAIN (9.1.0)DB-MAIN is a data-modeling and data-architecture tool. It is designed to help developers and anal... Cliquez pour télécharger DB-MAIN Xilisoft DPG Convertisseur (5.1.37.0120)XILISOFT DPG CONVERTISSEUR (5.1.37.0120)Xilisoft DPG Convertisseur offre aux fans de Nintendo DS une bonne solution leur permettant de dé... Cliquez pour télécharger Xilisoft DPG Convertisseur GraphicsGale (2.01.01)GRAPHICSGALE (2.01.01)GraphicsGale est un logiciel de PixelArt avec de nombreuse fonctionnalités permettant de réalisé ... Cliquez pour télécharger GraphicsGale Architecte 3D (Platinum 2010)ARCHITECTE 3D (PLATINUM 2010)Architecte 3D Platinium vous permet de concevoir facilement les plans votre future maison, de l'é... Cliquez pour télécharger Architecte 3D TeamViewer 5 (TeamViewer 5)TEAMVIEWER 5 (TEAMVIEWER 5)Dépanner un ami,expliquer une manipulation devient un jeu d'enfant.
Prise en main d'un autre ord... Cliquez pour télécharger TeamViewer 5
|