Une fenêtre où les favoris sont accessible par simple click et simple d'utilisation
C'est mon premier add-on à peu près potable, construit uniquement en dialogue.
Il a été crée sur mIRC 6.03 sur w98 et fonctionne sans souci avec ces configs.
Je suis a l'écoute de vos réactions et commentaires car je désire évoluer dans le scripting....merci de votre comprehension :p
En esperant que quelqu'un y trouve son bonheur !!!
Source / Exemple :
; Raccourcis internet par NeO_Reloaded ---- Juin 2003
;
; Votre répertoire source de mirc ne doit pas contenir de fichier web.txt
; résolution conseillée : 1024 X 768
; Les alias "general" et "liens" doivent etre libre dans votre script pensez a renomer tout ça si c'est oQp...
;
; Des heures et de heures de galère pour un si petit add-on, faut bien débuter un jour :p
; Si vous y faites des modifs pensez à moi je veux évoluer dans le scripting.... lol y'a du boulot
; toniolol@hotmail.com
;
;Améliorations:
;=> V2.1 : correction de bugs lors de la navigation précédent/suivant et des menu
;=> V2.0 : mise en dialogue de la fenetre des raccourcis et ajouts de fonctions
;=> V1.0 : 1ere mouture avec simple fenetre (/window) et fonctions de base (ajout/suppression)
;
;
alias liens {
set %suiv 0
set %init 0
general
if ( $exists(web.txt) == $false ) {
$dialog(Confirmation,Confirm,-3)
dialog -x Favoris Favoris
dialog -md Favoris Favoris
}
}
alias general {
unset %line*
unset %place*
set %ligne 1
set %max $lines(web.txt)
:boucle2
if ( %ligne > 12 ) { goto fin2 }
if ( %ligne > %max ) { goto fin2 }
set %ligne2 %ligne | inc %ligne2 %suiv
set %place $+ %ligne %ligne2
set %line $+ %ligne $read(web.txt,%ligne2)
inc %ligne
goto boucle2
:fin2
if ( %init != 0 ) { dialog -x Favoris Favoris }
dialog -md Favoris Favoris
}
dialog Favoris {
option dbu
Title "Favoris internet V2.1"
size 250 130 215 225
button %line1,1, 25 10 175 10
button %line2,2, 25 25 175 10
button %line3,3, 25 40 175 10
button %line4,4, 25 55 175 10
button %line5,5, 25 70 175 10
button %line6,6, 25 85 175 10
button %line7,7, 25 100 175 10
button %line8,8, 25 115 175 10
button %line9,9, 25 130 175 10
button %line10,10, 25 145 175 10
button %line11,11, 25 160 175 10
button %line12,12, 25 175 175 10
button "&Précédent",13, 10 205 50 10
button "&Suivant",14, 10 220 50 10
button "&Ajouter",15, 82 205 50 10
button "&Effacer",16, 82 220 50 10
button "A p&ropos...",17, 155 205 50 10
button "&Quitter",18, 155 220 50 10,ok
edit "mots clés",19, 35 190 100 10
button "&Google !",20, 140 190 50 10,default
Text %place1,21, 15 11 10 10
Text %place2,22, 15 26 10 10
Text %place3,23, 15 41 10 10
Text %place4,24, 15 56 10 10
Text %place5,25, 15 71 10 10
Text %place6,26, 15 86 10 10
Text %place7,27, 15 101 10 10
Text %place8,28, 15 116 10 10
Text %place9,29, 15 131 10 10
Text %place10,30, 15 146 10 10
Text %place11,31, 15 161 10 10
Text %place12,32, 15 176 10 10
menu "&Déplacement",60
item "&Précédent",70
item "&Suivant",80
item "&Recharger",90
menu "&Options",100
item "&Ajouter un lien",110
item "&Remplacer un lien",120
item "&Intervertir deux liens",130
item "&Effacer un lien",140
item "Effacer &tout",150
menu "&Recherche Google",160
item "&Effectuer la recherche",170
;menu " ",180
menu "&A propos de...",190
item "&Info sur l'add-on",200
;menu " ",210
menu "&Quitter",220
item "&Etes-vous sûr ?",230
}
on *:dialog:Favoris:sclick:1:{
set %ligne3 %ligne2
dec %ligne3 11
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:2:{
set %ligne3 %ligne2
dec %ligne3 10
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:3:{
set %ligne3 %ligne2
dec %ligne3 9
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:4:{
set %ligne3 %ligne2
dec %ligne3 8
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:5:{
set %ligne3 %ligne2
dec %ligne3 7
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:6:{
set %ligne3 %ligne2
dec %ligne3 6
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:7:{
set %ligne3 %ligne2
dec %ligne3 5
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:8:{
set %ligne3 %ligne2
dec %ligne3 4
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:9:{
set %ligne3 %ligne2
dec %ligne3 3
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:10:{
set %ligne3 %ligne2
dec %ligne3 2
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:11:{
set %ligne3 %ligne2
dec %ligne3 1
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:12:{
set %ligne3 %ligne2
if ( $read(web.txt,%ligne3) == $null ) { halt }
run $read(web.txt,%ligne3)
}
on *:dialog:Favoris:sclick:13:{
dec %suiv 12
if ( %suiv < 0 ) { inc %suiv 12 | halt }
set %init 1
general
}
on *:dialog:Favoris:sclick:14:{
inc %suiv 12
if ( $read(web.txt,%ligne2) == $null ) { dec %suiv 12 | halt }
set %init 1
general
}
on *:dialog:Favoris:sclick:15:{ inc %max | dialog -md Ajouter Ajouter }
on *:dialog:Favoris:sclick:16:{ dialog -md Effacer Effacer }
on *:dialog:Favoris:sclick:17:{ dialog -md About About }
on *:dialog:Favoris:sclick:20:{
set %req $did(Favoris,19).text
run http://www.google.fr/search?q= $+ %req
}
on *:dialog:Favoris:menu:70:{
dec %suiv 12
if ( %suiv < 0 ) { inc %suiv 12 | halt }
set %init 1
general
}
on *:dialog:Favoris:menu:80:{
inc %suiv 12
if ( $read(web.txt,%ligne2) == $null ) { dec %suiv 12 | halt }
set %init 1
general
}
on *:dialog:Favoris:menu:90:{ dialog -x Favoris Favoris | liens }
on *:dialog:Favoris:menu:110:{ inc %max | dialog -md Ajouter Ajouter }
on *:dialog:Favoris:menu:120:{ dialog -md Remplacer Remplacer }
on *:dialog:Favoris:menu:130:{ dialog -md Intervertir Intervertir }
on *:dialog:Favoris:menu:140:{ dialog -md Effacer Effacer }
on *:dialog:Favoris:menu:150:{ dialog -md Effall Effall }
on *:dialog:Favoris:menu:170:{ unset %req | dialog -md Google Google }
on *:dialog:Favoris:menu:200:{ dialog -md About About }
on *:dialog:Favoris:menu:230:{ echo 4 -a Add-on "liens internet" par NeO_Reloaded :p (Juin 2003) | dialog -x Favoris Favoris }
dialog Confirm {
option dbu
title "Confirmation"
size 300 300 200 65
text "Je vais créer le fichier web.txt dans le répertoire de mIRC",1, 28 11 250 15
text "Veuillez cliquer pour continuer",2, 55 22 250 15
button "&Continuer",3, 44 40 100 15,ok
}
Dialog Ajouter {
option dbu
title "Ajouter un lien"
size 300 250 200 85
text "Tapez l'adresse à enregistrer :",1, 10 7 100 10
edit "http://www.",2, 10 15 180 10
text "A quelle place voulez-vous positionner ce lien ?",3, 10 40 150 10
edit %max,4, 137 39 18 10
button "&Valider",5, 30 60 47 15,ok,default
button "&Annuler",6, 115 60 47 15
text "",7, 137 30 65 10
}
on *:dialog:Ajouter:sclick:6:{
dialog -x Ajouter Ajouter
dialog -x Favoris Favoris
liens
}
on *:dialog:Ajouter:sclick:5:{
if ($did(Ajouter,4).text < 1) {
did -o Ajouter 7 1 1 au minimum !!!!! | halt }
write -il $did(Ajouter,4).text web.txt $did(Ajouter,2).text
dialog -x Ajouter Ajouter
dialog -x Favoris Favoris
set %init 0
general
}
dialog Effacer {
option dbu
title "Effacer un lien"
size 300 300 190 65
text "Indiquez le numéro du lien à effacer :",1, 5 15 100 10
edit "",2, 100 14 15 10
text "( de 1 à",3, 122 15 50 10
text %max,4, 142 15 15 10
text ")",5, 150 15 65 10
button "&Valider",6, 30 40 47 15,ok,default
button "&Annuler",7, 115 40 47 15
}
on *:dialog:Effacer:sclick:7:{
dialog -x Effacer Effacer
dialog -x Favoris Favoris
liens
}
on *:dialog:Effacer:sclick:6:{
if ($did(Effacer,2).text > %max) {
did -a Effacer 5 ) !!!!!!!! | halt }
if ($did(Effacer,2).text < 1) {
did -a Effacer 5 ) !!!!!!!! | halt }
write -dl $did(Effacer,2).text web.txt
dialog -x Effacer Effacer
dialog -x Favoris Favoris
set %init 0
general
}
dialog About {
option dbu
title "A propos de...........Favoris Internet V2.1"
size 300 300 155 80
text "Add-on créé pour vous simplifier la navigation",1, 17 10 150 10
text "internet lors de l'utilisation de mIRC.",2, 17 20 150 10
text "NeO_Reloaded --- Juin 2003",3, 17 67 75 10
link "Me joindre",4, 105 67 50 10
button "&Okay",5, 40 40 70 15,ok
text "",6, 105 25 50 10
}
on *:dialog:About:sclick:4:{
run mailto:toniolol@hotmail.com
}
on *:dialog:About:dclick:*:{
dialog -t About A PROPOS DE......Easter egg......lol :p
did -a About 6 TonioScript $chr(169) LOL
did -a About 5 :p ---- Okay ---- :p
halt
}
dialog Google {
option dbu
title "Recherche sur Google.fr"
size 300 300 190 60
text "Entrez les mots clefs :",1, 5 5 100 10
edit "",2, 5 17 175 10
button "&Chercher !",3, 60 37 60 15,ok,default
}
on *:dialog:Google:sclick:3:{ .set %req $did(Google,2).text
if (%req == $null) {
.did -o Google 1 1 -----> Et les mots clefs alors ?!? <------- | halt }
run http://www.google.fr/search?q= $+ %req
}
Dialog Intervertir {
option dbu
title "Intervertir deux liens"
size 300 250 200 85
text "Tapez le numéro du premier lien :",1, 10 14 100 10
edit "0",2, 107 13 15 10
text "Tapez le numéro du second lien :",3, 10 38 150 10
edit "0",4, 107 38 15 10
button "&Valider",5, 30 60 47 15,ok,default
button "&Annuler",6, 115 60 47 15
text "( de 1 à ",7, 132 14 50 10
text %max,8, 152 14 15 10
text ")",9, 160 14 65 10
text "( de 1 à",10, 132 38 50 10
text %max,11, 152 38 15 10
text ")",12, 160 38 65 10
}
on *:dialog:Intervertir:sclick:6:{
dialog -x Intervertir Intervertir
dialog -x Favoris Favoris
liens
}
on *:dialog:Intervertir:sclick:5:{
if ($did(Intervertir,2).text > %max) {
did -a Intervertir 9 ) !!!!!!!! | halt }
if ($did(Intervertir,2).text < 1) {
did -a Intervertir 9 ) !!!!!!!! | halt }
if ($did(Intervertir,4).text > %max) {
did -a Intervertir 12 ) !!!!!!!! | halt }
if ($did(Intervertir,4).text < 1 ) {
did -a Intervertir 12 ) !!!!!!!! | halt }
set %lien1 $read(web.txt,$did(Intervertir,2).text)
set %ligne1 $readn
set %lien2 $read(web.txt,$did(Intervertir,4).text)
set %ligne2 $readn
write -l $+ %ligne1 web.txt %lien2
write -l $+ %ligne2 web.txt %lien1
dialog -x Intervertir Intervertir
dialog -x Favoris Favoris
set %init 0
general
}
Dialog Remplacer {
option dbu
title "Remplacer un lien"
size 300 250 200 85
text "Tapez l'adresse à enregistrer :",1, 10 7 100 10
edit "http://www.",2, 10 15 180 10
text "Quel lien voulez-vous remplacer ?",3, 10 40 150 10
edit "0",4, 107 39 18 10
button "&Valider",5, 30 60 47 15,ok,default
button "&Annuler",6, 115 60 47 15
text "( de 1 à ",7, 132 40 50 10
text %max,8, 152 40 15 10
text ")",9, 160 40 65 10
}
on *:dialog:Remplacer:sclick:6:{
dialog -x Remplacer Remplacer
dialog -x Favoris Favoris
liens
}
on *:dialog:Remplacer:sclick:5:{
if ($did(Remplacer,4).text > %max) {
did -a Remplacer 9 ) !!!!!!!! | halt }
if ($did(Remplacer,4).text < 1) {
did -a Remplacer 9 ) !!!!!!!! | halt }
write -l $did(Remplacer,4).text web.txt $did(Remplacer,2).text
dialog -x Remplacer Remplacer
dialog -x Favoris Favoris
set %init 0
general
}
dialog Effall {
option dbu
title "Confirmation de suppression"
size 300 300 150 65
text "Vous êtes sur le point d'écraser tous vos liens !",1, 18 12 150 10,ok
button "&Confirmer",2, 17 32 35 15
button "&Annuler",3, 92 32 35 15,default
}
on *:dialog:Effall:sclick:3:{
dialog -x Effall Effall
dialog -x Favoris Favoris
liens
}
on *:dialog:Effall:sclick:2:{
write -c web.txt
dialog -x Effall Effall
dialog -x Favoris Favoris
liens
}
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.