Trouver une ressource (Nouvelle version du moteur, plus rapide & pertinent, essayez le !)
Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !
RECHERCHE INTERNET EN DIALOG AVEC CHOIX MOTEUR DE RECHERCHE ET NAVIGATEUR
Information sur la source
Description
Salut, je vous presente cette petite addon qui vous permet d'effectuer des recherches internet sur 4 moteurs de recherche avec 4 navigateurs differents. Le code n'est pas tres compliquer certes mais c'est bien utile ... Je n'ai pas encore utilisé les sockets car je ne maitrise pas encore mais bon peut etre un jour :)
Pour ouvrir le dialog faites : /rech
J'ai tout dit. @+
Source
- alias rech { dialog -m Recherche Recherche }
- dialog Recherche {
- title "Recherche internet"
- size -1 -1 160 157
- option dbu
- box "Choix du moteur de recherche", 1, 4 3 153 39
- radio "Google", 2, 8 14 50 10, group
- radio "Lycos", 3, 104 14 50 10
- radio "Voila", 4, 8 27 50 10
- radio "Yahoo", 5, 104 27 50 10
- box "Choix du navigateur", 6, 4 50 153 40
- radio "Iexplore", 7, 8 64 50 10, group
- radio "Firefox", 8, 8 77 50 10
- radio "Opera", 9, 104 65 50 10
- radio "Netscape", 10, 104 76 50 10
- box "Recherche", 11, 4 97 153 50
- edit "", 12, 11 114 134 10
- button "Ok", 13, 65 128 37 12, ok
- text "Texte de la recherche a effectuer", 14, 39 105 82 8
- }
- on *:dialog:Recherche:*:*:{
- if ($devent == sclick && $did == 13) {
- var %navigateur $gettok(Iexplore.Firefox.Opera.Netscape,$findtok($+($did(7).state,.,$did(8).state,.,$did(9).state,.,$did(10).state),1,1,46),46)
- var %moteur $gettok(Google.Lycos.Voila.Yahoo,$findtok($+($did(2).state,.,$did(3).state,.,$did(4).state,.,$did(5).state),1,1,46),46)
- if (%moteur == google) {
- var %z $replace($did(12),$chr(32),+) , %x http://www.google.fr/search?hl=fr&q= , %y &btnG=Recherche+Google&meta=lr%3Dlang_fr
- run %navigateur $+ .exe $+(%x,%z,%y)
- }
- elseif (%moteur == lycos) {
- var %z $replace($did(12),$chr(32),+) , %x http://vachercher.lycos.fr/cgi-bin/pursuit?query , %y &cat=fr&tld=com&family=off&x=16&y=8
- run %navigateur $+ .exe $+(%x,%z,%y)
- }
- elseif (%moteur == yahoo) {
- var %z $replace($did(12),$chr(32),+) , %x http://fr.search.yahoo.com/search?fr=fp-tab-web-t-1&ei=ISO-8859-1&p= , %y &meta=vl%3Dlang_fr
- run %navigateur $+ .exe $+(%x,%z,%y)
- }
- elseif (%moteur == voila) {
- var %z = $replace($did(12),$chr(32),+) , %x http://search.ke.voila.fr/S/voila?dt=*&kw=
- run %navigateur $+ .exe $+(%x,%z)
- }
- }
- }
alias rech { dialog -m Recherche Recherche }
dialog Recherche {
title "Recherche internet"
size -1 -1 160 157
option dbu
box "Choix du moteur de recherche", 1, 4 3 153 39
radio "Google", 2, 8 14 50 10, group
radio "Lycos", 3, 104 14 50 10
radio "Voila", 4, 8 27 50 10
radio "Yahoo", 5, 104 27 50 10
box "Choix du navigateur", 6, 4 50 153 40
radio "Iexplore", 7, 8 64 50 10, group
radio "Firefox", 8, 8 77 50 10
radio "Opera", 9, 104 65 50 10
radio "Netscape", 10, 104 76 50 10
box "Recherche", 11, 4 97 153 50
edit "", 12, 11 114 134 10
button "Ok", 13, 65 128 37 12, ok
text "Texte de la recherche a effectuer", 14, 39 105 82 8
}
on *:dialog:Recherche:*:*:{
if ($devent == sclick && $did == 13) {
var %navigateur $gettok(Iexplore.Firefox.Opera.Netscape,$findtok($+($did(7).state,.,$did(8).state,.,$did(9).state,.,$did(10).state),1,1,46),46)
var %moteur $gettok(Google.Lycos.Voila.Yahoo,$findtok($+($did(2).state,.,$did(3).state,.,$did(4).state,.,$did(5).state),1,1,46),46)
if (%moteur == google) {
var %z $replace($did(12),$chr(32),+) , %x http://www.google.fr/search?hl=fr&q= , %y &btnG=Recherche+Google&meta=lr%3Dlang_fr
run %navigateur $+ .exe $+(%x,%z,%y)
}
elseif (%moteur == lycos) {
var %z $replace($did(12),$chr(32),+) , %x http://vachercher.lycos.fr/cgi-bin/pursuit?query , %y &cat=fr&tld=com&family=off&x=16&y=8
run %navigateur $+ .exe $+(%x,%z,%y)
}
elseif (%moteur == yahoo) {
var %z $replace($did(12),$chr(32),+) , %x http://fr.search.yahoo.com/search?fr=fp-tab-web-t-1&ei=ISO-8859-1&p= , %y &meta=vl%3Dlang_fr
run %navigateur $+ .exe $+(%x,%z,%y)
}
elseif (%moteur == voila) {
var %z = $replace($did(12),$chr(32),+) , %x http://search.ke.voila.fr/S/voila?dt=*&kw=
run %navigateur $+ .exe $+(%x,%z)
}
}
}
Conclusion
Je n'ai pas encore rencontré de bugs faites moi par ce ceux ci (s'il y en a) dans vos commentaires merci :)
Historique
- 12 juin 2005 17:26:03 :
- edit enlevé
- 12 juin 2005 17:58:28 :
- Grosse optimisation :)
Sources de la même categorie
Commentaires
|
CalendriCode
| | | L | M | M | J | V | S | D |
| | | | | 1 | 2 | 3 |
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
|
|