Mp3 en dialog et input. pour l'installer, telecharger le zip, puis place les dossiers et le .mrc à la racine de votre mIRC puis taper : /load -rs mp3.mrc
Pour ouvrir le mp3 /mp3
;
Source / Exemple :
/*
Auteur: Vor4x
Since: 23/02/2009
Description: Lecteur mp3
Utilisation: /Mp3
;#Popups
Menu channel,menubar {
> Mp3 <:mp3
}
;#Alias
alias mp3 dialog $iif(!$dialog(mp3),-md mp3,-v) mp3
alias mdx return $mircdir $+ dll\mdx.dll
alias loadbuf.mp3 {
var %i $findfile($hget(mp3,playlist),*.*,0)
while (%i) {
did -a mp3 2 $findfile($hget(mp3,playlist),*.*,%i),-1,58) $chr(9) $iif($sound($findfile($hget(mp3,playlist),*.*,%i)).title,$sound($findfile($hget(mp3,playlist),*.*,%i)).title,Aucun) $chr(9) $iif($sound($findfile($hget(mp3,playlist),*.*,%i)).genre,$sound($findfile($hget(mp3,playlist),*.*,%i)).genre,Aucun) $chr(9) $duration($calc($sound($findfile($hget(mp3,playlist),*.*,%i)).length / $& 1000)) $chr(9) $sound($findfile($hget(mp3,playlist),*.*,%i)).bitrate
dec %i
}
}
alias mp3preview {
if ($dialog(mp3)) && ($inmp3) {
if (%mp3preview == -700) set -e %mp3preview 350
.remove icones\mp3preview.jpg
window -ph +b @mp3 -1 -1 350 50
drawtext -p @mp3 1 "tahoma" 18 %mp3preview 13 $+($chr(3),$r(1,15),,$chr(3)) Lecture en cours: $token($insong.fname,-1,92) • Durée: $duration($calc($sound($insong.fname).length / $& 1000))) • $+($chr(3),$r(1,15),,$chr(3)) $time
drawsave @mp3 icones\mp3preview.jpg
did -g mp3 33 icones\mp3preview.jpg
window -c @mp3
dec %mp3preview
}
else { if ($dialog(mp3)) did -g mp3 33 icones\mp3.jpg }
}
alias splayalea {
if (!$hget(mp3,mp3rien)) {
if (!$exists($longfn($hget(mp3,Playlist)))) { Hadd mp3 Playlist $shortfn($$sdir(C:\,Choisis ta liste de musique.)) }
if ($2) && (!$findfile($longfn($hget(mp3,Playlist)),* $+ $2- $+ *.mp3,1)) { splay $findfile($longfn($hget(mp3,Playlist)),* $+ $2- $+ *.mp3,$rand(1,$findfile($longfn($hget(mp3,Playlist)),* $+ $2- $+ *.mp3,0))) }
if (!$2) { splay $findfile($longfn($hget(mp3,Playlist)),*.mp3,$rand(1,$findfile($longfn($hget(mp3,Playlist)),*.mp3,0))) }
if ($server != $null) && (!$findfile($longfn($hget(mp3,Playlist)),* $+ $2- $+ *.mp3,1)) {
if ($hget(data,mp3echo)) .timer 1 0 echo -a $replace($hget(mp3,mp3message),<duree>,$duration($calc($sound($insong.fname).length / 1000)),<bitrate>,$sound($insong.fname).bitrate,<titre>,$sound($insong.fname).title)
else { if ($active != Status Window) .timer 1 0 msg $active $replace($hget(mp3,mp3message),<duree>,$duration($calc($sound($insong.fname).length / 1000)),<bitrate>,$sound($insong.fname).bitrate,<titre>,$sound($insong.fname).title) }
}
}
}
;#Boite de dialog
dialog mp3 {
title "- Ecoutez vos musique - [ /Mp3 ] "
size -1 -1 323 130
option dbu
icon Icones\sons.ico, 1
list 2, 3 3 158 93, size
list 3, 3 106 50 10, size
list 4, 61 106 50 10, size
list 5, 123 106 39 10, size
check "Lecture Auto", 6, 167 10 43 9
check "Infos bulle", 9, 220 10 37 9
list 10, 3 96 159 10, size
button "Ok", 13, 261 103 60 14, ok
list 14, -1 120 325 10, size
box "Options", 15, 163 1 157 100
check "Raccourci Mp3", 16, 269 10 47 9
text "Play:", 17, 167 22 13 8
text "Arreter:", 18, 247 22 20 8
text "Playlist:", 19, 167 36 19 8
edit "", 20, 189 22 40 9, autohs
edit "", 21, 276 22 40 9, autohs
edit "", 22, 189 36 40 9, autohs
text "Infos:", 23, 247 37 15 8
edit "", 24, 276 36 40 9, autohs
edit "", 25, 189 50 40 9
text "Pause:", 26, 167 51 19 8
text "Reprendre:", 27, 247 51 27 8
edit "", 28, 276 51 40 9, autohs
edit "", 29, 189 65 40 9, autohs
text "Volume:", 31, 167 65 19 8
icon 33, 163 102 94 15, icones\mp3.jpg, 0, noborder
text "Message:", 35, 167 78 25 8
edit "", 36, 195 78 121 9, autohs
radio "echo", 37, 167 90 24 8
radio "rien afficher", 38, 278 90 39 8
radio "Msg active", 39, 217 90 37 8
}
;#Evenements
on *:dialog:mp3:*:*: {
if ($devent == init) {
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetBorderStyle 3,4,5,10
dll $mdx SetControlMDX 14 statusbar sizeGrip > dll\bars.mdx
dll $mdx SetControlMDX 10 Trackbar tooltips size > dll\bars.mdx
dll $mdx SetControlMDX 3,4,5 ToolBar flat nodivider list > dll\bars.mdx
dll $mdx SetControlMDX 2 listview report showsel infotip grid nosortheader > dll\views.mdx
did -i $dname 2 1 settxt color $rgb(0,0,131)
did -i $dname 2 1 headerdims 100:50 80:50 80:50 80:50 80:50
did -i $dname 2 1 headertext Chemin $chr(9) Titre $chr(9) Genre $chr(9) Durée $chr(9) Bitrate
did -i $dname 3,4,5 1 bmpsize 30 15
did -i $dname 3 1 setimage +nhd 0 icon large 0,icones\play.ico
did -a $dname 3 1 Lire $chr(9) Lire la musique selectionner
did -i $dname 4 1 setimage +nhd 0 icon large 0,icones\stop.ico
did -a $dname 4 1 Arreter $chr(9) Arreter la musique
did -i $dname 5 1 setimage +nhd 0 icon large 0,icones\playlist.ico
did -a $dname 5 1 Playlist $chr(9) Choisissez le répertoire !
did -i $dname 10 1 params $int($calc($vol(song) / 65535 * 100))
did -i mp3 14 1 seticon 0 small 0,icones\wmp.ico
did -a $dname 20 $hget(mp3,cmdplay)
did -a $dname 21 $hget(mp3,cmdarret)
did -a $dname 22 $hget(mp3,cmdplaylist)
did -a $dname 24 $hget(mp3,cmdinfos)
did -a $dname 25 $hget(mp3,cmdpause)
did -a $dname 28 $hget(mp3,cmdreprendre)
did -a $dname 29 $hget(mp3,cmdvolume)
did -a $dname 36 $hget(mp3,mp3message)
if (!$hget(mp3,playlist)) hadd mp3 playlist $sdir(Choisissez un dossier,Playlist)
did -i mp3 14 2 1 $iif($hget(mp3,playlist),Playlist: $hget(mp3,playlist) $str(,110) $findfile($hget(mp3,playlist),*.*,0) musiques)
if ($hget(mp3,mp3auto)) did -c $dname 6
if ($hget(mp3,mp3bulle)) did -c $dname 9
if ($hget(mp3,mp3cmd)) did -c $dname 16
if (!$hget(mp3,mp3cmd)) did -b $dname 20,21,22,24,25,28,29,17,18,19,23,26,27,31
if ($hget(mp3,mp3echo)) did -c $dname 37
if ($hget(mp3,mp3rien)) did -c $dname 38
if ($hget(mp3,mp3msg)) did -c $dname 39
.timermp3buf 1 1 loadbuf.mp3
if ($inmp3) { var %i $timer(0) | while (%i) { if ($timer(%i) != preview) .timerpreview -m 0 95 mp3preview | dec %i } | mp3preview }
}
elseif ($devent == close) .timerpreview off
elseif ($devent == dclick) && ($did = 2) && ($did(2).seltext) { .splay $token($token($did(2).seltext,6-,32),1,9) | .timerpreview -m 0 95 mp3preview }
elseif ($devent == sclick) {
if ($did = 3) { if ($did(2).seltext) { .splay $token($token($did(2).seltext,6-,32),1,9) | .timerpreview -m 0 95 mp3preview } | else noop $input(Erreur: Vous n'avez pas cliquée sur la liste $+ $chr(44) aucune musique ne peut se lire.,hod,Erreur) }
elseif ($did = 4) { .splay stop | .timerpreview off | did -g mp3 33 icones\mp3.jpg }
elseif ($did = 5) { did -r $dname 2 | hadd mp3 playlist $sdir(Choisissez un dossier,Playlist) | did -i mp3 14 2 1 Playlist: $hget(mp3,playlist) $str(,110) $findfile($hget(mp3,playlist),*.*,0) musiques | loadbuf.mp3 }
elseif ($did = 6) hadd mp3 mp3auto $did(6).state
elseif ($did = 9) hadd mp3 mp3bulle $did(9).state
elseif ($did = 10) vol -p $int($calc($token($did(10).seltext,1,32) * 65535 / 100))
elseif ($did = 16) { hadd mp3 mp3cmd $did(16).state | $iif($did(16).state == 1, did -e $dname, did -b $dname) 20,21,22,24,25,28,29,17,18,19,23,26,27,31 }
elseif ($did = 37) { hadd mp3 mp3echo $did(37).state | hdel mp3 mp3msg | hdel mp3 mp3rien | did -e $dname 38,39 | did -b $dname 37 | did -u $dname 38,39 }
elseif ($did = 38) { hadd mp3 mp3rien $did(38).state | hdel mp3 mp3msg | hdel mp3 mp3echo | did -e $dname 37,39 | did -b $dname 38 | did -u $dname 37,39 }
elseif ($did = 39) { hadd mp3 mp3msg $did(39).state | hdel mp3 mp3echo | hdel mp3 mp3rien | did -e $dname 38,37 | did -b $dname 39 | did -u $dname 38,37 }
}
elseif ($devent == edit) {
if ($did = 20) hadd mp3 cmdplay $did(20)
elseif ($did = 21) hadd mp3 cmdarret $did(21)
elseif ($did = 22) hadd mp3 cmdplaylist $did(22)
elseif ($did = 24) hadd mp3 cmdinfos $did(24)
elseif ($did = 25) hadd mp3 cmdpause $did(25)
elseif ($did = 28) hadd mp3 cmdreprendre $did(28)
elseif ($did = 29) hadd mp3 cmdvolume $did(29)
elseif ($did = 36) hadd mp3 mp3message $did(36)
}
}
on *:mp3end: {
mp3preview
if ($hget(mp3,mp3auto)) {
splay $findfile($longfn($hget(mp3,Playlist)),*.mp3,$rand(1,$findfile($longfn($hget(mp3,Playlist)),*.mp3,0)))
if ($hget(mp3,mp3bulle)) noop $tip(Lecteur Mp3,Lecteur Mp3,Lecture en cours: 10 $+ $sound($insong.fname).title $+ - Durée: $duration($calc($sound($insong.fname).length / $& 1000)),10,icones\sons.ico)
if ($hget(mp3,mp3echo)) .timer 1 0 echo -a $replace($hget(mp3,mp3message),<duree>,$duration($calc($sound($insong.fname).length / 1000)),<bitrate>,$sound($insong.fname).bitrate,<titre>,$sound($insong.fname).title)
else { if ($active != Status Window) .timer 1 0 msg $active $replace($hget(mp3,mp3message),<duree>,$duration($calc($sound($insong.fname).length / 1000)),<bitrate>,$sound($insong.fname).bitrate,<titre>,$sound($insong.fname).title) }
}
}
on *:input:*:{
if ($hget(mp3,mp3rien)) return
if ($hget(mp3,mp3cmd)) && (!$hget(data,mp3rien)) {
if ($1 == $hget(mp3,cmdplay)) .splayalea $2
elseif ($1 == $hget(mp3,cmdarret)) {
splay stop
if ($hget(mp3,mp3echo)) .timer 1 0 echo -a (Mp3) Arret du mp3.
if ($hget(mp3,mp3msg)) && ($active != Status Window) .timer 1 0 msg $active (Mp3) Arret du mp3.
}
elseif ($1 == $hget(mp3,cmdplaylist)) {
var %fr $sdir(Choisissez un dossier,Playlist)
hadd mp3 playlist %fr
if ($hget(mp3,mp3echo)) .echo -a (Mp3) Playlist: fichier choisis: %fr $+ .
if ($hget(mp3,mp3msg)) && ($active != Status Window) .timer 1 0 msg $active (Mp3) Playlist: fichier choisis: %fr $+ .
}
elseif ($1 == $hget(mp3,cmdinfos)) && ($inmp3) {
if ($hget(mp3,mp3echo)) .timer 1 0 .echo -a $replace($hget(mp3,mp3message),<bitrate>,$sound($insong.fname).bitrate,<titre>,$sound($insong.fname).title,<duree>,Durée: $duration($calc($sound($insong.fname).length / $& 1000))))
if ($hget(mp3,mp3msg)) && ($active != Status Window) .timer 1 0 msg $active $replace($hget(mp3,mp3message),<bitrate>,$sound($insong.fname).bitrate,<titre>,$sound($insong.fname).title,<duree>,Durée: $duration($calc($sound($insong.fname).length / $& 1000))))
}
elseif ($1 == $hget(mp3,cmdinfos)) && (!$inmp3) noop $input(Erreur: Aucun infos est disponible.,hod,erreur)
elseif ($1 == $hget(mp3,cmdpause)) {
splay pause
if ($hget(mp3,mp3echo)).timer 1 0 echo -a (Mp3) Le mp3, est maintenant en pause.
if ($hget(mp3,mp3msg)) && ($active != Status Window) .timer 1 0 msg $active (Mp3) Le mp3, est maintenant en pause.
}
elseif ($1 == $hget(mp3,cmdreprendre)) {
if ($hget(mp3,mp3echo)) .timer 1 0 echo -a (Mp3) Le mp3, n'est maintenant plus en pause.
if ($hget(mp3,mp3msg)) && ($active != Status Window) .timer 1 0 msg $active (Mp3) Le mp3, n'est maintenant plus en pause.
}
elseif ($1 == $hget(mp3,cmdvolume)) && ($2) {
vol -p $calc(655.36 * $2)
if ($hget(mp3,mp3echo)) .timer 1 0 echo -a (Mp3) Le volume du Mp3 est maintenant: $+($chr(2),$2,$chr(2)) $+ %
if ($hget(mp3,mp3msg)) && ($active != Status Window) .timer 1 0 msg $active (Mp3) Le volume du Mp3 est maintenant: $2 $+ %
}
}
}
on *:load:{
if (!$hget(mp3)) hmake mp3 50
hadd mp3 mp3message • Mp3: <titre> - Durée: <duree> Bitrate: <bitrate>
hadd mp3 mp3rien 1
hadd mp3 cmdplay !zik
hadd mp3 cmdreprendre !reprise
hadd mp3 cmdinfos !mp3infos
hadd mp3 cmdplaylist !playlist
hadd mp3 cmdpause !pause
hadd mp3 cmdvolume !vol
hadd mp3 cmdarret !mp3stop
hadd mp3 mp3cmd 1
hadd mp3 mp3bulle 1
hadd mp3 mp3Auto 1
hsave mp3 mp3.txt
.echo -a Addon bien chargé, Mp3 v1.2 by Vor4x
mp3
}
on *:exit:hsave mp3 mp3.txt
on *:start: { if (!$hget(mp3)) hmake mp3 50 | hload mp3 mp3.txt }
Conclusion :
.
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.