Lecteur mp3 en picwin sans dll

Soyez le premier à donner votre avis sur cette source.

Vue 5 508 fois - Téléchargée 111 fois

Description

avec infobulle
basé sur le trés bon script techamp

Source / Exemple :


Menu status,menubar,query,nicklist,channel {
  $iif(!$window(@SaMp3),[Lecteur SaMp3]):SaMp3
}
on *:mp3end:playmode
alias -l tp {
  dr -nfr $w1 $c1 1 220 4 51 34 
  splay $1- | chkmuz 
  ah pause 0  
  if ($gt(dit) == 1)  $iif($gt(dit1) != $null,$gt(dit1)) 
  dd $w1
  pm
}
alias pm {
  dr -nfr $w1 $c1 1 220 4 51 38
  dr -nrc $w1 $c3 1 223 5 47 13  
  if ($calc($insong.length /1000) < 3600) var %x = 230 
  else var %x = 225 
  dt -nrco $w1 $c2 verdana 10 %x 5 50 10  $tmps
  dr -nrc $w1 $c3 1 223 17 47 13  |  if $khz != 0 dt -nrco $w1 $c2 verdana 10 230 17 52 20 $khz 
  dr -nrc $w1 $c3 1 223 29 47 13  |  if $kbps != $null dt -nrco $w1 $c2 verdana 10  226 29 50 20 $kbps 
  dd $w1
}
alias -l hd return $+(",$scriptdir,SaMp3pw.hsh,")
alias -l ld return $+(",$scriptdir,SaMp3.txt,")
alias -l win.d %win.d = 1 | %win.x = $mouse.x | %win.y = $mouse.y
alias -l win.pos %win.pos = 1 | %win.x = $1 | %win.y = $2 
alias -l win.od {
  if (!%win.d) return 
  var %w = $1,%x,%y
  var %a = $calc($window(%w).x + $mouse.x - %win.x),%b = $calc($window(%w).y + $mouse.y - %win.y)
  if ($left(%a,1) != -) %x = %a | else %x = 0
  if ($left(%b,1) != -) %y = %b | else %y = 0
  if (%a > $calc($window(-1).w - $window(%w).w)) %x = $calc($window(-1).w - $window(%w).w) 
  if (%b > $calc($window(-1).h - $window(%w).h)) %y = $calc($window(-1).h - $window(%w).h) 
  window %w %x %y
  ah x.y $window($w1).x $window($w1).y 
}
alias -l win.e unset %win.*
alias -l dr drawrect $1-
alias -l dt drawtext $1-
alias -l df drawfill $1-
alias -l dl drawline $1-
alias -l dd drawdot $1-
alias -l pars return $+($chr(40),$1,$chr(41))
alias -l Samver return v1
alias -l first return $iif($gt(first),$ifmatch,1)
alias -l skpa return $iif($gt(skpa),$ifmatch,5683338)
alias -l skpb return $iif($gt(skpb),$ifmatch,1525523)
alias -l skda return $iif($gt(skda),$ifmatch,1)
alias -l skdb return $iif($gt(skdb),$ifmatch,8421504)
alias -l skta return $iif($gt(skta),$ifmatch,13878124)
alias -l sktb return $iif($gt(sktb),$ifmatch,7605261)
alias -l skqa return $iif($gt(skqa),$ifmatch,$color(15))
alias -l skqb return $iif($gt(skqb),$ifmatch,$color(0))
alias -l layer return $iif($gt(layer),$ifmatch,255)
alias SaMp3 {
  if (!$hget(SaMp3pw)) { mh | lh }
  ah first 1
  ah txtfont Arial
  ah txtsize 10
  if (!$window($w1)) window -apBCdhk0 +fd $w1 0 0 300 314 $mircexe 0
  window $w1 $gt(x.y)
  if ($gt(first) == 1) window -o $w1
  alayer $gt(layer)
  dr -nrf $w1 $c1 1 0 0 300 314
  dr -nrd $w1 $c2 1 28 40 20 20 10 10 | dt -nroc $w1 $c2 webdings 8 56 15 25 25 3 
  dr -nrd $w1 $c2 1 28 40 20 20 10 10 | dt -nroc $w1 $c2 webdings 8 211 15 30 20 4 
  wtitle SaMp3 $Samver 
  dr -nr $w1 $c2 1 273 5 10 13 | dt -nro $w1 $c2 Arial -7 275 3 _ 
  dr -nr $w1 $c2 1 285 5 10 13 | dt -nro $w1 $c2 Arial -7 288 5 x 
  dr -nrf $w1 $c2 1 6 19 50 20 | tpost 00:00 
  dr -nrd $w1 $c2 1 6 40 20 20 10 10 | dt -nroc $w1 $c2 webdings 12 10 41 30 20 9 
  dr -nrd $w1 $c2 1 28 40 20 20 10 10 | dt -nroc $w1 $c2 webdings 12 31 41 30 20 4 
  dr -nrd $w1 $c2 1 50 40 20 20 10 10 | dt -nroc $w1 $c2 webdings 12 54 41 30 20 ; 
  dr -nrd $w1 $c2 1 72 40 20 20 10 10 | dt -nroc $w1 $c2 webdings 12 75 41 30 20 < 
  dr -nrd $w1 $c2 1 94 40 20 20 10 10 | dt -nroc $w1 $c2 webdings 12 97 41 30 20 : 
  dr -nrd $w1 $c2 1 116 40 20 20 10 10 | dt -nroc $w1 $c2 webdings 12 120 40 30 20 6 
  dr -nrd $w1 $c2 1 138 40 20 20 10 10 | dt -nroc $w1 $c2 wingdings -12 142 41 30 20 2
  dr -nr $w1 $c2 1 60 20 154 6
  $iif($gt(subdir) == 1,dt -nroc $w1 $c3  verdana 8 170 37 25 25 +,dt -nroc $w1 $c2  verdana 8 170 37 25 25 +)
  dt -nroc $w1 $c2 webdings -15 160 40 25 25 Ì
  dt -nroc $w1 $c2 webdings 12 67 22 25 25 X
  modep
  trans
  $iif($gt(first) == 0,dt -nroc $w1 $c2 webdings 13 273 20 30 20 2,dt -nroc $w1 $c3 webdings 13 273 20 30 20 2)
  dr -nr $w1 $c2 1 2 2 296 63
  dr -nfrd $w1 $skpa 1 288 20 7 7 6 6
  dr -nfrd $w1 $skda 1 288 28 7 7 6 6
  dr -nfrd $w1 $skta  1 288 36 7 7 6 6
  dr -nfrd $w1 $skqa 1 288 44 7 7 6 6
  dr -nr $w1 $c2 1 288 52 7 7
  dr -nfr $w1 $c1 1 220 4 51 34
  window -shl $w2 
  dr -nr $w1 $c2 1 2 67 296 245 
  dr -nr $w1 $c2 1 279 70 15 15
  dr -nr $w1 $c2 1 279 293 15 15
  if (($vol(wave).mute) || ($vol(master).mute)) { }
  else { dt -nroc $w1 $c3 webdings 12 74 22 25 25 ð }
  upar 1
  dwar 1
  if ($insong) pm 
  else { dt -nroc $w1 $c3 Arial 48 232 -5 51 48 S | dt -nroc $w1 $c2 Arial 24 220 10 51 38 MP3 }
  if ($line($w2,1)) quickinit | else initfiles
  chkmuz | volst 
  if ($gt(plshow) != 1) window $w1 $window($w1).x $window($w1).y 300 66
  dt -nroc $w1 $c2  wingdings 14 180 45 25 25 1 
  dt -nroc $w1 $c2  wingdings 15 197 45 25 25 < 
  dt -nroc $w1 $c2  webdings 18 210 41 25 25 ? 
  dt -nroc $w1 $c2  wingdings 15 228 43 25 25 $
  dt -nroc $w1 $c2  webdings 16 248 43 25 25 i 
  dt -nroc $w1 $c2  verdana 8 270 52 25 25 +
  $iif($gt(dit) == 1,dt -nroc $w1 $c3 webdings 16 265 40 25 25 ],dt -nroc $w1 $c2 webdings 16 265 40 25 25 ])
  dd @SaMp3 
}
alias -l tmute {
  if ($vol(wave).mute) || ($vol(master).mute) { dt -nroc $w1 $c3 webdings 12 74 22 25 25 ð |  vol -wu2  }
  else { dr -nfr $w1 $c1 1 74 26 6 10 | vol -wu1 }
  dd $w1 
}
alias -l modep {
  $iif($gt(playmode) == cont,dt -nroc $w1 $c3 verdana 8 180 35 10 10 C,dt -nroc $w1 $c2  verdana 8 180 35 10 10 C)
  $iif($gt(playmode) == rep,dt -nroc $w1 $c3 verdana 8 187 35 10 10 R,dt -nroc $w1 $c2  verdana 8 187 35 10 10 R)
  $iif($gt(playmode) == alea,dt -nroc $w1 $c3 verdana 8 194 35 10 10 A,dt -nroc $w1 $c2  verdana 8 194 35 10 10 A)
  $iif($gt(playmode) == bak,dt -nroc $w1 $c3 verdana 8 201 35 10 10 I,dt -nroc $w1 $c2  verdana 8 201 35 10 10 I)
  $iif($gt(playmode),dt -nroc $w1 $c2  verdana 8 206 35 10 10 N,dt -nroc $w1 $c3  verdana 8 206 35 10 10 N)
  dd $w1
}
alias -l trans {
  $iif($gt(layer) == 255,dt -nroc $w1 $c3  verdana 8 180 27 10 10 1,dt -nroc $w1 $c2  verdana 8 180 27 10 10 1)
  $iif($gt(layer) == 180,dt -nroc $w1 $c3  verdana 8 187 27 10 10 2,dt -nroc $w1 $c2  verdana 8 187 27 10 10 2)
  $iif($gt(layer) == 122,dt -nroc $w1 $c3  verdana 8 194 27 10 10 3,dt -nroc $w1 $c2  verdana 8 194 27 10 10 3)
  $iif($gt(layer) == 60,dt -nroc $w1 $c3  verdana 8 201 27 10 10 4,dt -nroc $w1 $c2  verdana 8 201 27 10 10 4)
  dd $w1
}
alias -l c3 {
  var %c3 = $iif($c2 > 100,$calc($c2 - 100),100)
  return %c3
}

menu @SaMp3 {
  sclick:{ 
    if ($inr(4,4,266,15)) win.d
    elseif ($inr(6,40,20,20)) bak
    elseif ($inr(94,40,20,20)) cont
    elseif ($inr(273,5,10,13)) { window -n $w1 }
    elseif ($inr(285,5,10,13)) { tstop | .timer -h 1 200 csamps | ah x.y $window($w1).x $window($w1).y }
    elseif ($inr(50,40,20,20)) && ($insong) { ah pause $iif($gt(pause) == 0,1,0) | splay $iif($gt(pause) == 0,pause,resume) }
    elseif ($inr(28,40,20,20)) { 
      if ($sline($w2,1)) { tp $+(",$ifmatch,") | dpltxt $sline($w2,1).ln | fixtxt 70-82 }
    }
    elseif ($inr(72,40,20,20)) && ($insong) tstop 
    elseif ($inr(80,30,94,6)) { vol -vw $calc(($mouse.x  - 80) * 682.25) | volupd }
    elseif ($inr(62,20,150,6)) && ($insong) { splay seek $calc(($mouse.x - 62) * $int($calc($insong.length / 151))) | useek } 
    elseif ($inr(67,26,12,12)) { tmute }
    elseif ($inr(138,40,20,20)) { plshow |   ah bgdhl $iif($gt(bgdhl) == 1,0,1) }
    elseif ($inr(116,40,20,20)) { tp $$sfile($iif($isdir($gt(mdir)),$gt(mdir),$mircdir) *.mp3) }
    elseif ($inr(180,35,6,10)) { dh playmode | $iif($gt(playmode) == cont,,ah playmode cont)  | modep }
    elseif ($inr(187,35,6,10)) { dh playmode | $iif($gt(playmode) == rep,,ah playmode rep) |  modep }
    elseif ($inr(194,35,6,10)) { dh playmode | $iif($gt(playmode) == alea,,ah playmode alea) |  modep }
    elseif ($inr(201,35,6,10)) { dh playmode | $iif($gt(playmode) == bak,,ah playmode bak) |  modep }
    elseif ($inr(206,35,6,10)) { dh playmode |  modep | dd $w1 }
    elseif ($inr(214,20,4,7)) && ($insong) { splay seek $calc($insong.pos + 5000) }
    elseif ($inr(56,20,4,7)) && ($insong) { splay seek $calc($insong.pos - 5000) }
    elseif ($inr(248,45,13,15)) { tid3 }
    elseif ($inr(180,45,17,15)) { loadm3u }
    elseif ($inr(197,45,14,15)) { savem3u }
    elseif ($inr(211,45,16,15)) { clrpls }
    elseif ($inr(229,45,17,15)) { plsrch $$input(Entrez le mot à chercher !,qe,Scfile v.02) }
    elseif ($inr(288,20,7,7)) { ah c1 $skpa | ah c2 $skpb | SaMp3 }  
    elseif ($inr(288,28,7,7)) { ah c1 $skda | ah c2 $skdb | SaMp3 }
    elseif ($inr(288,36,7,7)) { ah c1 $skta | ah c2 $sktb  | SaMp3 }
    elseif ($inr(288,44,7,7)) { ah c1 $skqa | ah c2 $skqb | SaMp3 }
    elseif ($inr(288,52,7,7)) { randclr }
    elseif ($inr(6,20,50,17)) { $iif($gt(optpos) == 0,stpos 1,stpos 0) }
    elseif ($inr(279,70,15,15)) { .timer.SaMp3pw.scrollbut -h 0 20 downsel }
    elseif ($inr(279,293,15,15)) { .timer.SaMp3pw.scrollbut -h 0 20 upsel }
    elseif ($mouse.x isnum 279-294) && ($mouse.y isnum 86-292) { .timer.SaMp3pw.knob -h 0 1 { knob $!mouse.y | knobloc } }
    elseif ($inr(160,45,20,15)) { pldir }
    elseif ($inr(170,37,8,9)) { $iif($gt(subdir) == 0,ah subdir 1,ah subdir 0) | $iif($gt(subdir) == 1,dt -nroc $w1 $c3  verdana 8 170 37 25 25 +,dt -nroc $w1 $c2  verdana 8 170 37 25 25 +) | dd $w1 }
    elseif ($inr(180,27,6,10)) { alayer 255 | ah layer 255 | trans }
    elseif ($inr(187,27,6,10)) { alayer 180 | ah layer 180 | trans }
    elseif ($inr(194,27,6,10)) { alayer 122 | ah layer 122 | trans }
    elseif ($inr(201,27,6,10)) { alayer 60 | ah layer 60 | trans }
    elseif ($inr(275,25,10,10)) { $iif($gt(first) == 1,ah first 0,ah first 1) | $iif($gt(first) == 0,dt -nroc $w1 $c2 webdings 13 273 20 30 20 2,dt -nroc $w1 $c3 webdings 13 273 20 30 20 2) | if $gt(first) == 1 window -o $w1 | if $gt(first) == 0 window -u $w1 | dd $w1 }
    elseif ($inr(270,52,8,9)) { ah dit1 $$input(Parametres utilisables : $crlf echo / me / ame / say / amsg $crlf $ $+ $+ ch=Chanteur - Titre / $ $+ du=Durée / $ $+ ko=poids / $ $+ kbps / $ $+ khz ,ae,Ou ?) }
    elseif ($inr(265,43,14,11)) { $iif($gt(dit) == 1,ah dit 0,ah dit 1) | dit | dd $w1 }
  }
  dclick:if ($click($w1,$click($w1,0)).x isnum 6-270) { pltok $click($w1,$click($w1,0)).y } 
  uclick:if ($inr(279,70,15,15)) || ($inr(279,293,15,15)) { .timer.SaMp3pw.scrollbut off }
  rclick:{
    if (($mouse.x isnum 6-270) && ($mouse.y isnum 68-314))   dltok $mouse.y
  }

  leave:.timer.SaMp3pw.* off | if ($mouse.key & 1) win.od $active | elseif (%win.d) win.e | .timerbul off 
  drop:{ 
    win.e 
    if ($mouse.x isnum 279-294) && ($mouse.y isnum 86-292) { knob $mouse.y | knobloc | .timer.SaMp3pw.* off }
  }
  mouse:{
    .timerbul off
    win.od $active
    if (($inr(2,2,296,63)) && ($mouse.x $+ $mouse.y != %coord)) { .timerbul 0 1 bul $mouse.x $mouse.y $calc($ctime + 3) }
  }
  $iif(($inr(288,20,7,7)),Sauver skin en cours ici):dh skpa | ah skpa $c1 | ah skpb $c2 | SaMp3
  $iif(($inr(288,28,7,7)),Sauver skin en cours ici):dh skda | ah skta $c1 | ah skdb $c2 | SaMp3
  $iif(($inr(288,36,7,7)),Sauver skin en cours ici):dh skta | ah skta $c1 | ah sktb $c2 | SaMp3
  $iif(($inr(288,44,7,7)),Sauver skin en cours ici):dh skqa | ah skqa $c1 | ah skqb $c2 | SaMp3
}

alias -l help {
  window -c @help
  var %nm = $numtok($1-,32)
  if ($len($1-) > 19) {
    var %x = 1
    while (%x <= $calc(%nm / 2)) {
      var %1L = %1L $gettok($1-,%x,32) 
      inc %x
    }
    if $isbit(%nm,1) == 0 var %x = $calc(%nm + 1) else var %x = $round(%nm,0))
    while (%x <= %nm) {
      var %2L = %2L $gettok($1-,%x,32)
      inc %x
    }

  }
  if (%1L != $null)  { var %xm = $calc($len(%2L) * 6) | var %ym = 24 }
  else { var %xm = $calc($len($1-) * 6)  | var %ym = 15 }
  if ($calc($window($w1).x + $mouse.x - %xm) > %xm) var %x = $calc($window($w1).x + $mouse.x - %xm) 
  else var %x = $calc($window($w1).x + $mouse.x)
  if ($calc($window($w1).y + $mouse.y -20) > 20) var %y = $calc($window($w1).y + $mouse.y -20) 
  else var %y = $calc($window($w1).y + $mouse.y + 20)
  if (!$window(@help)) window -apdBChk0 +fd @help 0 0 %xm %ym   $mircexe 0
  dr -nrf @help 11070967 1 0 0 %xm %ym
  window @help %x %y 
  window -ao @help | %coord = $mouse.x $+ $mouse.y

  $iif(%1L != $null,dt -nroc @help 1  verdana 10 2 1 $calc(%xm -4) 15 %1L,dt -nroc @help 1  verdana 10 2 1 $calc(%xm -4) 15 $1-)
  if %1L != $null dt -nroc @help 1 verdana 10 3 10 $calc(%xm -4) 15  %2L
  dd @help 
  .timerc 1 3 window -c @help
  .timerw1 1 3 if ($window($w1)) window -a $w1
}

menu @help {
  sclick:window -c @help
}
alias -l pltok {
  var %a = $hget(SaMp3pl,0).item
  while (%a) {
    if ($1 isnum $hget(SaMp3pl,%a).item) && ($isfile($hget(SaMp3pl,$hget(SaMp3pl,%a).item))) {
      tp $+(",$hget(SaMp3pl,$hget(SaMp3pl,%a).item),") | fixtxt $hget(SaMp3pl,%a).item
      chkmuz | volst | return
    }
    dec %a
  }
}
alias -l dltok {
  var %a = $hget(SaMp3pl,0).item
  while (%a) {
    if ($1 isnum $hget(SaMp3pl,%a).item) && ($isfile($hget(SaMp3pl,$hget(SaMp3pl,%a).item))) {
      var %x = $+($hget(SaMp3pl,$hget(SaMp3pl,%a).item))
    }
    dec %a
  }
  if $input(Effacer de la liste $crlf $gettok(%x,$numtok(%x,92),92) ?,yq,Effacer ?) {
    var %mot = $read($ld, w, %x)
    var %i = $readn
    write -dl $+ %i $ld
    if ($window($w2)) { clear $w2  | showfiles | loadbuf $w2 $ld | initfiles }
  }
}
alias dit {
  $iif($gt(dit) == 1,dt -nroc $w1 $c3 webdings 16 265 40 25 25 ],dt -nroc $w1 $c2 webdings 16 265 40 25 25 ]) 
  if $gt(dit) == 1 &&  $shtime($insong.fname) != 00:00 $iif($gt(dit1) != $null,$gt(dit1))
}
alias -l say { $iif($active == $w1,//msg $lactive $eval($1-,2),//msg $active $eval($1-,2)) }
alias -l me { $iif($active == $w1,//describe $lactive $eval($1-,2),//describe $active $eval($1-,2)) }
alias -l echo { $iif($active == $w1,//echo $lactive $eval($1-,2),//echo $active $eval($1-,2)) }
alias -l ame { //ame $eval($1-,2) }
alias -l amsg { //amsg $eval($1-,2) }

alias -l ch  {
  var %a
  if ($sound($insong.fname).artist) && ($sound($insong.fname).title) %a = $sound($insong.fname).artist - $sound($insong.fname).title
  else %a = $nopath($insong.fname)
  return %a 
}
alias -l du return $shtime($insong.fname) $+ mn
alias -l kbps return $sound($insong.fname).bitrate $+ Kbps
alias -l khz return $int($calc($sound($insong.fname).sample / 1000)) $+ Khz
alias -l ko return $bytes($file($insong.fname)).suf

on *:close:@SaMp3:tstop | .timer.SaMp3pw* off  
on *:open:@SaMp3:*:chkmuz
on *:start:mh | lh
alias -l mh if (!$hget(SaMp3pw)) hmake SaMp3pw 100
alias -l lh if ($isfile($hd)) hload SaMp3pw $hd
alias -l ah hadd -m SaMp3pw $1- | saveh
alias -l dh hdel SaMp3pw $1- | saveh
alias -l saveh hsave -o SaMp3pw $hd
alias -l gt return $hget(SaMp3pw,$1)
alias -l w1 return @SaMp3
alias -l w2 return @SaMp3h
alias -l c1 return $iif($gt(c1),$ifmatch,14936810)
alias -l c2 return $iif($gt(c2),$ifmatch,9475220)
alias -l txtsize return $iif($gt(txtsize),$ifmatch,-7)
alias -l txtfont return $iif($gt(txtfont),$ifmatch,Arial)
alias -l chgfont ah txtfont $1- | SaMp3
alias -l chgfsize ah txtsize $1 | SaMp3
alias -l tff return $txtfont $txtsize
alias -l txtreset dh txtfont | dh txtsize | SaMp3
alias -l sbgdhl ah bgdhl $1
alias -l pldir { ah mdir $$sdir($iif($gt(mdir),$ifmatch,*)) | SaMp3 | addfiles | .timer.SaMp3pw.pltcxt -h 1 50 dpltxt 1 | ah line1 1 }
alias -l popsong {
  var %a
  if ($sound($1).artist) && ($sound($1).title) %a = $sound($1).artist - $sound($1).title
  else %a = $nopath($1)
  return %a 
}

alias -l playmode {
  if ($window($w1)) && ($window($w2)) {
    if ($gt(playmode)) $ifmatch
  }
}
alias -l addfiles {
  var %a = $gt(mdir),%b = $subdir 
  if ($isdir($gt(mdir))) var %d = $findfile(%a,*.mp3,0,%b,aline -n $w2 $1-)
  savebuf $w2 $ld | showfiles
}
alias -l subdir return $iif($gt(subdir) == 1,$finddir($gt(mdir),*,*),0)
alias -l clrpls {
  if ($hget(SaMp3pl)) hfree SaMp3pl
  if ($window($w2)) { clear $w2 | savebuf $w2 $ld } | showfiles 
}
alias -l savem3u if ($window($w2)) savebuf $w2 $$input(Enregistrer sous ?,qe,Enregistrer,SaMp3.m3u)
alias -l loadm3u if ($window($w2)) { var %a = $+(",$$sfile(*.m3u,Choisissez la playlist m3u a charger),") | clear $w2 | loadbuf $w2 %a | savebuf $w2 $ld | initfiles }
alias showfiles {
  if ($isfile($ld)) {
    dr -nrf $w1 $c1 1 3 68 275 243
    loadbuf -r $w2 $ld
    sline $w2 1 | knob 70
  }
}
alias -l dpltxt {
  if ($line($w2,1)) {
    dr -nrf $w1 $c1 1 6 68 270 243
    var %a = 1,%b = 70,%c = $line($w2,0),%d = $1 | ah line1 $1
    while (%a <= 20) {
      if (%d <= %c) { 
        if ($isfile($line($w2,%d))) {
          dt -nrc $w1 $c2 $tff 6 %b 270 12 $nopath($line($w2,%d))
          hadd -m SaMp3pl $+(%b,-,$calc(%b +12)) $line($w2,%d)
        }
        else { hadd -m SaMp3pl $+(%b,-,$calc(%b +12)) . }
      }
      else { hadd -m SaMp3pl $+(%b,-,$calc(%b +12)) . }
      inc %a | inc %b 12 | inc %d 
    }
    if ($sline(@SaMp3h,1)) && ($hfind(SaMp3pl,$sline(@SaMp3h,1),1).data) fixtxt $ifmatch
    dd $w1
  }
}
alias -l csamps tstop | window -c $w1 | window -c $w2 | window -c @help | .timerbul off | unset %coord
alias -l fixtxt {
  if ($line($w2,1)) && ($isfile($hget(SaMp3pl,$1))) {
    if ($gt(plsel)) dr -nfr $w1 $c1 1 6 $gettok($gt(plsel),1,45) $calc($window($w1).w -30) 12
    if ($gt(plsel)) dt -nrcb $w1 $c2 $c1 $tff 6 $gettok($gt(plsel),1,45) $calc($window($w1).w -30) 12 $nopath($hget(SaMp3pl,$gt(plsel)))
    dr -nfr $w1 $c1 1 6 $gettok($1,1,45) $calc($window($w1).w -30) 12
    dr -nfr $w1 $iif($gt(bgdhl) == 1,$iif($c1 > 40,$calc($c1 - 40),40),$c1) 1 6 $gettok($1,1,45) $calc($window($w1).w -30) 12
    dt -nrco $w1 $c2 $tff 6 $gettok($1,1,45) $calc($window($w1).w -20) 12 $nopath($hget(SaMp3pl,$1))
    ah plsel $1 | if ($line($w2,1)) && ($fline($w2,$hget(SaMp3pl,$1))) sline $w2 $ifmatch 
    dd $w1
  }
}
alias -l hl return $iif($c2 > 40,$calc($c2 - 40),$40)
alias -l inr return $inrect($mouse.x,$mouse.y,$1,$2,$3,$4)
alias -l upar dt -nr $w1 $iif($1 == 1,$c2,$rgb(hilight)) Webdings 12 280 68 5 
alias -l dwar dt -nr $w1 $iif($1 == 1,$c2,$rgb(hilight)) Webdings 12 280 291 6 
alias -l knob {
  var %a = $1
  if (%a < 86) var %a = 86
  if (%a > 284) var %a = 284
  dr -nr $w1 $c1 1 279 $iif($gt(knob),$ifmatch,86) 15 8
  dr -nr $w1 $c2 1 279 $iif(%a,%a,86) 15 8
  ah knob %a
  dd $w1
}
alias -l knobloc {
  dpltxt $int($calc(($mouse.y - 84) / (199 / ($iif($line($w2,0) > 20,$line($w2,0) -19,$line($w2,0))))))
}
alias -l downsel { 
  if ($calc($gt(line1) -1) > 0) && ($line($w2,$calc($gt(line1) -1))) { 
    hdec SaMp3pw line1 | dpltxt $gt(line1) | knob $calc(86 + ($gt(line1) * (199 / ($line($w2,0) -19))))
  }
}
alias -l upsel {
  if ($calc($gt(line1) -2) < $calc($line($w2,0) -20)) {
    hinc SaMp3pw line1 | dpltxt $gt(line1) | knob $calc(86 + ($gt(line1) * (199 / ($line($w2,0) -19))))
  }
}
alias -l quickinit if ($line($w2,1)) { dpltxt $iif($gt(line1),$ifmatch,1) | knob $calc(86 + ($gt(line1) * (199 / ($line($w2,0) -19)))) | fixtxt $gt(plsel) }
alias -l initfiles { showfiles | dpltxt $iif($gt(line1),$ifmatch,1) | knob $calc(86 + ($gt(line1) * (199 / ($line($w2,0) -19)))) | fixtxt $gt(plsel) }
alias rconfig hsave -oi SaMp3pl SaMp3pl.ini SaMp3pl | run SaMp3pl.ini
alias -l cont {
  if ($window($w2)) {
    if ($sline($w2,1)) && ($line($w2,$calc($sline($w2,1).ln +1))) { 
      sline $w2 $calc($sline($w2,1).ln +1) | tp $+(",$sline($w2,1),") | dpltxt $sline($w2,1).ln  
      knob $calc(86 + ($gt(line1) * (199 / ($line($w2,0) -19)))) | fixtxt 70-82
    } 
    else { 
      if ($line($w2,1)) { 
        sline $w2 1 | tp $+(",$sline($w2,1),") 
        dpltxt $sline($w2,1).ln | knob $calc(86 + ($gt(line1) * (199 / ($line($w2,0) -19)))) | fixtxt 70-82
      } 
    }
  }
}
alias -l bak {
  if ($window($w2)) {
    if ($sline($w2,1).ln != 1) && ($line($w2,$calc($sline($w2,1).ln -1)) != 0) { 
      sline $w2 $calc($sline($w2,1).ln -1) | tp $+(",$sline($w2,1),") | dpltxt $sline($w2,1).ln 
      knob $calc(86 + ($gt(line1) * (199 / ($line($w2,0) -19)))) | fixtxt 70-82
    } 
    else { 
      if ($line($w2,1)) { 
        sline $w2 $line($w2,0) | tp $+(",$sline($w2,1),") 
        dpltxt $sline($w2,1).ln | knob $calc(86 + ($gt(line1) * (199 / ($line($w2,0) -19)))) | fixtxt 70-82
      } 
    }
  }
}
alias -l alea {
  if ($line($w2,1)) {
    tp $+(",$line($w2,$r(1,$line($w2,0))) ,")
    if ($insong) && ($fline($w2,$+(*,$insong.fname,*),1)) { 
      sline $w2 $ifmatch | dpltxt $ifmatch 
      knob $calc(86 + ($gt(line1) * (199 / ($line($w2,0) -19)))) | fixtxt 70-82
    }
  }
}
alias -l rep if ($sline($w2,1)) tp $+(",$ifmatch,") 
alias -l randclr  { 
  :rclr
  var %c1 = $r(1,16777215) 
  var %c2 = $r(1,16777215) 
  if ($abs($calc(%c1 - %c2)) < 62980)  goto rclr
  else { 
    ah c1 %c1  | ah c2 %c2  | SaMp3 
  } 
}
alias -l plshow {
  if ($gt(plshow) == 1) { 
    window $w1 $window($w1).x $window($w1).y 300 66
    ah plshow 0 
  }
  else { 
    var %a = 85
    while (%a < 314) { 
      window $w1 $window($w1).x $window($w1).y 300 %a
      inc %a 6
    } 
    ah plshow 1 
  }
}
alias -l aseek dr -nr $w1 $c2 1 60 20 154 6 | dr -nfr $w1 $c1 1 62 22 151 2 | dr -nrf $w1 $hl 1 62 22 $calc(4 + $int($calc($insong.pos / $int($calc($insong.length / 145))))) 2 | dd $w1
alias -l useek dr -nr $w1 $c2 1 60 20 154 6 | dr -nfr $w1 $c1 1 62 22 126 2 | dr -nr $w1 $c1 1 $mouse.x 22 0 2 | dd $w1 
alias -l volst dr -nfr $w1 $c1 1 80 28 96 8 | dr -nr $w1 $c2 1 80 28 96 8 | dr -nrf $w1 $c2 0  80 30 $calc($vol(master) / 691.49) 4 | dd $w1 
alias -l volupd dr -nfr $w1 $c1 1 80 28 96 8 | dr -nr $w1 $c2 1 80 28 96 8 | dr -nrf $w1 $c2 0 80 30 $iif($mouse.x != 81,$calc($mouse.x -79),81) 4 | dd $w1 
alias -l wtitle {
  if ($window($w1)) { dr -nr $w1 $c1 1 5 5 200 13 
    dr -nfr $w1 $c2 1 5 5 215 13 
    dt -nrc $w1 $c1 $tff 7 5 215 13 $1- 
    if ($shtime($insong.fname) == 00:00) { dr -nfr $w1 $c1 1 220 4 51 38) | dr -nfr $w1 $c1 1 62 22 151 2 | dt -nroc $w1 $c3 Arial 48 232 -5 51 48 S | dt -nroc $w1 $c2 Arial 24 220 10 51 38 MP3 } 
    dd $w1 
  }
}
alias -l alayer setlayer $1 $w1 | setlayer $1 $w1
alias -l tpos var %x = $calc($insong.pos /1000) | return $gmt(%x,$iif(%x >= 3600,hh:nn:ss,nn:ss))
alias -l shtime var %x = $calc($sound($1-).length /1000) | return $gmt(%x,$iif(%x >= 3600,hh:nn:ss,nn:ss))
alias -l telap var %x = $calc(($insong.length - $insong.pos) / 1000) | return $gmt(%x,$iif(%x >= 3600,-hh:nn:ss,-nn:ss))
alias -l updpos .timer.SaMp3pwfun.updpos -hio 0 500 $& curpos $chr(124) aseek
alias -l tpost if ($window($w1)) { dr -nr $w1 $c2 1 6 19 50 20 | dr -nfr $w1 $c1 1 7 20 47 17 |  var %siz = $iif($gt(optpos) = 1,$tailm,$tailp) | dt -nrco $w1 $c2 $txtfont %siz $calc(((56 - $width($1-,$txtfont,%siz)) / 2) + 3) $calc(((20 - $height($1-,$txtfont,%siz)) / 2) + 19) 50 20 $1- | dd $w1 }
alias -l tailp var %x = $calc($insong.pos /1000) | return $iif(%x >= 3600,-8,-11)
alias -l tailm var %x = $calc(($insong.length - $insong.pos) / 1000) | return $iif(%x >= 3600,-8,-11)
alias -l curpos if ($window($w1)) && ($insong) { tpost $optpos } | else { .timer.SaMp3pwfun.updpos off | tpost 00:00 }
alias -l optpos return  $iif($gt(optpos),$iif($gt(optpos) == 0,$tpos,$telap),$tpos)
alias -l stpos ah optpos $1- 
alias -l chkmuz if ($window($w1)) && ($insong) { updpos | scrt ;| titlebar $w1 $popsong($insong.fname) }
alias -l scrt { 
  var %b = $+($replace($nopath($popsong($insong.fname)),$chr(32),$chr(95)),$chr(95)),%c = $width(%b,$txtfont,$txtsize)
  if (%c >= 210) { %scrt = %b | .timer.SaMp3pwfun.scrt -hio 0 210 scrtx }
  else { wtitle $popsong($insong.fname) | .timer.SaMp3pwfun.scrt off }
}
alias tmps var %x = $calc($insong.length /1000) | return $gmt(%x,$iif(%x >= 3600,hh:nn:ss,nn:ss))
alias -l scrtx if (%scrt) && ($window($w1)) { wtitle $replace(%scrt,$chr(95),$chr(32)) | %scrt = $+($right(%scrt,-1),$left(%scrt,1)) } | else .timer.SaMp3pwfun.scrt off
alias -l tid3 {
  if ($insong) { 
    !.echo -q $input($crlf Artist: $iif($sound($insong.fname).artist,$ifmatch,N/A) $crlf $& 
      Title: $iif($sound($insong.fname).title,$ifmatch,N/A) $crlf Album: $iif($sound($insong.fname).album,$ifmatch,N/A) $crlf $&
      Genre: $iif($sound($insong.fname).genre,$ifmatch,N/A) $crlf Year: $iif($sound($insong.fname).year,$ifmatch,N/A) $crlf $&
      Size: $bytes($file($insong.fname)).suf $crlf Bitrate: $sound($insong.fname).bitrate $crlf $& 
      Sample: $sound($insong.fname).sample $crlf Duration: $duration($calc($insong.length / 1000)) $crlf,o,MP3 ID3 INFO.) 
  }
}
alias -l tstop if ($insong) splay stop | .timer.SaMp3pwfun.* off | wtitle SaMp3 $Samver | tpost 00:00 | curpos
alias -l plsrch {
  if ($window($w2)) {
    clear @SampSearch | if (!$window($SampSearch)) window -aodk0Cl +sfLt @SampSearch 0 0 500 300 lucida Console 11
    filter -cww $w2 @SampSearch $+(*,$1-,*) 
    titlebar @SampSearch a trouvé $line(@SampSearch,0) resultat(s) pour $+(',$1-,') | window -b @SampSearch
  }
}
alias -l splsplay {
  if ($isfile($sline(@Sampsearch,1))) tp $+(",$sline(@Sampsearch,1),")
  if ($window($w1)) { dpltxt $fline($w2,$+(*,$sline(@Sampsearch,1),*),1) | fixtxt 70-82 }
}
menu @SampSearch {
  dclick:splsplay
  	 Font:font
  	 Search:plsrch $$input(Enter search item!,qe,Scfile v.02)
  $iif($sline(@SampSearch,1),  	 Play file):splsplay
  -
  	 Close:window -c $active
}
alias -l bul {
  if ($mouse.x $+ $mouse.y $+ $ctime = $1 $+ $2 $+ $3) {
    if  ($inr(4,4,266,15)) { help Déplacement lecteur SaMp3 }
    elseif ($inr(6,40,20,20)) { help Précédente }
    elseif ($inr(94,40,20,20)) { help Suivante }
    elseif ($inr(50,40,20,20)) { help Pause  }
    elseif ($inr(28,40,20,20)) { help Play  }
    elseif ($inr(72,40,20,20)) { help Stop  }
    elseif ($inr(80,30,94,6)) { help Réglage Volume }
    elseif ($inr(62,20,150,6)) { help Position de la Musique en cours }
    elseif ($inr(67,26,12,12)) { help Mute  }
    elseif ($inr(138,40,20,20)) { help Playlist }
    elseif ($inr(116,40,20,20)) { help Ajouter un Fichier }
    elseif ($inr(180,35,6,10)) { help Mode Continue }
    elseif ($inr(187,35,6,10)) { help Mode Repeat }
    elseif ($inr(194,35,6,10)) { help Mode Aléatoire }
    elseif ($inr(201,35,6,10)) { help Mode Inverse }
    elseif ($inr(206,35,6,10)) { help Mode Normal }
    elseif ($inr(214,20,4,7)) { help Avance 5 secondes }
    elseif ($inr(56,20,4,7)) { help Recule 5 secondes }
    elseif ($inr(248,45,13,15)) { help Info Musique joué }
    elseif ($inr(180,45,17,15)) { help Charge Playlist }
    elseif ($inr(197,45,14,15)) { help Sauve Playlist }
    elseif ($inr(211,45,16,15)) { help Efface Playlist }
    elseif ($inr(229,45,17,15)) { help Cherche dans Playlist }
    elseif ($inr(160,45,20,15)) { help Charge Répertoire }
    elseif ($inr(170,37,8,9)) { help Sous-Répertoires }
    elseif ($inr(180,27,28,10)) { help % de Transparence }
    elseif ($inr(275,25,10,10)) { help Toujours devant }
    elseif ($inr(288,20,7,31)) { help Activer ce skin voir click droit }
    elseif ($inr(288,52,7,7)) { help Skin Aléatoire }
    elseif ($inr(270,52,8,9)) { help Configurer Dire }
    elseif ($inr(265,43,14,11)) { help Activer Dire }
    elseif ($inr(6,20,50,17)) { help Temps ou Rebours }
  }  
}

Conclusion :


A charger dans remote.
j'attends des critiques constructives.

Codes Sources

A voir également

Ajouter un commentaire Commentaires
Messages postés
7
Date d'inscription
mardi 17 janvier 2006
Statut
Membre
Dernière intervention
14 juillet 2006

Du grand art, si j'avais à intégrer un lecteur mp3 dans un addon c'est celui que je choisirais. Juste une petite critique (mouarf toujours un truc à dire j ai): essaie de commenter ton code, c'est mieux pour les gens qui apprennent ;)
Messages postés
7
Date d'inscription
mardi 17 janvier 2006
Statut
Membre
Dernière intervention
14 juillet 2006

Du grand art, si j'avais à intégrer un lecteur mp3 dans un addon c'est celui que je choisirais. Juste une petite critique (mouarf toujours un truc à dire j ai): essaie de commenter ton code, c'est mieux pour les gens qui apprennent ;)
Messages postés
3
Date d'inscription
vendredi 23 décembre 2005
Statut
Membre
Dernière intervention
11 février 2006

Je ne my connai pas trop en code etc !!!!!!!
Sa fait un an ke je me suis lancer !!!!
Mais jtien a dire un chose , de tout les lecteur ke g vue celui et de lien de le meilleur !!!!!!
Bravo a toi sa merite ton 10/10 :)
Messages postés
288
Date d'inscription
lundi 8 mars 2004
Statut
Membre
Dernière intervention
14 février 2009

j'aurais bien testé mais sans zip a dl merci le copier coller qui rajoute le nombre de ligne et je me vois pas les éffacer une par une........
Messages postés
90
Date d'inscription
vendredi 13 décembre 2002
Statut
Membre
Dernière intervention
12 décembre 2007

J'ai un petit problème.Quand j'execute le Player,mon script n'est plus accessible.Je suis obligé de le redemarrer.Est-ce normal ? (je sais que c'est non,mais bon ;) )
Merci d'avance ;)
Afficher les 15 commentaires

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.