1/5 (7 avis)
Snippet vu 6 589 fois - Téléchargée 28 fois
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] } }
4 sept. 2007 à 14:19
possible d'avoir les news direct sur le salon et non en boite de dial ( genre toutes les heures ou demi heures les news apparaissent) merçi
24 avril 2004 à 11:39
24 avril 2004 à 09:31
C'est quoi l'interêt ? Autant utiliser /var alors.
En tout cas, c'est relativement bien codé, et c'est original.
Bon boulot !
9/10
24 avril 2004 à 08:36
24 avril 2004 à 01:54
Rien d'autre à dire
7/10
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.