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
[WP7] AJOUTER DES IMAGES DANS LA MEDIA LIBRARY D'UN WINDOWS PHONE 7[WP7] AJOUTER DES IMAGES DANS LA MEDIA LIBRARY D'UN WINDOWS PHONE 7 par Audrey
L'émulateur Windows Phone 7, fourni avec la version Beta des outils développeurs n'inclut aucune image dans sa bibliothèque. Pas très pratique de tester son application lorsque l'on souhaite que l'utilisateur puisse choisir une image présente dans le télé...
Cliquez pour lire la suite de l'article par Audrey VIVE LES MOCKS ET LES POCOSVIVE LES MOCKS ET LES POCOS par vLabz
J'observe régulièrement autour de moi de la confusion à propos de ces deux termes et j'aimerais juste rappeler ce qu'ils signifient. Je ne suis bien sûr pas le mieux placé pour faire une leçon mais je vais faire de mon mieux pour mettre en valeur ce q...
Cliquez pour lire la suite de l'article par vLabz [WF4] WORKFLOW AND CUSTOM ACTIVITIES - BEST PRACTICES (4/5)[WF4] WORKFLOW AND CUSTOM ACTIVITIES - BEST PRACTICES (4/5) par JeremyJeanson
Vendredi dernier Microsoft a publié le quatrième épisode des bonnes pratiques pour coder ses activités custom dans WF4 : endpoint.tv - Workflow and Custom Activities - Best Practices (Part 4) . Tout comme pour les précédents épisodes, j'ai pris le temps d...
Cliquez pour lire la suite de l'article par JeremyJeanson DéVELOPPEMENT MOBILE : .NET COMPACT FRAMEWORK & LIMITATIONSDéVELOPPEMENT MOBILE : .NET COMPACT FRAMEWORK & LIMITATIONS par Pi-R
Introduction :
Le développement d'applications mobiles est quelque peu différent du développement d'applications sous Windows. En effet, le développement d'applications mobiles se base sur le .NET Compact Fra...
Cliquez pour lire la suite de l'article par Pi-R IPHONE VERSUS WP7 CODINGIPHONE VERSUS WP7 CODING par Nicolas
Je relais une présentation sur slideshare.net, qui compare le développement sur Iphone et Windows Phone 7, qui ma fait sourire. I phone versus windows phone 7 coding View more presentations from www.donburnett.com. J'aurais bien aimé une comparai...
Cliquez pour lire la suite de l'article par Nicolas
Logiciels
Academy System (12.0.2.0)ACADEMY SYSTEM (12.0.2.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Xilisoft iPod Vidéo Convertisseur 6 (6.0.3.0419)XILISOFT IPOD VIDéO CONVERTISSEUR 6 (6.0.3.0419)Xilisoft iPod Vidéo Convertisseur est un outil puissant de conversion d'iPod, facile à utiliser. ... Cliquez pour télécharger Xilisoft iPod Vidéo Convertisseur 6 Xilisoft iPhone Vidéo Convertisseur 6 (6.0.3.0419)XILISOFT IPHONE VIDéO CONVERTISSEUR 6 (6.0.3.0419)Xilisoft iPhone Vidéo Convertisseur est le meilleur logiciel de conversion iPhone qui peut facile... Cliquez pour télécharger Xilisoft iPhone Vidéo Convertisseur 6 Xilisoft iPad Vidéo Convertisseur 6 (6.0.3.0419)XILISOFT IPAD VIDéO CONVERTISSEUR 6 (6.0.3.0419)Il s'agit d'un logiciel polyvalent pour convertir les formats vidéo/audio populaires en formats p... Cliquez pour télécharger Xilisoft iPad Vidéo Convertisseur 6 Xilisoft HD Vidéo Convertisseur 6 (6.0.3.0421)XILISOFT HD VIDéO CONVERTISSEUR 6 (6.0.3.0421)Xilisoft HD Vidéo Convertisseur est un outil professionnel de conversion HDTV, conçu pour transfo... Cliquez pour télécharger Xilisoft HD Vidéo Convertisseur 6
|