Accueil > > > HOROSCOPE
HOROSCOPE
Information sur la source
Description
Voici un addon qui vous permettra, soit de récupérer l'horoscope de n'importe quel signe immédiatement, soit d'afficher celui ci a chaque démarrage du script, ou une fois par jour.
Caractéristiques : horoscopes récupérés a partir de http://www.horoscope.fr/ (socket), un peu de $regex, données stockées dans un .ini
Je sais que l'utilité ne plaira pas a tout le monde (moi le premier ^^), mais si ça peut servir a quelqu'un... :D
Source
- dialog -l hor {
- title "Horoscope"
- size -1 -1 115 108
- option dbu
- tab "Horoscope", 1, 2 0 110 91
- text "Votre signe :", 3, 7 18 33 8, tab 1
- combo 4, 41 16 62 12, tab 1 drop
- edit "Veuillez choisir votre signe...", 5, 5 30 104 58, tab 1 vsbar read multi return
- tab "Options", 2
- radio "Afficher à chaque démarrage du script.", 6, 6 16 105 10, tab 2
- radio "Afficher une fois par jour.", 7, 6 26 74 10, tab 2
- radio "Ne pas afficher.", 8, 6 36 50 10, tab 2
- text "Raccourci :", 9, 6 47 38 10, tab 2
- edit "", 10, 41 46 42 10, tab 2 autohs
- text "Signe choisi :", 11, 6 60 33 8, tab 2
- combo 12, 41 58 60 11, tab 2 drop
- text "Note : Taper le raccourci affichera votre Horoscope dans la fenêtre active.", 13, 7 74 98 14, tab 2
- button "Fermer", 14, 40 94 37 12, cancel
- }
- on *:LOAD:{
- writeini $horpath hor rac !oro | writeini $horpath hor dem 6
- writeini $horpath hor signe Belier | writeini $horpath hor date $ctime($fulldate)
- echo -a [12Horoscope] Addon correctement installé ! Tapez /hor pour le lancer
- }
- on *:UNLOAD:{ .remove $horpath | echo -a [12Horoscope] Addon correctement désinstallé ! }
- on *:START:{
- var %o $readini($horpath,hor,dem)
- if (%o == 8) { halt }
- elseif ((%o == 6) || (%o == 7 && $ctime >= $readini($horpath,hor,date))) { horsock 2 }
- }
- on *:DIALOG:hor:*:*:{
- if ($devent == init) {
- did -c $dname $readini($horpath,hor,dem)
- if ($readini($horpath,hor,rac)) { did -a $dname 10 $ifmatch }
- didtok $dname 4,12 46 $horsignes
- }
- elseif ($devent == sclick) {
- if ($did == 2) { did -c $dname 12 $findtok($horsignes,$readini($horpath,hor,signe),1,46) }
- elseif ($did == 4) { horsock 1 | did -ra $dname 5 Veuillez patienter... }
- elseif ($istok(6.7.8,$did,46)) { writeini $horpath hor dem $did }
- elseif ($did == 12) { writeini $horpath hor signe $did(12) }
- }
- elseif ($devent == edit) { var %z $did(10) | $iif(%z,writeini,remini) $horpath hor rac %z }
- }
- on *:SOCKOPEN:hor:{
- var %m $readini($horpath,hor,m)
- remini $horpath hor hor
- if (%m == 1 && $dialog(hor)) { sockwrite -n hor GET /horoscopes/horoscopes.php?Signe= $+ $did(hor,4) }
- elseif (%m == 2) { sockwrite -n $sockname GET /horoscopes/horoscopes.php?Signe= $+ $readini($horpath,hor,signe) }
- sockwrite -n $sockname Host: www.horoscope.fr $+ $str($crlf,2)
- }
- on *:SOCKREAD:hor:{
- sockread %hor
- if (align="justify" isin %hor && <img !isin %hor) { writeini $horpath hor hor $addtok($readini($horpath,hor,hor),$deltags(%hor),47) }
- unset %hor
- }
- on *:SOCKCLOSE:hor:{
- var %n $readini($horpath,hor,m)
- tokenize 47 $readini($horpath,hor,hor)
- if (%n == 1 && $dialog(hor)) {
- did -ra hor 5 $+(Humeur :,$crlf,$1,$str($crlf,2),Amour :,$crlf,$2,$str($crlf,2),Travail :,$crlf,$3,$str($crlf,2),Vitalité :,$crlf,$4)
- remini $horpath hor m | remini $horpath hor hor
- }
- if (%n == 2) {
- var %p echo -a [12Horoscope]
- %p Voici votre horoscope actuel $+($chr(40),,$readini($horpath,hor,signe),,$chr(41)) :
- %p Humeur : $1 | %p Amour : $2 | %p Travail : $3 | %p Vitalité : $4
- writeini $horpath hor date $ctime($puttok($fulldate,23:59:59,4,32))
- }
- }
- on *:INPUT:*:{ if ($$readini($horpath,hor,rac) == $1-) { horsock 2 | haltdef } }
- alias -l horpath return $scriptdirhoroscope.ini
- alias -l horsock { writeini $horpath hor m $1 | sockclose hor | sockopen hor www.horoscope.fr 80 }
- alias -l deltags { var %b = $regsub($1-,/(?:<.+?>)/g,,%i) | return %i }
- alias -l horsignes return Belier.Taureau.Gemeaux.Cancer.Lion.Vierge.Balance.Scorpion.Sagittaire.Capricorne.Verseau.Poissons
- alias hor dialog $+(-,$iif($dialog(hor),v,m)) hor hor
dialog -l hor {
title "Horoscope"
size -1 -1 115 108
option dbu
tab "Horoscope", 1, 2 0 110 91
text "Votre signe :", 3, 7 18 33 8, tab 1
combo 4, 41 16 62 12, tab 1 drop
edit "Veuillez choisir votre signe...", 5, 5 30 104 58, tab 1 vsbar read multi return
tab "Options", 2
radio "Afficher à chaque démarrage du script.", 6, 6 16 105 10, tab 2
radio "Afficher une fois par jour.", 7, 6 26 74 10, tab 2
radio "Ne pas afficher.", 8, 6 36 50 10, tab 2
text "Raccourci :", 9, 6 47 38 10, tab 2
edit "", 10, 41 46 42 10, tab 2 autohs
text "Signe choisi :", 11, 6 60 33 8, tab 2
combo 12, 41 58 60 11, tab 2 drop
text "Note : Taper le raccourci affichera votre Horoscope dans la fenêtre active.", 13, 7 74 98 14, tab 2
button "Fermer", 14, 40 94 37 12, cancel
}
on *:LOAD:{
writeini $horpath hor rac !oro | writeini $horpath hor dem 6
writeini $horpath hor signe Belier | writeini $horpath hor date $ctime($fulldate)
echo -a [12Horoscope] Addon correctement installé ! Tapez /hor pour le lancer
}
on *:UNLOAD:{ .remove $horpath | echo -a [12Horoscope] Addon correctement désinstallé ! }
on *:START:{
var %o $readini($horpath,hor,dem)
if (%o == 8) { halt }
elseif ((%o == 6) || (%o == 7 && $ctime >= $readini($horpath,hor,date))) { horsock 2 }
}
on *:DIALOG:hor:*:*:{
if ($devent == init) {
did -c $dname $readini($horpath,hor,dem)
if ($readini($horpath,hor,rac)) { did -a $dname 10 $ifmatch }
didtok $dname 4,12 46 $horsignes
}
elseif ($devent == sclick) {
if ($did == 2) { did -c $dname 12 $findtok($horsignes,$readini($horpath,hor,signe),1,46) }
elseif ($did == 4) { horsock 1 | did -ra $dname 5 Veuillez patienter... }
elseif ($istok(6.7.8,$did,46)) { writeini $horpath hor dem $did }
elseif ($did == 12) { writeini $horpath hor signe $did(12) }
}
elseif ($devent == edit) { var %z $did(10) | $iif(%z,writeini,remini) $horpath hor rac %z }
}
on *:SOCKOPEN:hor:{
var %m $readini($horpath,hor,m)
remini $horpath hor hor
if (%m == 1 && $dialog(hor)) { sockwrite -n hor GET /horoscopes/horoscopes.php?Signe= $+ $did(hor,4) }
elseif (%m == 2) { sockwrite -n $sockname GET /horoscopes/horoscopes.php?Signe= $+ $readini($horpath,hor,signe) }
sockwrite -n $sockname Host: www.horoscope.fr $+ $str($crlf,2)
}
on *:SOCKREAD:hor:{
sockread %hor
if (align="justify" isin %hor && <img !isin %hor) { writeini $horpath hor hor $addtok($readini($horpath,hor,hor),$deltags(%hor),47) }
unset %hor
}
on *:SOCKCLOSE:hor:{
var %n $readini($horpath,hor,m)
tokenize 47 $readini($horpath,hor,hor)
if (%n == 1 && $dialog(hor)) {
did -ra hor 5 $+(Humeur :,$crlf,$1,$str($crlf,2),Amour :,$crlf,$2,$str($crlf,2),Travail :,$crlf,$3,$str($crlf,2),Vitalité :,$crlf,$4)
remini $horpath hor m | remini $horpath hor hor
}
if (%n == 2) {
var %p echo -a [12Horoscope]
%p Voici votre horoscope actuel $+($chr(40),,$readini($horpath,hor,signe),,$chr(41)) :
%p Humeur : $1 | %p Amour : $2 | %p Travail : $3 | %p Vitalité : $4
writeini $horpath hor date $ctime($puttok($fulldate,23:59:59,4,32))
}
}
on *:INPUT:*:{ if ($$readini($horpath,hor,rac) == $1-) { horsock 2 | haltdef } }
alias -l horpath return $scriptdirhoroscope.ini
alias -l horsock { writeini $horpath hor m $1 | sockclose hor | sockopen hor www.horoscope.fr 80 }
alias -l deltags { var %b = $regsub($1-,/(?:<.+?>)/g,,%i) | return %i }
alias -l horsignes return Belier.Taureau.Gemeaux.Cancer.Lion.Vierge.Balance.Scorpion.Sagittaire.Capricorne.Verseau.Poissons
alias hor dialog $+(-,$iif($dialog(hor),v,m)) hor hor
Conclusion
Pour lancer l'addon : /hor
Et surtout, il faut accepter le message de mIRC (run initialization commands)
voila ^_^
Historique
- 02 mai 2005 21:00:22 :
- - Ajout d'un zip, apparemment, la source est pas super bien mise en page...
- 03 mai 2005 07:16:44 :
- - Optimisation du code, merci tout le monde :)
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
SQL SERVER : QUERY NOTIFICATION OU COMMENT êTRE NOTIFIé DE MODIFICATIONS DE DONNéES CôTé APPLICATIONSQL SERVER : QUERY NOTIFICATION OU COMMENT êTRE NOTIFIé DE MODIFICATIONS DE DONNéES CôTé APPLICATION par christian
Cette fonctionnalité à vue le jour dans Ado.Net 2.0 et s'appuie sur SQL Server 2005 (et plus) même si elle fonctionne avec SQL Server 2000. Le principe de fonctionnement côté applicatif est assez simple, on fournit une requête et lorsque le résultat d...
Cliquez pour lire la suite de l'article par christian [WF4] UN BINDING ACTIVITY/ACTIVITYDESIGNER QUI PASSE MAL?[WF4] UN BINDING ACTIVITY/ACTIVITYDESIGNER QUI PASSE MAL? par JeremyJeanson
Certain d'entre vous on peut être vécu cette situation embarrassante après quelques temps passer avec WF4 : Au début avec mon " ActivityDesigner" , tout allait bien. Et puis un jour j'ai au des problèmes de " Binding" . Alors nous sommes allé sur le site ...
Cliquez pour lire la suite de l'article par JeremyJeanson MYTIC - SHAREPOINT 2010 : DéJà UN MYTHE MICROSOFT ?MYTIC - SHAREPOINT 2010 : DéJà UN MYTHE MICROSOFT ? par junarnoalg
La prochaine session de MyTIC aura lieu à Namur, le 23 mars prochain. Pendant presque une heure, nous parlerons de SharePoint 2010. Voici un aperçu du programme.
Accueil : 17h30 Début de la session : 18h00 - Les nouvelles int...
Cliquez pour lire la suite de l'article par junarnoalg [MIX10] KEYNOTE DEUXIèME JOURNéE - INTERNET EXPLORER 9, HTML5, VISUAL STUDIO 2010, ODATA[MIX10] KEYNOTE DEUXIèME JOURNéE - INTERNET EXPLORER 9, HTML5, VISUAL STUDIO 2010, ODATA par cyril
Le deuxième keynote du mix fut très riche en contenu. Internet Explorer 9 Juste un après le lancement de Internet Explorer 8, Microsoft a dévoilé les nouveautés de Internet Explorer 9. Désormais, IE supportera HTML5, SVG et CSS3. L'élément ...
Cliquez pour lire la suite de l'article par cyril
Logiciels
Academy System (10.9.4.0)ACADEMY SYSTEM (10.9.4.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Xilisoft Convertisseur Vidéo Ultimate (5.1.39.0305)XILISOFT CONVERTISSEUR VIDéO ULTIMATE (5.1.39.0305)Xilisoft Convertisseur Vidéo Ultimate est un outil puissant de conversion vidéo, facile à utilise... Cliquez pour télécharger Xilisoft Convertisseur Vidéo Ultimate Xilisoft DVD Ripper Ultimate (5.0.64.0304)XILISOFT DVD RIPPER ULTIMATE (5.0.64.0304)Xilisoft DVD Ripper Ultimate est un logiciel excellent pour copier et convertir DVD vers presque ... Cliquez pour télécharger Xilisoft DVD Ripper Ultimate Rigs of Rods (63.3)RIGS OF RODS (63.3)c'est un jeu de multi-simulation camions,autobus voitures, avions, bateaux, hélicoptère avec défo... Cliquez pour télécharger Rigs of Rods
|