;Addon ( mIRCamp )
;Version ( 1.07 )

;Auteur ( N[yk]O`18 )
;Email ( nyko.18@club-internet.fr )
;Website ( www.0nline.fr.st )

;Date ( 25/03/03 )
;Installation ( /load -rs mIRCamp\mIRCamp.nko )

;__________________________________________________

alias -l picmp3 {
  writeini mIRCamp\Options.ini MP3 Size Large
  window -pfzdk0B $+ $iif($mpini(OnTop) == ON,o) +dL @MP3 $iif($mpini(Xsave),$mpini(Xsave),-1) $iif($mpini(Ysave),$mpini(Ysave),-1) 275 116
  drawpic -st @MP3 $rgb(255,0,255) 0 0 $shortfn($mpini(Skin)) $+ \main.bmp
  drawpic -st @MP3 $rgb(255,0,255) 0 0 275 14 27 0 275 14 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 16 88 114 18 0 0 114 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp
  drawpic -st @MP3 $rgb(255,0,255) 136 89 22 16 114 0 22 16 $shortfn($mpini(Skin)) $+ \cbuttons.bmp
  drawpic -st @MP3 $rgb(255,0,255) 264 3 9 9 18 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 254 3 9 9 0 18 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 244 3 9 9 9 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 220 58 23 12 0 61 22 13 $shortfn($mpini(Skin)) $+ \shufrep.bmp
  drawpic -st @MP3 $rgb(255,0,255) 6 3 9 9 0 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 16 72 248 10 0 0 248 10 $shortfn($mpini(Skin)) $+ \posbar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 11 22 9 43 304 0 8 43 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 6 3 9 9 0 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 177 57 37 13 9 0 37 13 $shortfn($mpini(Skin)) $+ \balance.bmp
  drawpic -st @MP3 $rgb(255,0,255) 239 41 28 12 0 12 28 12 $shortfn($mpini(Skin)) $+ \monoster.bmp
  drawpic -st @MP3 $rgb(255,0,255) 212 41 28 12 29 12 28 12 $shortfn($mpini(Skin)) $+ \monoster.bmp
  drawpic -st @MP3 $rgb(255,0,255) 10 22 8 43 304 0 8 43 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 26 28 9 9 18 0 9 9 $shortfn($mpini(Skin)) $+ \playpaus.bmp
  drawsave @MP3 mIRCamp\TempMain.bmp
  if (!$exists(mIRCamp\TempView.bmp)) drawsave @MP3 mIRCamp\TempView.bmp
  if ($mpini(Shuffle) == ON) { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 30 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  Else { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 0 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  if ($mpini(Repeat) == ON ) { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 30 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  Else { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 0 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  if ($mpini(Playlist) == ON ) { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 73 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  Else { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 61 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  if ($window(@MP3).ontop == $true) { writeini mIRCamp\Options.ini MP3 OnTop ON | drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 312 53 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp | if ($dialog(plist)) dialog -o plist }

  var %x = 2340.535714,%y = 0
  while (%y <= 29) { if ($vol(master) >= $calc(%x * %y)) && ($vol(master) < $calc(%x * (%y + 1))) { drawpic -st @MP3 $rgb(255,0,255) 107 57 68 13 0 $calc($calc(%y - 1) * 15) 68 13 $shortfn($mpini(Skin)) $+ \volume.bmp | break } | inc %y }
  If (!$dialog(plist)) dialog -md plist plist
  if ($mpini(Playlist) != ON) dialog -i plist
  if ($mpini(OnTop) == ON) dialog -o plist
  If ($insong.fname) { 
    if ($len($sound($insong.fname).bitrate) > 2) drawtext -c @MP3 $mpini(KbpsColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 110 42 16 8 $sound($insong.fname).bitrate
    else drawtext -c @MP3 $mpini(KbpsColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 114 41 16 8 $sound($insong.fname).bitrate
    drawtext -c @MP3 $mpini(KbpsColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 155 41 12 8 $left($sound($insong.fname).sample,2)
    drawtext -c @MP3 $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 110 25 157 10 $upper($left($nopath($insong.fname),-4)) ( $+ $asctime($calc($sound($insong.fname).length /1000),n:ss) $+ )
    drawpic -st @MP3 $rgb(255,0,255) $int($calc((($insong.pos * 219) / $sound($insong.fname).length) + 16)) 72 29 10 248 0 29 10 $shortfn($mpini(Skin)) $+ \posbar.bmp
    set %MP3-Title-X $upper($left($nopath($insong.fname),-4)) ( $+ $asctime($calc($sound($insong.fname).length /1000),n:ss) $+ )
    .timertitle -m 0 1000 picanim
    if ($did(plist,4).lines < 1) did -i plist 4 1 $iif($mpini(Convert) == ON,$replace($left($nopath($insong.fname),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath($insong.fname),-4))
  }
}
alias mircamp { 
  remini mIRCamp\Options.ini MP3 Refresh
  If (!$exists($mpini(Skin))) writeini mIRCamp\Options.ini MP3 Skin $mircdir $+ mIRCamp\Skins\iBDE V5 Blue
  If (!$exists(mIRCamp\Skins\Skins.txt)) write mIRCamp\Skins\Skins.txt iBDE V5 Blue $+ $chr(1) $+ $mircdir $+ mIRCamp\Skins\iBDE V5 Blue
  If ($mpini(TitleColor) != 1) && ($mpini(Titlecolor) != 0) writeini mIRCamp\Options.ini MP3 Titlecolor 1
  If ($mpini(KbpsColor) != 1) && ($mpini(KbpsColor) != 0) writeini mIRCamp\Options.ini MP3 KbpsColor 1
  If ($mpini(Xsave) < 0) || ($mpini(Xsave) > $window(-1).w) { writeini mIRCamp\Options.ini MP3 Xsave -1 }
  If ($mpini(Ysave) < 0) || ($mpini(Xsave) > $window(-1).h) { writeini mIRCamp\Options.ini MP3 Ysave -1 }
  If ($mpini(Xplsave) < 0) || ($mpini(Xsave) > $window(-1).w) { writeini mIRCamp\Options.ini MP3 Xplsave -1 }
  If ($mpini(Yplsave) < 0) || ($mpini(Xsave) > $window(-1).h) { writeini mIRCamp\Options.ini MP3 Yplsave -1 }
  if ($mpini(Size) == Small) picmp3small
  Else picmp3
  mpskinsearch
}
alias -l picmp3small {
  writeini mIRCamp\Options.ini MP3 Size Small
  If ($mpini(TitleColor) != 1) && ($mpini(TitleColor) != 0) writeini mIRCamp\Options.ini MP3 Titlecolor 1
  If ($mpini(KbpsColor) != 1) && ($mpini(KbpsColor) != 0) writeini mIRCamp\Options.ini MP3 KbpsColor 1
  window -pfzdk0B $+ $iif($mpini(OnTop) == ON,o) +dL @MP3 $iif($mpini(Xsave),$mpini(Xsave),-1) $iif($mpini(Ysave),$mpini(Ysave),-1) 275 14
  drawpic -st @MP3 $rgb(255,0,255) 0 0 275 14 27 29 275 14 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 264 3 9 9 18 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 254 3 9 9 0 18 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  drawpic -st @MP3 $rgb(255,0,255) 244 3 9 9 9 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
  If ($insong.fname) { 
    .timertitle -m 0 1000 picanim
    if ($did(plist,4).lines < 1) did -i plist 4 1 $iif($mpini(Convert) == ON,$replace($left($nopath($insong.fname),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath($insong.fname),-4))
  }
}
alias -l picanim {
  If (!$window(@MP3)) { timertitle OFF | halt }
  if (!$insong.fname) halt

  If ($mpini(Size) != Small) {

    If ($mpini(Paused) == ON) {
      writeini mIRCamp\Options.ini MP3 Pausanim $calc($mpini(Pausanim) + 1)
      If ($mpini(Pausanim) != 2) { Goto paused }
      If ($mpini(Pausanim) == 2) { drawpic -st @MP3 $rgb(255,0,255) 48 26 51 13 48 26 51 13 $shortfn($mpini(Skin)) $+ \main.bmp | writeini mIRCamp\Options.ini MP3 Pausanim 0 | Goto paused2 }

    }
    :paused
    if ($mpini(Duree) != R) {
      drawpic -st @MP3 $rgb(255,0,255) 36 26 9 13 90 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp)
      drawpic -st @MP3 $rgb(255,0,255) 78 26 9 13 $calc($left($asctime($int($calc(($insong.pos / 1000) - $int($calc($insong.pos / 1000 / 60))*60)),ss),1) *9) 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp)
      drawpic -st @MP3 $rgb(255,0,255) 90 26 9 13 $calc($right($asctime($int($calc(($insong.pos / 1000) - $int($calc($insong.pos / 1000 / 60))*60)),ss),1) *9) 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp)
      drawpic -st @MP3 $rgb(255,0,255) 48 26 9 13 $calc($left($asctime($int($calc($insong.pos / 1000 / 60)),ss),1) *9) 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp) == $true,numbers.bmp,nums_ex.bmp)
      drawpic -st @MP3 $rgb(255,0,255) 60 26 9 13 $calc($right($asctime($int($calc($insong.pos / 1000 / 60)),ss),1) *9) 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp)
    }
    Else {
      if ($exists($shortfn($mpini(Skin)) $+ \nums_ex.bmp)) drawpic -st @MP3 $rgb(255,0,255) 36 26 9 13 99 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp)
      drawpic -st @MP3 $rgb(255,0,255) 78 26 9 13 $calc($left($asctime($calc($int($calc(($sound($insong.fname).length - $insong.pos) / 1000)) - $int($calc(($sound($insong.fname).length - $insong.pos) / 60000)) * 60),ss),1) *9) 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp)
      drawpic -st @MP3 $rgb(255,0,255) 90 26 9 13 $calc($right($asctime($calc($int($calc(($sound($insong.fname).length - $insong.pos) / 1000)) - $int($calc(($sound($insong.fname).length - $insong.pos) / 60000)) * 60),ss),1) *9) 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp)
      drawpic -st @MP3 $rgb(255,0,255) 48 26 9 13 $calc($left($asctime($int($calc(($sound($insong.fname).length - $insong.pos) / 60000)),ss),1) *9) 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp) == $true,numbers.bmp,nums_ex.bmp)
      drawpic -st @MP3 $rgb(255,0,255) 60 26 9 13 $calc($right($asctime($int($calc(($sound($insong.fname).length - $insong.pos) / 60000)),ss),1) *9) 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp)
    }
    :paused2
  }
  Else {
    drawpic -st @MP3 $rgb(255,0,255) 120 0 45 14 147 29 45 14 $shortfn($mpini(Skin)) $+ \Titlebar.bmp
    if ($mpini(Duree) != R) {
      drawtext -c @MP3 $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 148 2 12 8 $asctime($int($calc(($insong.pos / 1000) - $int($calc($insong.pos / 1000 / 60))*60)),ss)
      drawtext -c @MP3 $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 133 2 12 8 $asctime($int($calc($insong.pos / 1000 / 60)),ss)
    }
    Else {
      drawtext -c @MP3 $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 124 2 6 8 -
      drawtext -c @MP3 $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 148 2 12 8 $asctime($calc($int($calc(($sound($insong.fname).length - $insong.pos) / 1000)) - $int($calc(($sound($insong.fname).length - $insong.pos) / 60000)) * 60),ss)
      drawtext -c @MP3 $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 133 2 12 8 $asctime($int($calc(($sound($insong.fname).length - $insong.pos) / 60000)),ss)
    }
  }
  If ($mpini(PLSize) == Small) {
    drawpic -st @ListUp $rgb(255,0,255) 0 0 275 20 0 0 275 20 mIRCamp\TempListUp.bmp
    drawtext -c @ListUp $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 4 3 240 8 $upper($left($nopath($insong.fname),-4)) ( $+ $asctime($calc($sound($insong.fname).length /1000),n:ss) $+ )
  }
  Else {   
    drawpic -st @ListDn $rgb(255,0,255) 189 21 32 10 190 94 32 8 $shortfn($mpini(Skin)) $+ \pledit.bmp
    if ($mpini(Duree) != R) {
      drawtext -c @ListDn $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 211 21 12 8 $asctime($int($calc(($insong.pos / 1000) - $int($calc($insong.pos / 1000 / 60))*60)),ss)
      drawtext -c @ListDn $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 198 21 12 8 $asctime($int($calc($insong.pos / 1000 / 60)),ss)
    }
    Else {
      drawtext -c @ListDn $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 190 21 6 8 -
      drawtext -c @ListDn $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 211 21 12 8 $asctime($calc($int($calc(($sound($insong.fname).length - $insong.pos) / 1000)) - $int($calc(($sound($insong.fname).length - $insong.pos) / 60000)) * 60),ss)
      drawtext -c @ListDn $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 198 21 12 8 $asctime($int($calc(($sound($insong.fname).length - $insong.pos) / 60000)),ss)
    }
  }
  if ($mpini(DefTitle) == ON) && ( $width($upper($left($nopath($insong.fname),-4)),$iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial),8) > 165 ) && ($mpini(Size) != Small) { 
    drawpic -st @MP3 $rgb(255,0,255) 110 25 157 10 110 25 157 10 $shortfn($mpini(Skin)) $+ \main.bmp
    if ( %MP3-Title-X == $null ) { set %MP3-Title-X $upper($iif($mpini(Convert) == ON,$replace($left($nopath($insong.fname),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath($insong.fname),-4))) ( $+ $asctime($calc($sound($insong.fname).length /1000),n:ss) $+ ) }
    drawtext -c @MP3 $mpini(Titlecolor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 110 25 157 10 %MP3-Title-X

  }
  If (!%PosBarMove) {
    drawpic -st @MP3 $rgb(255,0,255) 16 72 248 10 0 0 248 10 $shortfn($mpini(Skin)) $+ \posbar.bmp
    drawpic -st @MP3 $rgb(255,0,255) $int($calc((($insong.pos * 219) / $sound($insong.fname).length) + 16)) 72 29 10 248 0 29 10 $shortfn($mpini(Skin)) $+ \posbar.bmp
  }
  set %MP3-Title-X $iif($mpini(Convert) == ON,$replace($right(%MP3-Title-X,-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$right(%MP3-Title-X,-4))
}

menu @MP3 {
  sclick:{
    mpcloselists

    ;Fermer la picwin
    if ($inrect($mouse.x,$mouse.y,264,3,9,9)) { drawpic -st @MP3 $rgb(255,0,255) 264 3 9 9 18 9 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp }
    ;Minimiser la picwin
    if ($inrect($mouse.x,$mouse.y,254,3,9,9)) { drawpic -st @MP3 $rgb(255,0,255) 254 3 9 9 9 18 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp }
    ;Réduire la picwin
    if ($inrect($mouse.x,$mouse.y,244,3,9,9)) { drawpic -st @MP3 $rgb(255,0,255) 244 3 9 9 9 9 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp  }
    ;Menu
    if ($inrect($mouse.x,$mouse.y,6,3,9,9)) { drawpic -st @MP3 $rgb(255,0,255) 6 3 9 9 0 9 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp }
    ;Deplacer la picwin
    if ($inrect($mouse.x,$mouse.y,16,0,227,20)) { 
      writeini mIRCamp\Options.ini MP3 X $mouse.x
      writeini mIRCamp\Options.ini MP3 Y $mouse.y
      if ($dialog(plist)) { writeini mIRCamp\Options.ini MP3 Xpl $calc($dialog(plist).x - $window(@MP3).x) | writeini mIRCamp\Options.ini MP3 Ypl $calc($dialog(plist).y - $window(@MP3).y) }
      .timermp32 0 .5 mp3move $!mouse.dx $!mouse.dy
    }
    ;Play
    if ($inrect($mouse.x,$mouse.y,39,88,22,18)) { drawpic -st @MP3 $rgb(255,0,255) 39 88 22 18 23 18 22 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp }
    ;Before
    if ($inrect($mouse.x,$mouse.y,16,88,22,18)) { drawpic -st @MP3 $rgb(255,0,255) 16 88 22 18 0 18 22 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp }
    ;Pause
    if ($inrect($mouse.x,$mouse.y,62,88,22,18)) { drawpic -st @MP3 $rgb(255,0,255) 62 88 22 18 46 18 22 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp }
    ;Stop
    if ($inrect($mouse.x,$mouse.y,85,88,22,18)) { drawpic -st @MP3 $rgb(255,0,255) 85 88 22 18 69 18 22 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp }
    ;Next
    if ($inrect($mouse.x,$mouse.y,108,88,22,18)) { drawpic -st @MP3 $rgb(255,0,255) 108 88 22 18 92 18 22 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp }
    ;Open
    if ($inrect($mouse.x,$mouse.y,136,89,22,16)) { drawpic -st @MP3 $rgb(255,0,255) 136 89 22 16 114 16 22 16 $shortfn($mpini(Skin)) $+ \cbuttons.bmp }
    ;Options
    if ($inrect($mouse.x,$mouse.y,11,22,8,9)) { drawpic -st @MP3 $rgb(255,0,255) 11 22 8 9 304 44 8 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp }
    if ($inrect($mouse.x,$mouse.y,11,31,8,8)) { drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 312 53 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp }
    if ($inrect($mouse.x,$mouse.y,11,39,8,8)) { drawpic -st @MP3 $rgb(255,0,255) 11 39 8 8 320 61 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp }
    ;Shuffle
    if ($inrect($mouse.x,$mouse.y,164,89,46,15)) { 
      if ($mpini(Shuffle) != ON ) { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 15 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
      if ($mpini(Shuffle) == ON ) { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 45 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
    }
    ;Repeat
    if ($inrect($mouse.x,$mouse.y,210,89,28,15)) { 
      if ($mpini(Repeat) != ON ) { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 15 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
      if ($mpini(Repeat) == ON ) { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 45 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
    }
    ;Playlist
    if ($inrect($mouse.x,$mouse.y,242,58,23,12)) { 
      if ($mpini(Playlist) != ON ) { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 69 61 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
      if ($mpini(Playlist) == ON ) { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 69 73 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
    }
    ;Volume
    if ($inrect($mouse.x,$mouse.y,107,57,6,13)) { vol -v 0 | drawpic -st @MP3 $rgb(255,0,255) 107 57 68 13 0 0 68 13 $shortfn($mpini(Skin)) $+ \volume.bmp }
    if ($inrect($mouse.x,$mouse.y,113,57,56,13)) { vol -v $calc(($mouse.x - 113) * 1170) | drawpic -st @MP3 $rgb(255,0,255) 107 57 68 13 0 $calc($int($calc(($mouse.x - 113) / 2)) * 15) 68 13 $shortfn($mpini(Skin)) $+ \volume.bmp }
    if ($inrect($mouse.x,$mouse.y,169,57,6,13)) { vol -v 65535 | drawpic -st @MP3 $rgb(255,0,255) 107 57 68 13 0 405 68 13 $shortfn($mpini(Skin)) $+ \volume.bmp }
    ;Titre défilant
    if ($inrect($mouse.x,$mouse.y,110,25,157,10)) { 
      if ($mpini(TitleColor) == 1) { writeini mIRCamp\Options.ini MP3 TitleColor 0 | Goto borw }
      if ($mpini(TitleColor) != 1) { writeini mIRCamp\Options.ini MP3 TitleColor 1 }
      :borw
      drawpic -st @MP3 $rgb(255,0,255) 110 25 157 10 110 25 157 10 $shortfn($mpini(Skin)) $+ \main.bmp
      drawtext -c @MP3 $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 110 25 157 10 $upper($left($nopath($insong.fname),-4)) ( $+ $asctime($calc($sound($insong.fname).length /1000),n:ss) $+ )
      If ($mpini(PLSize) == Small) {
        drawpic -st @ListUp $rgb(255,0,255) 0 0 275 20 0 0 275 20 mIRCamp\TempListUp.bmp
        drawtext -c @ListUp $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 4 3 240 8 $upper($left($nopath($insong.fname),-4)) ( $+ $asctime($calc($sound($insong.fname).length /1000),n:ss) $+ )
      }
    }
    ;Kbps + Khz
    if ($inrect($mouse.x,$mouse.y,110,41,55,8)) {
      if ($mpini(KbpsColor) == 1) { writeini mIRCamp\Options.ini MP3 KbpsColor 0 | Goto Kbps }
      if ($mpini(KbpsColor) != 1) { writeini mIRCamp\Options.ini MP3 KbpsColor 1 }
      :Kbps
      drawpic -st @MP3 $rgb(255,0,255) 110 41 55 8 110 41 55 8 $shortfn($mpini(Skin)) $+ \main.bmp
      if ($len($sound($insong.fname).bitrate) > 2) drawtext -c @MP3 $mpini(Kbpscolor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 110 42 16 8 $sound($insong.fname).bitrate
      else drawtext -c @MP3 $mpini(Kbpscolor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 115 41 16 8 $sound($insong.fname).bitrate
      drawtext -c @MP3 $mpini(Kbpscolor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 155 41 12 8 $left($sound($insong.fname).sample,2)
    }
    if ($inrect($mouse.x,$mouse.y,16,72,248,10)) && ($insong.fname) { .timerposbar -m 0 5 posbarmove $!mouse.x }
  }

  uclick:{
    .timerposbar off
    .timermp32 off

    drawpic -st @MP3 $rgb(255,0,255) 264 3 9 9 18 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
    drawpic -st @MP3 $rgb(255,0,255) 254 3 9 9 0 18 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
    drawpic -st @MP3 $rgb(255,0,255) 244 3 9 9 9 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
    drawpic -st @MP3 $rgb(255,0,255) 6 3 9 9 0 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
    drawpic -st @MP3 $rgb(255,0,255) 39 88 22 18 23 0 22 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp
    drawpic -st @MP3 $rgb(255,0,255) 16 88 22 18 0 0 22 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp
    drawpic -st @MP3 $rgb(255,0,255) 62 88 22 18 46 0 22 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp
    drawpic -st @MP3 $rgb(255,0,255) 85 88 22 18 69 0 22 18 $shortfn($mpini(Skin)) $+ \cbuttons.bmp
    drawpic -st @MP3 $rgb(255,0,255) 108 88 22 16 92 0 22 16 $shortfn($mpini(Skin)) $+ \cbuttons.bmp
    drawpic -st @MP3 $rgb(255,0,255) 136 89 22 16 114 0 22 16 $shortfn($mpini(Skin)) $+ \cbuttons.bmp
    drawpic -st @MP3 $rgb(255,0,255) 11 22 8 9 304 0 8 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
    drawpic -st @MP3 $rgb(255,0,255) 11 39 8 8 304 17 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp

    ;PosBar
    If (%PosBarMove) {
      drawpic -st @MP3 $rgb(255,0,255) 16 72 248 10 0 0 248 10 $shortfn($mpini(Skin)) $+ \posbar.bmp
      If ($mouse.x < 16) { splay seek 0 | drawpic -st @MP3 $rgb(255,0,255) 31 72 29 10 29 0 29 10 $shortfn($mpini(Skin)) $+ \posbar.bmp | unset %PosBarMove | halt }
      If ($mouse.x > 235) { splay seek $sound($insong.fname).length | unset %PosBarMove | halt }
      splay seek $int($calc(($sound($insong.fname).length * ($mouse.x - 29)) / 219))
      drawpic -st @MP3 $rgb(255,0,255) $calc($mouse.x - 15) 72 29 10 29 0 29 10 $shortfn($mpini(Skin)) $+ \posbar.bmp
      unset %PosBarMove
    }

    ;Fermer la picwin
    if ($inrect($mouse.x,$mouse.y,264,3,9,9)) { .timertitle OFF | writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x | writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y | window -c @MP3 | if ($dialog(plist)) dialog -k plist | if ($insong.fname) splay stop | halt }
    ;Minimiser la picwin
    if ($inrect($mouse.x,$mouse.y,254,3,9,9)) { 
      If ($mpini(Size) == Small) { writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x | writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y | window -c @MP3 | if ($mpini(Hang) == ON) && ($dialog(plist)) dialog -s plist $dialog(plist).x $calc($dialog(plist).y + 101) 270 $calc($dialog(plist).h - 32) | picmp3 }
      Else { writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x | writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y | window -c @MP3 | if ($mpini(Hang) == ON) && ($dialog(plist)) dialog -s plist $dialog(plist).x $calc($dialog(plist).y - 101) 270 $calc($dialog(plist).h - 32) | picmp3small }
    }
    ;Réduire la picwin
    if ($inrect($mouse.x,$mouse.y,244,3,9,9)) { window -n @MP3 | dialog -i plist | halt }
    ;Menu
    if ($inrect($mouse.x,$mouse.y,6,3,9,9)) || ($inrect($mouse.x,$mouse.y,11,22,8,9)) { if (!$dialog(mpoptions)) dialog -md mpoptions mpoptions | else dialog -v mpoptions }
    if ($inrect($mouse.x,$mouse.y,250,92,16,16)) { if (!$dialog(mpoptions)) { dialog -md mpoptions mpoptions } | else { dialog -v mpoptions } | did -c mpoptions 30 } 
    ;Play
    if ($inrect($mouse.x,$mouse.y,39,88,22,18)) { mpplay }
    ;Before
    if ($inrect($mouse.x,$mouse.y,16,88,22,18)) { mpbefore }
    ;Pause
    if ($inrect($mouse.x,$mouse.y,62,88,22,18)) { mppause }
    ;Stop
    if ($inrect($mouse.x,$mouse.y,85,88,22,18)) { mpstop }
    ;Next
    if ($inrect($mouse.x,$mouse.y,108,88,22,16)) { mpnext }
    ;Open
    if ($inrect($mouse.x,$mouse.y,136,89,22,16)) { mpopen }
    ;Durée écoulée - restante
    if (($inrect($mouse.x,$mouse.y,48,26,51,13)) && ($mpini(Size) != Small)) || (($inrect($mouse.x,$mouse.y,120,0,45,14)) && ($mpini(Size) == Small)) { 
      if ($mpini(Duree) == E) { writeini mIRCamp\Options.ini MP3 Duree R | drawpic -st @MP3 $rgb(255,0,255) 36 26 9 13 99 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp) }
      Else { writeini mIRCamp\Options.ini MP3 Duree E | drawpic -st @MP3 $rgb(255,0,255) 36 26 9 13 90 0 9 13 $shortfn($mpini(Skin)) $+ \ $+ $iif($exists($shortfn($mpini(Skin)) $+ \numbers.bmp),numbers.bmp,nums_ex.bmp) }
    }
    ;Options
    if ($inrect($mouse.x,$mouse.y,11,31,8,8)) {
      if ($window(@MP3).ontop == $true) { writeini mIRCamp\Options.ini MP3 OnTop OFF | window -u @MP3 | drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 304 9 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp | if ($dialog(plist)) dialog -n plist }
      else { writeini mIRCamp\Options.ini MP3 OnTop ON | window -o @MP3 | drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 312 53 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp | if ($dialog(plist)) dialog -o plist }
    }
    if ($inrect($mouse.x,$mouse.y,11,39,8,8)) { dialog -m mp3tag mp3tag }
    ;Shuffle
    if ($inrect($mouse.x,$mouse.y,164,89,46,15)) {
      if ($mpini(Shuffle) != ON) { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 30 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Shuffle ON | halt }
      if ($mpini(Shuffle) == ON) { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 0 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Shuffle OFF | halt }
    }
    ;Repeat
    if ($inrect($mouse.x,$mouse.y,210,89,28,15)) {
      if ($mpini(Repeat) != ON) { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 30 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Repeat ON | halt }
      if ($mpini(Repeat) == ON) { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 0 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Repeat OFF | halt }
    }
    ;Playlist
    if ($inrect($mouse.x,$mouse.y,242,58,23,12)) {
      if ($mpini(Playlist) != ON) { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 73 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Playlist ON | dialog -e plist plist | halt }
      if ($mpini(Playlist) == ON) { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 61 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Playlist OFF | dialog -i plist plist | window -a @MP3 | halt }
    }
    if ($inrect($mouse.x,$mouse.y,168,3,9,9)) { if ($mpini(Size) == Small) mpbefore }
    if ($inrect($mouse.x,$mouse.y,177,3,9,9)) { if ($mpini(Size) == Small) mpplay }
    if ($inrect($mouse.x,$mouse.y,186,3,9,9)) { if ($mpini(Size) == Small) mppause }
    if ($inrect($mouse.x,$mouse.y,195,3,9,9)) { if ($mpini(Size) == Small) mpstop }
    if ($inrect($mouse.x,$mouse.y,204,3,9,9)) { if ($mpini(Size) == Small) mpnext }
    if ($inrect($mouse.x,$mouse.y,213,3,9,10)) { if ($mpini(Size) == Small) mpopen }
  }
  dclick:{
    if (($inrect($mouse.x,$mouse.y,16,0,227,14)) && ($mpini(Size) != Small)) || (($inrect($mouse.x,$mouse.y,16,0,110,14)) && ($mpini(Size) == Small)) { 
      If ($mpini(Size) == Small) { writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x | writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y | window -c @MP3 | if ($mpini(Hang) == ON) && ($dialog(plist)) dialog -s plist $dialog(plist).x $calc($dialog(plist).y + 101) 270 $calc($dialog(plist).h - 32) | picmp3 }
      Else { writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x | writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y | window -c @MP3 | if ($mpini(Hang) == ON) && ($dialog(plist)) dialog -s plist $dialog(plist).x $calc($dialog(plist).y - 101) 270 $calc($dialog(plist).h - 32) | picmp3small }
    }
  }
  ;Popup
  mIRCamp 1.07...:{ if (!$dialog(mpoptions)) { dialog -md mpoptions mpoptions } | else { dialog -v mpoptions } | did -c mpoptions 30 }
  $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,33):run mailto:nyko.18@club-internet.fr?subject=mIRCamp 1.07
  -
  $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,1)
  .$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,2):{ mpopen }
  .$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,3):{ 
    var %dir = $$sdir($iif($mpini(LastAddDir),$mpini(LastAddDir),C:\),$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,adddir))
    writeini mIRCamp\Options.ini MP3 LastAddDir %dir
    write -c mIRCamp\TempPL.txt
    did -r plist 4
    var %x = 1,%files = $findfile(%dir,*.mp3,0)
    while (%x <= %files) { write mIRCamp\TempPL.txt $findfile(%dir,*.mp3,%x) | did -i plist 4 $calc($did(plist,4).lines + 1) $iif($mpini(Playlistnum) == ON,$calc($did(plist,4).lines + 1) $+ .) $iif($mpini(Convert) == ON,$replace($left($nopath($findfile(%dir,*.mp3,%x)),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath($findfile(%dir,*.mp3,%x)),-4)) | inc %x }
    mpsplay $read(mIRCamp\TempPL.txt,1)
    did -c plist 4 1
  }
  $iif($did(plist,4).sel < 1,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,4):{ dialog -m mp3tag mp3tag }
  -
  $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,5)
  .$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,6)
  ..$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,7):{ window -n @MP3 | dialog -i plist }
  ..$iif($mpini(Size) != Small,$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,8),$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,9)):{
    If ($mpini(Size) == Small) { writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x | writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y | window -c @MP3 | picmp3 }
    Else { writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x | writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y | window -c @MP3 | picmp3small }
  }
  .$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,10)
  ..$iif($mpini(Playlist) == ON,$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,7),$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,11)):{
    if ($mpini(Playlist) != ON) { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 73 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Playlist ON | dialog -e plist plist | halt }
    if ($mpini(Playlist) == ON) { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 61 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Playlist OFF | dialog -i plist plist | window -a @MP3 | halt }
  }
  ..$iif($mpini(PLSize) != Small,$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,8),$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,9)):{ 
    if ($mpini(PLSize) == Large) { 
      writeini mIRCamp\Options.ini MP3 PLSize Small
      dialog -s plist $dialog(plist).x $dialog(plist).y 269 -17
      drawpic -st @ListUp $rgb(255,0,255) 0 1 25 14 72 42 25 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp
      var %x = 25
      while (%x <= 277) { drawpic -st @ListUp $rgb(255,0,255) %x 1 25 14 72 57 25 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp | inc %x 25 }
      drawpic -st @ListUp $rgb(255,0,255) 225 1 50 14 99 42 50 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp
      drawsave @ListUp mIRCamp\TempListUp.bmp
    }
    else { 
      writeini mIRCamp\Options.ini MP3 PLSize Large
      dialog -s plist $dialog(plist).x $dialog(plist).y 269 265
      drawpic -st @ListUp $rgb(255,0,255) 0 0 25 20 0 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
      var %x = 25
      while (%x <= 277) { drawpic -st @ListUp $rgb(255,0,255) %x 0 25 20 127 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp | inc %x 25 }
      drawpic -st @ListUp $rgb(255,0,255) 250 0 25 20 153 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
      drawpic -st @ListUp $rgb(255,0,255) 87 0 100 20 26 0 100 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    }
  }
  $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,12)
  .$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,13):{ if (!$dialog(mpoptions)) { dialog -md mpoptions mpoptions } | else dialog -v mpoptions }
  .$readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,14):{ if (!$dialog(mpoptions)) { dialog -md mpoptions mpoptions } | else { dialog -v mpoptions } | did -c mpoptions 20 }
  .-
  .$iif($mpini(Duree) == R,$style(1)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,15):{ writeini mIRCamp\Options.ini MP3 Duree R }
  .$iif($mpini(Duree) != R,$style(1)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,16):{ writeini mIRCamp\Options.ini MP3 Duree E }
  .-
  .$iif($mpini(OnTop) == ON,$style(1)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,17):{ 
    if ($mpini(OnTop) == ON) { writeini mIRCamp\Options.ini MP3 OnTop OFF | window -u @MP3 | drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 304 9 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp | if ($dialog(plist)) dialog -n plist }
    else { writeini mIRCamp\Options.ini MP3 OnTop ON | window -o @MP3 | drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 312 53 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp | if ($dialog(plist)) dialog -o plist }
  }
  .-
  .$iif($mpini(Repeat) == ON,$style(1)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,18):{ 
    if ($mpini(Repeat) != ON) { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 30 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Repeat ON | halt }
    if ($mpini(Repeat) == ON) { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 0 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Repeat OFF | halt }
  }
  .$iif($mpini(Shuffle) == ON,$style(1)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,19):{
    if ($mpini(Shuffle) != ON) { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 30 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Shuffle ON | halt }
    if ($mpini(Shuffle) == ON) { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 0 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Shuffle OFF | halt }
  }
  $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,20)
  .$iif($did(plist,4).lines < 1,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,21):mpbefore
  .$iif($did(plist,4).lines < 1,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,22):mpplay
  .$iif(!$insong.fname,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,23):mppause
  .$iif(!$insong.fname,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,24):mpstop
  .$iif($did(plist,4).lines < 1,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,25):mpnext
  .-
  .$iif(!$insong.fname,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,26):{ splay seek $calc($insong.pos - 5000) }
  .$iif(!$insong.fname,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,27):{ splay seek $calc($insong.pos + 5000) }
  .$iif($did(plist,4).lines < 1,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,28):{ did -c plist 4 1 | mpsplay $read(mIRCamp\TempPL.txt,1) }
  .$iif(($did(plist,4).sel < 1) || ($did(plist,4).lines < 1),$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,29):{ 
    if ($did(plist,4).sel <= 10) { did -c plist 4 1 | mpsplay $read(mIRCamp\TempPL.txt,1) }
    if ($did(plist,4).sel > 10) { did -c plist 4 $calc($did(plist,4).sel - 10) | mpsplay $read(mIRCamp\TempPL.txt,$did(plist,4).sel) }
  }
  .$iif(($did(plist,4).sel < 1) || ($did(plist,4).lines < 1),$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,30):{ 
    if ($did(plist,4).sel >= $calc($lines(mIRCamp\TempPL.txt) - 10)) { did -c plist 4 $lines(mIRCamp\TempPL.txt) | mpsplay $read(mIRCamp\TempPL.txt,$lines(mIRCamp\TempPL.txt)) }
    if ($did(plist,4).sel < $calc($lines(mIRCamp\TempPL.txt) - 10)) { did -c plist 4 $calc($did(plist,4).sel + 10) | mpsplay $read(mIRCamp\TempPL.txt,$did(plist,4).sel) }
  }
  .-
  .$iif(!$insong.fname,$style(2)) $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,31):{ var %time = $input($readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,position) $iif($insong.fname,$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,position2) $asctime($calc($sound($insong.fname).length / 1000),n:ss)),edit) | splay seek $calc(($gettok(%time,1,58) * 60000) + ($gettok(%time,2,58) * 1000)) }
  -
  $readini(mIRCamp\Langages\ $+ $mpini(Langue),POPUP,32):{ .timertitle OFF | writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x | writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y | window -c @MP3 | if ($dialog(plist)) dialog -k plist | if ($insong.fname) splay stop }
}
alias -l mp3move { 
  if ($window(@MP3)) && ($mouse.key == 1) {
    window -a @MP3 $calc($1 - $mpini(X)) $calc($2 - $mpini(Y))
    If ($mpini(Hang) == ON) && ($dialog(plist)) dialog -s plist $calc($1 - $mpini(X) + $mpini(Xpl)) $calc($2 - $mpini(Y) + $mpini(Ypl)) $iif($mpini(PLSize) == Large,269 265,269 -17)
  }
  else .timermp32 off
}
alias -l posbarmove { 
  if ($window(@MP3)) && ($mouse.key == 1) {
    If ($1 > 249) { set %PosBarMove ON | drawpic -st @MP3 $rgb(255,0,255) 16 72 248 10 0 0 248 10 $shortfn($mpini(Skin)) $+ \posbar.bmp | drawpic -st @MP3 $rgb(255,0,255) 235 72 29 10 278 0 29 10 $shortfn($mpini(Skin)) $+ \posbar.bmp | halt }
    If ($1 < 31) { set %PosBarMove ON | drawpic -st @MP3 $rgb(255,0,255) 16 72 248 10 0 0 248 10 $shortfn($mpini(Skin)) $+ \posbar.bmp | drawpic -st @MP3 $rgb(255,0,255) 16 72 29 10 278 0 29 10 $shortfn($mpini(Skin)) $+ \posbar.bmp | halt }
    set %PosBarMove ON
    drawpic -st @MP3 $rgb(255,0,255) 16 72 248 10 0 0 248 10 $shortfn($mpini(Skin)) $+ \posbar.bmp
    drawpic -st @MP3 $rgb(255,0,255) $calc($1 - 15) 72 29 10 278 0 29 10 $shortfn($mpini(Skin)) $+ \posbar.bmp
    halt 
  }
  .timerposbar off
}
;Merci à YuYu pour le snippet
alias -l hexrgb {
  var %he $remove($1, $chr(35))
  var %he1 $base($mid(%he, 1, 2), 16, 10)
  var %he2 $base($mid(%he, 3, 2), 16, 10)
  var %he3 $base($mid(%he, 5, 2), 16, 10)
  return %he1 $+ $iif($2, $chr($2), $chr(44)) $+ %he2 $+ $iif($2, $chr($2), $chr(44)) $+ %he3
}
dialog plist {
  SIZE -1 -1 269 265
  TITLE "mIRCamp"
  ICON mIRCamp\mIRCamp.ico
  OPTION notheme
  BUTTON "",1,0 0 275 20
  BUTTON "",2,0 20 25 240
  BUTTON "",3,0 260 275 38
  BUTTON "",5,267 20 8 240
  LIST 4, 12 20 255 240, size extsel sort
  BUTTON "",999,1 1 1 1, hide ok
}
On *:ACTIVE:@:{
  if ($dialog(plist)) && ($active == @MP3) && ($mpini(Playlist) == ON) && ($mpini(Refresh) != ON) {
    writeini mIRCamp\Options.ini MP3 Refresh ON
    .timerrefreshmp3 -m 1 100 remini mIRCamp\Options.ini MP3 Refresh
    dialog -v plist
    if ($mpini(Playlist) == ON) dialog -e plist
  }
}
On *:dialog:plist:active:*:{
  writeini mIRCamp\Options.ini MP3 Playlist ON
  if ($window(@MP3)) {
    drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 73 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp
    If ($mpini(Refresh) != ON ) { writeini mIRCamp\Options.ini MP3 Refresh ON | .timerrefreshmp3 -m 1 100 remini mIRCamp\Options.ini MP3 Refresh }
    window -a @MP3
    if ($window(@ListDel)) window -a @ListDel
    if ($window(@ListAdd)) window -a @ListAdd
    if ($window(@ListSel)) window -a @ListSel
    if ($window(@ListMisc)) window -a @ListMisc
    if ($window(@ListLoad)) window -a @ListLoad
  }
}
On *:dialog:plist:close:*:{ writeini mIRCamp\Options.ini MP3 Xplsave $dialog(plist).x | writeini mIRCamp\Options.ini MP3 Yplsave $dialog(plist).y | if ($window(@MP3)) drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 61 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
On *:dialog:plist:init:0:{
  if (!$window(@MP3)) dialog -k plist
  dialog -s plist $iif($mpini(Xplsave),$mpini(Xplsave),-1) $iif($mpini(Yplsave),$mpini(Yplsave),-1) 269 265
  window -pfzhdk0B +dL @ListUp -1 -1 275 20
  window -pfzhdk0B +dL @ListLf -1 -1 12 250
  window -pfzhdk0B +dL @ListRt -1 -1 8 250
  window -pfzhdk0B +dL @ListDn -1 -1 275 38
  drawfill -r @ListUp $rgb( [ $hexrgb($right($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,TEXT,NormalBG),6)) ] ) 0 0 0
  drawfill -r @ListLf $rgb( [ $hexrgb($right($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,TEXT,NormalBG),6)) ] ) 0 0 0
  drawfill -r @ListRt $rgb( [ $hexrgb($right($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,TEXT,NormalBG),6)) ] ) 0 0 0
  drawfill -r @ListDn $rgb( [ $hexrgb($right($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,TEXT,NormalBG),6)) ] ) 0 0 0
  drawpic -st @ListUp $rgb(255,0,255) 0 0 25 20 0 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  var %x = 25
  while (%x <= 277) { drawpic -st @ListUp $rgb(255,0,255) %x 0 25 20 127 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp | inc %x 25 }
  drawpic -st @ListUp $rgb(255,0,255) 250 0 25 20 153 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListUp $rgb(255,0,255) 87 0 100 20 26 0 100 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  var %y = 0
  while (%y <= 300) { 
    drawpic -st @ListLf $rgb(255,0,255) 0 %y 12 29 0 42 12 29 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListRt $rgb(255,0,255) 0 %y 8 29 43 42 8 29 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    inc %y 29 
  }
  drawpic -st @ListDn $rgb(255,0,255) 0 0 125 38 0 72 125 38 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListDn $rgb(255,0,255) 125 0 150 38 126 72 150 38 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  dll $mpmdx SetMircVersion $version
  dll $mpmdx MarkDialog $dname
  dll $mpmdx SetDialog $dname style windowedge
  dll $mpmdx SetBorderStyle $dname 4 style windowedge
  dll $mpmdx SetControlMDX $dname 1 Window > $mpdialog
  did -a $dname 1 grab $window(@ListUp).hwnd @ListUp
  dll $mpmdx SetControlMDX $dname 2 Window > $mpdialog
  did -a $dname 2 grab $window(@ListLf).hwnd @ListLf
  dll $mpmdx SetControlMDX $dname 3 Window > $mpdialog
  did -a $dname 3 grab $window(@ListDn).hwnd @ListDn
  dll $mpmdx SetControlMDX $dname 5 Window > $mpdialog
  did -a $dname 5 grab $window(@ListRt).hwnd @ListRt
  var %rgb = $hexrgb($right($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,TEXT,NormalBG),6))
  dll $mpmdx SetColor $dname 4 background $rgb( [ %rgb ] )
  dll $mpmdx SetColor $dname 4 textbg $rgb( [ %rgb ] )
  var %rgb = $hexrgb($right($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,TEXT,Normal),6))
  dll $mpmdx SetColor $dname 4 text $rgb( [ %rgb ] )
  if ($mpini(PLSize) == Small) {
    dialog -s plist $dialog(plist).x $dialog(plist).y 269 -17
    drawpic -st @ListUp $rgb(255,0,255) 0 1 25 14 72 42 25 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    var %x = 25
    while (%x <= 277) { drawpic -st @ListUp $rgb(255,0,255) %x 1 25 14 72 57 25 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp | inc %x 25 }
    drawpic -st @ListUp $rgb(255,0,255) 225 1 50 14 99 42 50 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawsave @ListUp mIRCamp\TempListUp.bmp
  }
  If ($mpini(LoadLastPL) == ON) loadlastpl
}
On *:dialog:plist:dclick:4:{
  if ($mpini(ClicSimple) == ON) halt
  if ($exists($read(mIRCamp\TempPL.txt,$did(plist,4).sel))) mpsplay $read(mIRCamp\TempPL.txt,$did(plist,4).sel)
  writeini mIRCamp\Options.ini MP3 CurrentSong $did(plist,4).sel
}
On *:dialog:plist:sclick:4:{
  mpcloselists
  if ($mpini(ClicSimple) != ON) halt
  if ($exists($read(mIRCamp\TempPL.txt,$did(plist,4).sel))) mpsplay $read(mIRCamp\TempPL.txt,$did(plist,4).sel)
  writeini mIRCamp\Options.ini MP3 CurrentSong $did(plist,4).sel
}
menu @ListUp {
  sclick:{
    mpcloselists

    if ($dialog(plist) == $null) halt 
    ;Deplacer la picwin
    if ($inrect($mouse.x,$mouse.y,0,0,250,20)) { writeini mIRCamp\Options.ini MP3 Xpl $mouse.x | writeini mIRCamp\Options.ini MP3 Ypl $mouse.y | .timerPL2 0 .5 PLmove $!mouse.dx $!mouse.dy }
    ;Fermer la picwin
    if ($inrect($mouse.x,$mouse.y,263,3,9,9)) { drawpic -st @ListUp $rgb(255,0,255) 263 3 9 9 52 42 9 9 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    ;Réduire la picwin
    if ($inrect($mouse.x,$mouse.y,254,3,9,9)) { drawpic -st @ListUp $rgb(255,0,255) 254 3 9 9 62 42 9 9 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
  }
  uclick:{
    if ($dialog(plist) == $null) halt 
    writeini mIRCamp\Options.ini MP3 Xplsave $dialog(plist).x
    writeini mIRCamp\Options.ini MP3 Yplsave $dialog(plist).y
    ;Deplacer la picwin
    .timerPL2 off 
    ;Fermer la picwin
    drawpic -st @ListUp $rgb(255,0,255) 254 3 18 9 158 3 18 9 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    if ($inrect($mouse.x,$mouse.y,264,3,9,9)) { dialog -i plist | writeini mIRCamp\Options.ini MP3 Playlist OFF | drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 61 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp | window -a @MP3 }
    ;Réduire la picwin
    if ($inrect($mouse.x,$mouse.y,254,3,9,9)) { 
      if ($mpini(PLSize) == Large) { 
        writeini mIRCamp\Options.ini MP3 PLSize Small
        dialog -s plist $dialog(plist).x $dialog(plist).y 269 -17
        drawpic -st @ListUp $rgb(255,0,255) 0 1 25 14 72 42 25 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp
        var %x = 25
        while (%x <= 277) { drawpic -st @ListUp $rgb(255,0,255) %x 1 25 14 72 57 25 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp | inc %x 25 }
        drawpic -st @ListUp $rgb(255,0,255) 225 1 50 14 99 42 50 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp
        drawsave @ListUp mIRCamp\TempListUp.bmp
      }
      else { 
        writeini mIRCamp\Options.ini MP3 PLSize Large
        dialog -s plist $dialog(plist).x $dialog(plist).y 269 265
        drawpic -st @ListUp $rgb(255,0,255) 0 0 25 20 0 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
        var %x = 25
        while (%x <= 277) { drawpic -st @ListUp $rgb(255,0,255) %x 0 25 20 127 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp | inc %x 25 }
        drawpic -st @ListUp $rgb(255,0,255) 250 0 25 20 153 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
        drawpic -st @ListUp $rgb(255,0,255) 87 0 100 20 26 0 100 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
      }
    }
  }
  dclick:{
    if ($mpini(PLSize) == Large) { 
      writeini mIRCamp\Options.ini MP3 PLSize Small
      dialog -s plist $dialog(plist).x $dialog(plist).y 269 -17
      drawpic -st @ListUp $rgb(255,0,255) 0 1 25 14 72 42 25 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp
      var %x = 25
      while (%x <= 277) { drawpic -st @ListUp $rgb(255,0,255) %x 1 25 14 72 57 25 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp | inc %x 25 }
      drawpic -st @ListUp $rgb(255,0,255) 225 1 50 14 99 42 50 14 $shortfn($mpini(Skin)) $+ \Pledit.bmp
      drawsave @ListUp mIRCamp\TempListUp.bmp
    }
    else { 
      writeini mIRCamp\Options.ini MP3 PLSize Large
      dialog -s plist $dialog(plist).x $dialog(plist).y 269 265
      drawpic -st @ListUp $rgb(255,0,255) 0 0 25 20 0 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
      var %x = 25
      while (%x <= 277) { drawpic -st @ListUp $rgb(255,0,255) %x 0 25 20 127 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp | inc %x 25 }
      drawpic -st @ListUp $rgb(255,0,255) 250 0 25 20 153 0 25 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
      drawpic -st @ListUp $rgb(255,0,255) 87 0 100 20 26 0 100 20 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    }

  }
}
menu @ListRt { sclick:{ mpcloselists } }
menu @ListLf { sclick:{ mpcloselists } }
menu @ListDn {
  sclick:{
    if ($dialog(plist) == $null) halt

    if ($inrect($mouse.x,$mouse.y,14,8,22,18)) { 
      if (!$window(@ListAdd)) mplistadd
      else window -a @ListAdd
      mpcloselists ListAdd
    }
    if ($inrect($mouse.x,$mouse.y,43,8,22,18)) { 
      if (!$window(@ListDel)) mplistdel
      else window -a @ListDel
      mpcloselists ListDel
    }
    if ($inrect($mouse.x,$mouse.y,72,8,22,18)) { 
      if (!$window(@ListSel)) mplistsel
      else window -a @ListSel
      mpcloselists ListSel
    }
    if ($inrect($mouse.x,$mouse.y,101,8,22,18)) { 
      if (!$window(@ListSel)) mplistmisc
      else window -a @ListMisc
      mpcloselists ListMisc
    }
    if ($inrect($mouse.x,$mouse.y,231,8,22,18)) { 
      if (!$window(@ListLoad)) mplistload
      else window -a @ListLoad
      mpcloselists ListLoad
    }
    if (!$inrect($mouse.x,$mouse.y,14,8,22,18)) && (!$inrect($mouse.x,$mouse.y,43,8,22,18)) && (!$inrect($mouse.x,$mouse.y,72,8,22,18)) && (!$inrect($mouse.x,$mouse.y,101,8,22,18)) && (!$inrect($mouse.x,$mouse.y,231,8,22,18)) { mpcloselists }
    if ($inrect($mouse.x,$mouse.y,130,22,9,9)) { if ($mpini(PLSize) != Small) mpbefore }
    if ($inrect($mouse.x,$mouse.y,139,22,9,9)) { if ($mpini(PLSize) != Small) mpplay }
    if ($inrect($mouse.x,$mouse.y,148,22,9,9)) { if ($mpini(PLSize) != Small) mppause }
    if ($inrect($mouse.x,$mouse.y,157,22,9,9)) { if ($mpini(PLSize) != Small) mpstop }
    if ($inrect($mouse.x,$mouse.y,166,22,9,9)) { if ($mpini(PLSize) != Small) mpnext }
    if ($inrect($mouse.x,$mouse.y,175,22,9,10)) { if ($mpini(PLSize) != Small) mpopen }
  }
}
menu @ListAdd {
  mouse:{
    drawpic -st @ListAdd $rgb(255,0,255) 3 0 22 18 0 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListAdd $rgb(255,0,255) 3 18 22 18 0 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListAdd $rgb(255,0,255) 3 36 22 18 0 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) { drawpic -st @ListAdd $rgb(255,0,255) 3 0 22 18 23 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { drawpic -st @ListAdd $rgb(255,0,255) 3 18 22 18 23 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { drawpic -st @ListAdd $rgb(255,0,255) 3 36 22 18 23 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
  }
  sclick:{
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) { run $$?=" $+ $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,url) $+ " }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { window -c @ListAdd | mpadddir }
    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { 
      :retry
      var %son = $$sfile($iif($mpini(LastOpenDir),$mpini(LastOpenDir),C:\) $+ *.mp3,$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,choosemp3),$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,play))
      if ($right(%son,3) != mp3) && ( $$input($readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,error),ok) != $null ) { Goto retry }
      window -c @ListAdd
      writeini mIRCamp\Options.ini MP3 LastOpenDir $nofile(%son)
      did -i plist 4 $calc($did(plist,4).lines + 1) $iif($mpini(Convert) == ON,$replace($left($nopath(%son),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath(%son),-4))
      write mIRCamp\TempPL.txt %son
    }
    window -c @ListAdd
  }
}
menu @ListDel {
  mouse:{
    drawpic -st @ListDel $rgb(255,0,255) 3 0 22 18 54 168 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListDel $rgb(255,0,255) 3 18 22 18 54 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListDel $rgb(255,0,255) 3 36 22 18 54 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListDel $rgb(255,0,255) 3 54 22 18 54 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) { drawpic -st @ListDel $rgb(255,0,255) 3 0 22 18 77 168 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { drawpic -st @ListDel $rgb(255,0,255) 3 18 22 18 77 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { drawpic -st @ListDel $rgb(255,0,255) 3 36 22 18 77 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,54,22,18)) { drawpic -st @ListDel $rgb(255,0,255) 3 54 22 18 77 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
  }
  sclick:{
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) {
      if ( $input($readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,deadfile)) != $true ) { halt }
      window -c @ListDel
      var %x = 1
      while (%x <= $lines(mIRCamp\TempPL.txt)) {
        if ($exists($read(mIRCamp\TempPL.txt,%x))) { inc %x } 
        else { write -dl $+ %x mIRCamp\TempPL.txt | did -d plist 4 %x }
      }
    }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { window -c @ListDel | did -r plist 4 | write -c mIRCamp\TempPL.txt }

    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { 
      var %line = 1
      write -c mIRCamp\TempPL2.txt
      while (%line <= $did(plist,4,0).sel) {
        write mIRCamp\TempPL2.txt $read(mIRCamp\TempPL.txt,$did(plist,4,%line).sel)
        inc %line
      }
      var %x = 1
      did -r plist 4
      var %files = $lines(mIRCamp\TempPL2.txt)
      while (%x <= %files) {
        did -i plist 4 %x $iif($mpini(Playlistnum) == ON,%x $+ .) $iif($mpini(Convert) == ON,$replace($left($nopath($read(mIRCamp\TempPL2.txt,%x)),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath($read(mIRCamp\TempPL2.txt,%x)),-4))
        inc %x
      }
      .remove mIRCamp\TempPL.txt
      .rename mIRCamp\TempPL2.txt mIRCamp\TempPL.txt 
    }
    if ($inrect($mouse.x,$mouse.y,3,54,22,18)) { 
      window -c @ListDel
      while ($did(plist,4).sel > 0) { write -dl $+ $did(plist,4).sel mIRCamp\TempPL.txt | did -d plist 4 $did(plist,4).sel }
      var %x = 1
      while (%x <= $did(plist,4).lines) { did -o plist 4 %x $iif($mpini(Playlistnum) == ON,%x $+ .) $gettok($did(plist,4,%x).text,2-,32) | inc %x }

    }
    window -c @ListDel
  }
}
alias -l mplistadd {
  if (!$dialog(plist)) halt
  window -pfzhdk0Bo +dL @ListAdd $calc($dialog(plist).x + 11) $calc($dialog(plist).y + 232) 25 54
  drawfill -r @ListAdd 0 0 0 0
  drawpic -st @ListAdd $rgb(255,0,255) 0 0 3 54 48 111 3 54 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListAdd $rgb(255,0,255) 3 0 22 18 0 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListAdd $rgb(255,0,255) 3 18 22 18 0 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListAdd $rgb(255,0,255) 3 36 22 18 0 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
}
alias -l mplistdel {
  if (!$dialog(plist)) halt
  window -pfzhdk0Bo +dL @ListDel $calc($dialog(plist).x + 40) $calc($dialog(plist).y + 214) 25 72
  drawfill -r @ListDel 0 0 0 0
  drawpic -st @ListDel $rgb(255,0,255) 0 0 3 72 100 111 3 72 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListDel $rgb(255,0,255) 3 0 22 18 54 168 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListDel $rgb(255,0,255) 3 18 22 18 54 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListDel $rgb(255,0,255) 3 36 22 18 54 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListDel $rgb(255,0,255) 3 54 22 18 54 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
}
menu @ListSel {
  mouse:{
    drawpic -st @ListSel $rgb(255,0,255) 3 0 22 18 104 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListSel $rgb(255,0,255) 3 18 22 18 104 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListSel $rgb(255,0,255) 3 36 22 18 104 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) { drawpic -st @ListSel $rgb(255,0,255) 3 0 22 18 127 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { drawpic -st @ListSel $rgb(255,0,255) 3 18 22 18 127 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { drawpic -st @ListSel $rgb(255,0,255) 3 36 22 18 127 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
  }
  sclick:{
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) { 
      var %x = 1
      if ($did(plist,4,0).sel > 200) { .echo $input($readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,inv),ok) }
      Else {
        while (%x <= $did(plist,4,0).sel) { var %save = %save $did(plist,4,%x).sel | inc %x }
        var %x = 1
        while (%x <= $did(plist,4).lines) {
          If ($istok(%save,%x,32)) { did -ku plist 4 %x }
          Else { did -kc plist 4 %x }
          inc %x
        }
      }
    }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { window -c @ListSel | did -u plist 4 }
    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { window -c @ListSel | var %x = 1 | while (%x <= $did(plist,4).lines) { did -ck plist 4 %x | inc %x } }
    window -c @ListSel
  }
}
alias -l mplistsel {
  if (!$dialog(plist)) halt
  window -pfzhdk0Bo +dL @ListSel $calc($dialog(plist).x + 69) $calc($dialog(plist).y + 232) 25 54
  drawfill -r @ListSel 0 0 0 0
  drawpic -st @ListSel $rgb(255,0,255) 0 0 3 54 150 111 3 54 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListSel $rgb(255,0,255) 3 0 22 18 104 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListSel $rgb(255,0,255) 3 18 22 18 104 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListSel $rgb(255,0,255) 3 36 22 18 104 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
}
menu @ListMisc {
  mouse:{
    drawpic -st @ListMisc $rgb(255,0,255) 3 0 22 18 154 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListMisc $rgb(255,0,255) 3 18 22 18 154 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListMisc $rgb(255,0,255) 3 36 22 18 154 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) { drawpic -st @ListMisc $rgb(255,0,255) 3 0 22 18 177 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { drawpic -st @ListMisc $rgb(255,0,255) 3 18 22 18 177 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { drawpic -st @ListMisc $rgb(255,0,255) 3 36 22 18 177 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
  }
  sclick:{
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) { if ($dialog(sortmptitles)) dialog -x sortmptitles | dialog -m sortmptitles sortmptitles }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { window -c @ListMisc | dialog -m mp3tag mp3tag }
    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { window -c @ListMisc | htmlmp3list }
    window -c @ListMisc 
  }
}
alias -l mplistmisc {
  if (!$dialog(plist)) halt
  window -pfzhdk0Bo +dL @ListMisc $calc($dialog(plist).x + 98) $calc($dialog(plist).y + 232) 25 54
  drawfill -r @ListMisc 0 0 0 0
  drawpic -st @ListMisc $rgb(255,0,255) 0 0 3 54 200 111 3 54 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListMisc $rgb(255,0,255) 3 0 22 18 154 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListMisc $rgb(255,0,255) 3 18 22 18 154 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListMisc $rgb(255,0,255) 3 36 22 18 154 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
}
menu @ListLoad {
  mouse:{
    drawpic -st @ListLoad $rgb(255,0,255) 3 0 22 18 204 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListLoad $rgb(255,0,255) 3 18 22 18 204 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    drawpic -st @ListLoad $rgb(255,0,255) 3 36 22 18 204 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) { drawpic -st @ListLoad $rgb(255,0,255) 3 0 22 18 227 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { drawpic -st @ListLoad $rgb(255,0,255) 3 18 22 18 227 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { drawpic -st @ListLoad $rgb(255,0,255) 3 36 22 18 227 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp }
  }
  sclick:{
    if ($inrect($mouse.x,$mouse.y,3,0,22,18)) { window -c @ListLoad | did -r plist 4 | write -c mIRCamp\TempPL.txt }
    if ($inrect($mouse.x,$mouse.y,3,18,22,18)) { 
      window -c @ListLoad 
      If ($lines(mIRCamp\TempPL.txt) < 1) halt 
      :retry
      var %file = $$sfile($mircdir $+ mIRCamp\*.pli,$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,saveas),$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,save))
      if ($right(%file,4) != .pli) Goto retry
      If ($window(@MP3).ontop) window -u @MP3 | dialog -n plist
      if ($exists(%file)) && ($$?!=" $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,over) " == $false) { halt }
      If ($mpini(OnTop) == ON) { window -o @MP3 | dialog -o plist }
      write -c %file
      var %x = 1
      while (%x <= $lines(mIRCamp\TempPL.txt)) { write %file $read(mIRCamp\TempPL.txt,%x) | inc %x }
      window -a @MP3
      dialog -v plist
    }
    if ($inrect($mouse.x,$mouse.y,3,36,22,18)) { 
      window -c @ListLoad
      :retry
      var %file = $$sfile($iif($mpini(LastAddDir),$mpini(LastAddDir),$mircdir $+ mIRCamp\) $+ *.pli,$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,openpl),$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,open))
      if (!$exists(%file)) || ($right(%file,4) != .pli) Goto retry
      write -c mIRCamp\TempPL.txt
      var %x = 1
      while (%x <= $lines(%file)) { write mIRCamp\TempPL.txt $read(%file,%x) | inc %x }
      did -r plist 4
      var %x = 1
      while (%x <= $lines(mIRCamp\TempPL.txt)) { did -i plist 4 %x $iif($mpini(Playlistnum) == ON,%x $+ .) $iif($mpini(Convert) == ON,$replace($left($nopath($read(mIRCamp\TempPL.txt,%x)),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath($read(mIRCamp\TempPL.txt,%x)),-4)) | inc %x }
    }
    window -c @ListLoad
  }
}
alias -l mplistload {
  if (!$dialog(plist)) halt
  window -pfzhdk0Bo +dL @ListLoad $calc($dialog(plist).x + 228) $calc($dialog(plist).y + 232) 25 54
  drawfill -r @ListLoad 0 0 0 0
  drawpic -st @ListLoad $rgb(255,0,255) 0 0 3 54 250 111 3 54 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListLoad $rgb(255,0,255) 3 0 22 18 204 111 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListLoad $rgb(255,0,255) 3 18 22 18 204 130 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
  drawpic -st @ListLoad $rgb(255,0,255) 3 36 22 18 204 149 22 18 $shortfn($mpini(Skin)) $+ \Pledit.bmp
}
alias -l mpadddir {
  var %dir = $$sdir($iif($mpini(LastAddDir),$mpini(LastAddDir),C:\),$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,adddir))
  writeini mIRCamp\Options.ini MP3 LastAddDir %dir
  var %x = 1,%files = $findfile(%dir,*.mp3,0)
  window -pfzhdk0Bo +dL @Loading $calc($dialog(plist).x + 37) $calc($dialog(plist).y + 138) 200 20
  drawfill -r @Loading $rgb(255,255,255) 0 0 0
  drawrect -r @Loading $rgb(0,0,0) 2 0 0 200 20
  var %rgb = $rand(20,240) $+ , $+ $rand(20,240) $+ , $+ $rand(20,240)
  while (%x <= %files) { 
    drawrect -rf @Loading $rgb( [ %rgb ] ) 0 2 2 $calc(%x / %files * 196) 16
    write mIRCamp\TempPL.txt $findfile(%dir,*.mp3,%x)
    did -i plist 4 $calc($did(plist,4).lines + 1) $iif($mpini(Playlistnum) == ON,$calc($did(plist,4).lines + 1) $+ .) $iif($mpini(Convert) == ON,$replace($left($nopath($findfile(%dir,*.mp3,%x)),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath($findfile(%dir,*.mp3,%x)),-4))
    inc %x
  }
  window -c @Loading
}
alias -l mpopen {
  :retry
  var %son = $$sfile($iif($mpini(LastOpenDir),$mpini(LastOpenDir),C:\) $+ *.mp3,$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,choosemp3),$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,play))
  If ($window(@MP3).ontop) { window -u @MP3 | dialog -n plist }
  if ($right(%son,3) != mp3) && ( $$input($readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,error),ok) != $null ) { Goto retry }
  If ($mpini(OnTop) == ON) { window -o @MP3 | dialog -o plist }
  writeini mIRCamp\Options.ini MP3 LastOpenDir $nofile(%son)
  If ($dialog(plist)) { 
    did -r plist 4
    did -i plist 4 1 $iif($mpini(Convert) == ON,$replace($left($nopath(%son),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath(%son),-4))
  }
  write -c mIRCamp\TempPL.txt 
  write mIRCamp\TempPL.txt %son
  mpsplay %son
  writeini mIRCamp\Options.ini MP3 CurrentSong 1
}
alias -l mpbefore {
  if (!$dialog(plist)) halt 
  if ($mpini(Shuffle) == ON) {
    :retry
    var %x = $rand(1,$lines(mIRCamp\TempPL.txt))
    if (%x == readini(mIRCamp\Options.ini,MP3,CurrentSong)) Goto retry
    did -c plist 4 %x
    writeini mIRCamp\Options.ini MP3 CurrentSong %x
    mpsplay $read(mIRCamp\TempPL.txt,%x)
    halt
  }
  if ($did(plist,4).lines > 1) && ($mpini(CurrentSong) != 1) && ($mpini(CurrentSong)) { 
    writeini mIRCamp\Options.ini MP3 CurrentSong $calc($mpini(CurrentSong) - 1)
    mpsplay $read(mIRCamp\TempPL.txt,$mpini(CurrentSong))
    did -c plist 4 $mpini(CurrentSong)
    halt
  }
  if ($did(plist,4).lines == 1) halt
  if ($did(plist,4).lines > 1) && ($mpini(CurrentSong) == 1) && ($mpini(CurrentSong)) && ($mpini(Repeat) == ON) { 
    writeini mIRCamp\Options.ini MP3 CurrentSong $lines(mIRCamp\TempPL.txt)
    mpsplay $read(mIRCamp\TempPL.txt,$mpini(CurrentSong))
    did -c plist 4 $mpini(CurrentSong)
  }
}
alias -l mpnext {
  if (!$dialog(plist)) halt 
  if ($mpini(Shuffle) == ON) {
    :retry
    var %x = $rand(1,$lines(mIRCamp\TempPL.txt))
    if (%x == readini(mIRCamp\Options.ini,MP3,CurrentSong)) Goto retry
    did -c plist 4 %x
    writeini mIRCamp\Options.ini MP3 CurrentSong %x
    mpsplay $read(mIRCamp\TempPL.txt,%x)
    halt
  }
  if ($did(plist,4).lines == 1) { mpsplay $insong.fname | halt }
  if ($did(plist,4).lines > 1) && ($mpini(CurrentSong) != $lines(mIRCamp\TempPL.txt)) && ($mpini(CurrentSong)) { 
    writeini mIRCamp\Options.ini MP3 CurrentSong $calc($mpini(CurrentSong) + 1)
    mpsplay $read(mIRCamp\TempPL.txt,$mpini(CurrentSong))
    did -c plist 4 $mpini(CurrentSong)
    halt
  }
  if ($did(plist,4).lines == 1) halt
  if ($did(plist,4).lines > 1) && ($mpini(CurrentSong) == $lines(mIRCamp\TempPL.txt)) && ($mpini(CurrentSong)) && ($mpini(Repeat) == ON) { 
    writeini mIRCamp\Options.ini MP3 CurrentSong 1
    mpsplay $read(mIRCamp\TempPL.txt,$mpini(CurrentSong))
    did -c plist 4 $mpini(CurrentSong)
  }
}
alias -l mppause {
  if ($insong.fname) && ($mpini(Paused) != ON) { splay pause | writeini mIRCamp\Options.ini MP3 Paused ON | drawpic -st @MP3 $rgb(255,0,255) 26 28 9 9 9 0 9 9 $shortfn($mpini(Skin)) $+ \playpaus.bmp | halt }
  if ($insong.fname) && ($mpini(Paused) == ON) { splay resume | writeini mIRCamp\Options.ini MP3 Paused OFF | drawpic -st @MP3 $rgb(255,0,255) 26 28 9 9 0 0 9 9 $shortfn($mpini(Skin)) $+ \playpaus.bmp | halt }
}
alias -l mpplay {
  if ($mpini(Paused) == ON) { mppause | halt }
  if (!$dialog(plist)) || ($did(plist,4).lines < 1) halt
  If (!$did(plist,4).sel) { writeini mIRCamp\Options.ini MP3 CurrentSong 1 | mpsplay $read(mIRCamp\TempPL.txt,$mpini(CurrentSong)) | did -c plist 4 1 | halt }
  If ($did(plist,4).sel) { writeini mIRCamp\Options.ini MP3 CurrentSong $did(plist,4).sel | mpsplay $read(mIRCamp\TempPL.txt,$mpini(CurrentSong)) | did -c plist 4 $did(plist,4).sel | halt }
}
alias -l mpsplay {
  writeini mIRCamp\Options.ini MP3 Paused OFF 
  splay $1-
  If ($mpini(Size) != Small) {
    maindesign
    drawpic -st @MP3 $rgb(255,0,255) 26 28 9 9 0 0 9 9 $shortfn($mpini(Skin)) $+ \playpaus.bmp
    if ($len($sound($insong.fname).bitrate) > 2) drawtext -c @MP3 $mpini(KbpsColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 110 42 16 8 $sound($insong.fname).bitrate
    else drawtext -c @MP3 $mpini(KbpsColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 115 41 16 8 $sound($insong.fname).bitrate
    drawtext -c @MP3 $mpini(KbpsColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 155 41 12 8 $left($sound($insong.fname).sample,2)
    drawtext -c @MP3 $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 110 25 157 10 $upper($left($nopath($insong.fname),-4)) ( $+ $asctime($calc($sound($insong.fname).length /1000),n:ss) $+ )
    if ($mpini(OnTop) == ON) { drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 312 53 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp }
    else { drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 304 9 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp }
  }
  If ($mpini(PLSize) != Small) {
    drawpic -st @ListDn $rgb(255,0,255) 135 8 32 8 136 80 32 7 $shortfn($mpini(Skin)) $+ \pledit.bmp
    drawtext -c @ListDn $mpini(TitleColor) $iif($readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font) && ($mpini(SkinFont) == ON),$readini($shortfn($mpini(Skin)) $+ \Pledit.txt,Text,Font),Arial) 8 135 8 32 8 $asctime($calc($sound($insong.fname).length /1000),n : ss) s
  }
  set %MP3-Title-X $upper($left($nopath($insong.fname),-4)) ( $+ $asctime($calc($sound($insong.fname).length /1000),n:ss) $+ )
  .timertitle -m 0 1000 picanim
}
alias -l mpini return $readini(mIRCamp\Options.ini,MP3,$1-)
alias -l maindesign {
  if (!$window(@MP3)) halt
  drawpic -st @MP3 $rgb(255,0,255) 0 0 275 116 0 0 275 116 mIRCamp\tempmain.bmp
  if ($mpini(Shuffle) == ON) { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 30 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  Else { drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 0 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  if ($mpini(Repeat) == ON ) { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 30 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  Else { drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 0 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  if ($mpini(Playlist) == ON ) { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 73 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  Else { drawpic -st @MP3 $rgb(255,0,255) 242 58 23 12 23 61 23 12 $shortfn($mpini(Skin)) $+ \shufrep.bmp }
  var %x = 2340.535714,%y = 0
  while (%y <= 29) { if ($vol(master) >= $calc(%x * %y)) && ($vol(master) < $calc(%x * (%y + 1))) { drawpic -st @MP3 $rgb(255,0,255) 107 57 68 13 0 $calc($calc(%y - 1) * 15) 68 13 $shortfn($mpini(Skin)) $+ \volume.bmp | break } | inc %y }
}
On *:MP3END:{
  if ($window(@MP3)) { 
    writeini mIRCamp\Options.ini MP3 Paused OFF
    if ($mpini(SIZE) != Small) maindesign 
    else { 
      drawpic -st @MP3 $rgb(255,0,255) 0 0 275 14 27 29 275 14 $shortfn($mpini(Skin)) $+ \titlebar.bmp
      drawpic -st @MP3 $rgb(255,0,255) 264 3 9 9 18 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
      drawpic -st @MP3 $rgb(255,0,255) 254 3 9 9 0 18 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
      drawpic -st @MP3 $rgb(255,0,255) 244 3 9 9 9 0 9 9 $shortfn($mpini(Skin)) $+ \titlebar.bmp
    }
    mpnext
  }
}
alias -l mpviews return $shortfn($mircdir $+ mIRCamp\dlls\views.mdx)
alias -l mpdialog return $shortfn($mircdir $+ mIRCamp\dlls\dialog.mdx)
alias -l mpmdx return $shortfn($mircdir $+ mIRCamp\dlls\mdx.dll)
alias -l mpstop { 
  splay stop 
  If ($mpini(Size) != Small) { maindesign | drawpic -st @MP3 $rgb(255,0,255) 26 28 9 9 18 0 9 9 $shortfn($mpini(Skin)) $+ \playpaus.bmp }
  else { drawpic -st @MP3 $rgb(255,0,255) 120 0 45 14 147 29 45 14 $shortfn($mpini(Skin)) $+ \Titlebar.bmp }
  If ($mpini(PLSize) != Small) { 
    drawpic -st @ListDn $rgb(255,0,255) 131 8 32 8 132 81 32 8 $shortfn($mpini(Skin)) $+ \pledit.bmp
    drawpic -st @ListDn $rgb(255,0,255) 189 21 32 10 190 94 32 8 $shortfn($mpini(Skin)) $+ \pledit.bmp
  }
  Else { if ($exists(mIRCamp\TempListUp.bmp)) drawpic -st @ListUp $rgb(255,0,255) 0 0 275 20 0 0 275 20 mIRCamp\TempListUp.bmp }
}
alias -l mpcloselists {
  if ($window(@ListDel)) && ($1 != ListDel) window -c @ListDel
  if ($window(@ListAdd)) && ($1 != ListAdd) window -c @ListAdd
  if ($window(@ListSel)) && ($1 != ListSel) window -c @ListSel
  if ($window(@ListMisc)) && ($1 != ListMisc) window -c @ListMisc
  if ($window(@ListLoad)) && ($1 != ListLoad) window -c @ListLoad
}
alias -l PLmove { if ($dialog(plist)) && ($mouse.key == 1) { dialog -s plist $calc($1 - $mpini(Xpl)) $calc($2 - $mpini(Ypl)) $iif($mpini(PLSize) == Large,269 265,269 -17) } | else .timerPL2 off }
alias -l htmlmp3list {
  If ($window(@MP3).ontop) { window -u @MP3 | dialog -n plist }
  If (!$input($readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,html),,HMTL ?)) halt
  If ($mpini(OnTop) == ON) { window -o @MP3 | dialog -o plist }
  var %TotalFiles = $lines(mIRCamp\TempPL.txt)
  var %x = 1
  var %TotalSize = 0
  while (%x < %TotalFiles) { inc %TotalSize $file($read(mIRCamp\TempPL.txt,%x)).size | inc %x }
  var %TotalSize $int($calc(%TotalSize / 1024000)) Mb
  var %x = 1
  var %TotalLength = 0
  while ( %x < %TotalFiles) { inc %TotalLength $sound($read(mIRCamp\TempPL.txt,%x)).length | inc %x }
  var %TotalLength $duration($int($calc(%TotalLength / 1000)))
  write -c mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <html><head><meta http-equiv="Content-Language" content="fr"><meta name="Generator" content="mIRCamp 1.07 (www.0nline.fr.st)">
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <title>Liste MP3 ( $+ $asctime(dd/mm/yy) $+ ) $+ </title>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm </head>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <body link="#FFFFFF" vlink="#FFFF00" alink="#FFFF00" text="#FFFFFF" bgcolor="#000000">
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <p align="center"><font face="Verdana" size="2"><b>Liste MP3 le <i><font color="#FF9933"> $+ $asctime(dd/mm/yy à HH) $+ h $+ $asctime(nn) $+ </font></i><br>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm </b><i><font color="#FF9933"> $+ %TotalFiles mp3</font> : <font color="#FF9933"> $+ %TotalLength $+ </font> $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,htmlpl1) (<font color="#FF9933"> $+ %TotalSize $+ </font>)</i></font></p>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <div align="center"><center>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1" bordercolorlight="#000000" bordercolordark="#000000" bordercolor="#333333" bgcolor="#666666">
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <tr>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="5%" align="center" bgcolor="#999999"><b><font size="2" face="Verdana" color="#000000"> $+ N° $+ </font></b></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="55%" align="center" bgcolor="#999999"><b><p style="margin-left: 5" align="left"><font size="2" face="Verdana" color="#000000"> $+ Mp3 $+ </font></b></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="10%" align="center" bgcolor="#999999"><b><font size="2" face="Verdana" color="#000000"> $+ $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,length) $+ </font></b></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="10%" align="center" bgcolor="#999999"><b><font size="2" face="Verdana" color="#000000""> $+ $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,size) $+ </font></b></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="10%" align="center" bgcolor="#999999"><b><font size="2" face="Verdana" color="#000000"> $+ $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,kbps) $+ </font></b></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="10%" align="center" bgcolor="#999999"><b><font size="2" face="Verdana" color="#000000"> $+ $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,genre) $+ </font></b></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm </tr>
  window -a @MP3 
  dialog -v plist
  window -pfzhdk0Bo +dL @Loading $calc($dialog(plist).x + 37) $calc($dialog(plist).y + 138) 200 20
  drawfill -rf @Loading $rgb(255,255,255) 0 0 0
  drawrect -r @Loading $rgb(0,0,0) 2 0 0 200 20
  var %rgb == $rand(20,240) $+ , $+ $rand(20,240) $+ , $+ $rand(20,240)

  var %inc = 1
  :loop
  drawrect -r @Loading $rgb( [ %rgb ] ) 0 2 2 $calc(%inc / %TotalFiles * 196) 16
  If ( $calc($int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000)) - $int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000 / 60))*60) > 9 ) {
    var %Length = $int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000 / 60)) $+ : $+ $calc($int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000)) - $int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000 / 60))*60)
  }
  If ( $calc($int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000)) - $int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000 / 60))*60) < 10 ) {
    var %Length = $int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000 / 60)) $+ : $+ 0 $+ $calc($int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000)) - $int($calc($sound($read(mIRCamp\TempPL.txt,%inc)).length / 1000 / 60))*60)
  }
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <tr>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="5%" align="center"><b><font size="2" face="Verdana"> $+ %inc $+ </font></b></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="55%" align="center"><p style="margin-left: 5" align="left"><font size="2" face="Verdana"> $+ $left($nopath($read(mIRCamp\TempPL.txt,%inc)),-4) $+ </font></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="10%" align="center"><font size="2" face="Verdana"> $+ %Length $+ </font></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="10%" align="center"><font size="2" face="Verdana"> $+ $round($calc($file($read(mIRCamp\TempPL.txt,%inc)).size / 1024000),2) Mb $+ </font></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="10%" align="center"><font size="2" face="Verdana"> $+ $sound($read(mIRCamp\TempPL.txt,%inc)).bitrate kbps $+ </font></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm <td width="10%" align="center"><font size="2" face="Verdana"> $+ $sound($read(mIRCamp\TempPL.txt,%inc)).genre $+ </font></td>
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm </tr>
  inc %inc 1
  If ( %inc > %TotalFiles) { Goto end }
  Goto loop
  :end
  window -c @Loading
  write mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm </table></center></div></body></html>
  run mIRCamp\Mp3List- $+ $asctime(dd-mm-yy) $+ .htm
}
dialog sortmptitles {
  title ""
  size 1 1 1 1
  option dbu
  button "", 1, 140 92 55 12, ok
  list 2, 5 20 190 70, size extsel
}
On *:dialog:sortmptitles:init:0:{
  dll $mpmdx SetMircVersion $version 
  dll $mpmdx MarkDialog $dname
  dll $mpmdx SetControlMDX 2 listview report sortascending > $mpviews
  did -i $dname 2 1 headerdims 100 100
  did -i $dname 2 1 headertext $mptab(Titres,titres2)
  dialog -s sortmptitles 50 50 200 200
  window -a @MP3
  dialog -v plist

  var %x = 1,%load = 1
  while (%x <= $lines(mIRCamp\TempPL.txt)) { did -i sortmptitles 2 %x $mptab($nopath($read(mIRCamp\TempPL.txt,%x)),$read(mIRCamp\TempPL.txt,%x)) | inc %x }
  write -c mIRCamp\TempPL.txt
  var %x = 2
  while (%x <= $did(sortmptitles,2).lines) { write mIRCamp\TempPL.txt $gettok($gettok($did(sortmptitles,2,%x).text,2-,9),5-,32) | inc %x }
  dialog -x sortmptitles
  var %x = 1
  did -r plist 4
  while (%x <= $lines(mIRCamp\TempPL.txt)) { did -i plist 4 %x $iif($mpini(Playlistnum) == ON,%x $+ .) $iif($mpini(Convert) == ON,$replace($left($nopath($read(mIRCamp\TempPL.txt,%x)),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath($read(mIRCamp\TempPL.txt,%x)),-4)) | inc %x }
}
alias -l mppicwindesign {
  If (!$dialog(mpoptions)) halt
  window -pfzhdk0B +dL @TempView -32000 -32000 275 116
  drawpic -st @TempView $rgb(255,0,255) 0 0 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \main.bmp
  drawpic -st @TempView $rgb(255,0,255) 0 0 275 14 27 0 275 14 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \titlebar.bmp
  drawpic -st @TempView $rgb(255,0,255) 16 88 114 18 0 0 114 18 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \cbuttons.bmp
  drawpic -st @TempView $rgb(255,0,255) 136 89 22 16 114 0 22 16 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \cbuttons.bmp
  drawpic -st @TempView $rgb(255,0,255) 264 3 9 9 18 0 9 9 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \titlebar.bmp
  drawpic -st @TempView $rgb(255,0,255) 254 3 9 9 0 18 9 9 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \titlebar.bmp
  drawpic -st @TempView $rgb(255,0,255) 244 3 9 9 9 0 9 9 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \titlebar.bmp
  drawpic -st @TempView $rgb(255,0,255) 220 58 23 12 0 61 22 13 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \shufrep.bmp
  drawpic -st @TempView $rgb(255,0,255) 6 3 9 9 0 0 9 9 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \titlebar.bmp
  drawpic -st @TempView $rgb(255,0,255) 16 72 248 10 0 0 248 10 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \posbar.bmp
  drawpic -st @TempView $rgb(255,0,255) 11 22 9 43 304 0 8 43 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \titlebar.bmp
  drawpic -st @TempView $rgb(255,0,255) 6 3 9 9 0 0 9 9 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \titlebar.bmp
  drawpic -st @TempView $rgb(255,0,255) 177 57 37 13 9 0 37 13 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \balance.bmp
  drawpic -st @TempView $rgb(255,0,255) 239 41 28 12 0 12 28 12 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \monoster.bmp
  drawpic -st @TempView $rgb(255,0,255) 212 41 28 12 29 12 28 12 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \monoster.bmp
  drawpic -st @TempView $rgb(255,0,255) 10 22 8 43 304 0 8 43 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \titlebar.bmp
  drawpic -st @TempView $rgb(255,0,255) 26 28 9 9 18 0 9 9 $shortfn($gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)) $+ \playpaus.bmp
  drawsave @TempView mIRCamp\TempView.bmp
  window -c @TempView
}
dialog mpoptions {
  title "Options mIRCamp"
  size -1 -1 164 182
  option dbu
  icon mIRCamp\mIRCamp.ico, 0
  tab "", 19, 2 2 160 176
  box "", 11, 5 122 155 40, tab 19
  box "", 4, 5 39 155 83, tab 19
  box "", 1, 5 17 86 22, tab 19
  radio "", 14, 66 148 50 10, tab 19
  radio "", 13, 11 148 50 10, tab 19
  text "", 16, 7 166 100 8, tab 19
  combo 2, 8 25 80 50, tab 19 size drop
  link "N[yk]O`18", 18, 113 30 27 8, tab 19
  text "mIRCamp 1.07", 17, 94 23 65 8, tab 19 center
  check "", 12, 11 139 130 10, tab 19
  check "", 10, 11 130 130 10, tab 19
  check "", 15, 11 92 145 10, tab 19
  check "", 9, 11 83 145 10, tab 19
  check "", 8, 11 74 145 10, tab 19
  check "", 7, 11 65 145 10, tab 19
  check "", 6, 11 56 145 10, tab 19
  check "", 5, 11 47 145 10, tab 19
  check "", 33, 11 101 145 10, tab 19
  check "", 34, 11 110 145 10, tab 19
  tab "", 20
  box "", 21, 5 17 155 82, tab 20
  list 22, 8 25 149 61, tab 20 size
  button "", 23, 8 87 37 10, tab 20
  button "", 24, 46 87 37 10, disable tab 20
  button "", 25, 120 87 37 10, disable tab 20
  icon 26, 8 106 147 51,  mIRCamp\TempView.bmp, 0, tab 20
  box "", 28, 5 99 155 63, tab 20
  text "", 27, 6 166 60 8, tab 20 center
  button "", 29, 69 164 50 12, tab 20
  tab "", 30
  icon 31, 5 20 153 16,  mIRCamp\Infos.bmp, 0, tab 30
  edit "", 32, 5 40 155 122, tab 30 multi return hsbar vsbar
  button "", 3, 120 164 40 12, ok
}
On *:dialog:mpoptions:init:0:{
  dll $mpmdx SetMircVersion $version 
  dll $mpmdx MarkDialog $dname
  dll $mpmdx SetControlMDX $dname 22 listview showsel infotip report rowselect sortascending > $mpviews
  did -i $dname 22 1 headerdims 100 190
  did -i $dname 22 1 headertext $mptab(Nom,Répertoire)
  var %x = 1,%total = $findfile(mIRCamp\Langages\,*.ini,0)
  while (%x <= %total) { did -i mpoptions 2 %x $nopath($findfile(mIRCamp\Langages\,*.ini,%x)) | inc %x }
  If ($mpini(Convert) == ON) did -c mpoptions 5
  If ($mpini(ClicSimple) == ON) did -c mpoptions 6
  If ($mpini(DefTitle) == ON) did -c mpoptions 7
  If ($mpini(SkinFont) == ON) did -c mpoptions 8
  If ($mpini(PlaylistNum) == ON) did -c mpoptions 9
  If ($mpini(OnTop) == ON) did -c mpoptions 15
  If ($mpini(Shuffle) == ON) did -c mpoptions 10
  If ($mpini(Repeat) == ON) did -c mpoptions 12
  If ($mpini(Duree) == R) did -c mpoptions 13
  Else did -c mpoptions 14
  If ($mpini(Hang) == ON) did -c mpoptions 33
  If ($mpini(LoadLastPL) == ON) || (%ViewSkinOnly) did -c mpoptions 34
  unset %ViewSkinOnly
  Else did -c mpoptions 14
  var %x = 1
  while (%x <= $lines(mIRCamp\Skins\Skins.txt)) { did -a mpoptions 22 %x $mptab($gettok($read(mIRCamp\Skins\Skins.txt,%x),1,1),$gettok($read(mIRCamp\Skins\Skins.txt,%x),2,1)) | inc %x }
  var %x = 1
  while (%x <= $did(2).lines) { if ($did(2,%x).text == $mpini(Langue)) did -c mpoptions 2 %x | inc %x }
  mpoptionslangage
  var %x = 1
  while (%x <= $lines(mIRCamp\Readme.txt)) { did -i mpoptions 32 %x $read(mIRCamp\Readme.txt,%x) | inc %x }
}
On *:dialog:mpoptions:sclick:2:{ writeini mIRCamp\Options.ini MP3 Langue $did(2).text | mpoptionslangage }
On *:dialog:mpoptions:sclick:5:{ 
  If ($mpini(Convert) == ON) { writeini mIRCamp\Options.ini MP3 Convert OFF | halt }
  Else { writeini mIRCamp\Options.ini MP3 Convert ON | halt }
}
On *:dialog:mpoptions:sclick:6:{ 
  If ($mpini(ClicSimple) == ON) { writeini mIRCamp\Options.ini MP3 ClicSimple OFF | halt }
  Else { writeini mIRCamp\Options.ini MP3 ClicSimple ON | halt }
}
On *:dialog:mpoptions:sclick:7:{ 
  If ($mpini(DefTitle) == ON) { writeini mIRCamp\Options.ini MP3 DefTitle OFF | halt }
  Else { writeini mIRCamp\Options.ini MP3 DefTitle ON | halt }
}
On *:dialog:mpoptions:sclick:8:{ 
  If ($mpini(SkinFont) == ON) { writeini mIRCamp\Options.ini MP3 SkinFont OFF | halt }
  Else { writeini mIRCamp\Options.ini MP3 SkinFont ON | halt }
}
On *:dialog:mpoptions:sclick:9:{ 
  If ($mpini(PlaylistNum) == ON) { writeini mIRCamp\Options.ini MP3 PlaylistNum OFF | halt }
  Else { writeini mIRCamp\Options.ini MP3 PlaylistNum ON | halt }
}
On *:dialog:mpoptions:sclick:10:{ 
  if ($mpini(Shuffle) == ON) { if ($window(@MP3)) drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 0 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Shuffle OFF | halt }
  Else { if ($window(@MP3)) drawpic -st @MP3 $rgb(255,0,255) 164 89 46 15 28 30 46 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Shuffle ON | halt }
}
On *:dialog:mpoptions:sclick:12:{ 
  if ($mpini(Repeat) == ON) { if ($window(@MP3)) drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 0 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Repeat OFF | halt }
  Else { if ($window(@MP3)) drawpic -st @MP3 $rgb(255,0,255) 210 89 28 15 0 30 28 15 $shortfn($mpini(Skin)) $+ \shufrep.bmp | writeini mIRCamp\Options.ini MP3 Repeat ON | halt }
}
On *:dialog:mpoptions:sclick:13:{ writeini mIRCamp\Options.ini MP3 Duree R }
On *:dialog:mpoptions:sclick:14:{ writeini mIRCamp\Options.ini MP3 Duree E }
On *:dialog:mpoptions:sclick:15:{ 
  if ($mpini(OnTop) == ON) { writeini mIRCamp\Options.ini MP3 OnTop OFF | if ($window(@MP3)) window -u @MP3 | if ($window(@MP3)) drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 304 9 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp | if ($dialog(plist)) dialog -n plist }
  else { writeini mIRCamp\Options.ini MP3 OnTop ON | if ($window(@MP3)) window -o @MP3 | if ($window(@MP3)) drawpic -st @MP3 $rgb(255,0,255) 11 31 8 8 312 53 8 8 $shortfn($mpini(Skin)) $+ \titlebar.bmp | if ($dialog(plist)) dialog -o plist }
}
On *:dialog:mpoptions:sclick:18:{ run mailto:nyko.18@club-internet.fr?subject=mIRCamp 1.07 }
On *:dialog:mpoptions:sclick:22:{ if ($did(22).sel > 0 ) did -e mpoptions 24,25 | else did -b mpoptions 24,25 }
On *:dialog:mpoptions:sclick:23:{ 
  var %skin = $$sdir($mpini(Skin),$readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,1))
  if ($exists(%skin $+ \Main.bmp)) && ($exists(%skin $+ \balance.bmp)) && ($exists(%skin $+ \cbuttons.bmp)) && ($exists(%skin $+ \monoster.bmp)) && (($exists(%skin $+ \nums_ex.bmp)) || ($exists(%skin $+ \numbers.bmp))) && ($exists(%skin $+ \playpaus.bmp)) && ($exists(%skin $+ \pledit.bmp)) && ($exists(%skin $+ \posbar.bmp)) && ($exists(%skin $+ \shufrep.bmp)) && ($exists(%skin $+ \titlebar.bmp)) && ($exists(%skin $+ \volume.bmp)) && ($exists(%skin $+ \pledit.txt)) {
    write $mircdir $+ mIRCamp\Skins\Skins.txt $gettok(%skin,$gettok(%skin,0,92),92) $+ $chr(1) $+ %skin
    did -r mpoptions 22
    var %x = 1
    while (%x <= $lines(mIRCamp\Skins\Skins.txt)) { did -a mpoptions 22 %x $mptab($gettok($read(mIRCamp\Skins\Skins.txt,%x),1,1),$gettok($read(mIRCamp\Skins\Skins.txt,%x),2,1)) | inc %x }
  }
  Else { .echo $input($readini(mIRCamp\Langages\ $+ $mpini(Langue),DIVERS,skinsf),ok) }
}
On *:dialog:mpoptions:sclick:24:{ write -dl $+ $did(22).sel $shortfn($mpini(Skin)) $+ \Skins.txt | did -d mpoptions 22 $did(22).sel }
On *:dialog:mpoptions:sclick:25:{ mppicwindesign | did -g mpoptions 26 mIRCamp\TempView.bmp }
On *:dialog:mpoptions:sclick:29:{
  writeini mIRCamp\Options.ini MP3 Skin $gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)
  .timertitle OFF 
  writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x
  writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y 
  window -c @MP3 
  if ($dialog(plist)) dialog -k plist
  set %ViewSkinOnly ON
  .timermircamp -m 1 500 mircamp
}
On *:dialog:mpoptions:dclick:22:{
  writeini mIRCamp\Options.ini MP3 Skin $gettok($gettok($did(mpoptions,22).seltext,2,9),5-,32)
  .timertitle OFF 
  writeini mIRCamp\Options.ini MP3 Xsave $window(@MP3).x
  writeini mIRCamp\Options.ini MP3 Ysave $window(@MP3).y 
  window -c @MP3 
  if ($dialog(plist)) dialog -k plist
  set %ViewSkinOnly ON
  .timermircamp -m 1 500 mircamp
}
On *:dialog:mpoptions:sclick:33:{ 
  If ($mpini(Hang) == ON) { writeini mIRCamp\Options.ini MP3 Hang OFF | halt }
  Else { writeini mIRCamp\Options.ini MP3 Hang ON | halt }
}
On *:dialog:mpoptions:sclick:34:{ 
  If ($mpini(LoadLastPL) == ON) { writeini mIRCamp\Options.ini MP3 LoadLastPL OFF | halt }
  Else { writeini mIRCamp\Options.ini MP3 LoadLastPL ON | halt }
}
alias -l mpoptionslangage {
  did -ra mpoptions 1 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,1)
  did -ra mpoptions 3 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,3)
  did -ra mpoptions 4 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,4)
  did -ra mpoptions 5 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,5)
  did -ra mpoptions 6 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,6)
  did -ra mpoptions 7 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,7)
  did -ra mpoptions 8 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,8)
  did -ra mpoptions 9 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,9)
  did -ra mpoptions 10 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,10)
  did -ra mpoptions 11 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,11)
  did -ra mpoptions 12 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,12)
  did -ra mpoptions 13 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,13)
  did -ra mpoptions 14 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,14)
  did -ra mpoptions 15 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,15)
  did -ra mpoptions 16 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,16)
  did -ra mpoptions 19 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,19)
  did -ra mpoptions 20 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,20)
  did -ra mpoptions 21 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,21)
  did -ra mpoptions 23 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,23)
  did -ra mpoptions 24 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,24)
  did -ra mpoptions 25 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,25)
  did -ra mpoptions 27 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,27)
  did -ra mpoptions 28 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,28)
  did -ra mpoptions 29 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,29)
  did -ra mpoptions 30 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,30)
  did -ra mpoptions 33 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,33)
  did -ra mpoptions 34 $readini(mIRCamp\Langages\ $+ $mpini(Langue),DIALOG,34)
}
alias -l loadlastpl {
  var %x = 1
  var %files = $lines(mIRCamp\TempPL.txt)
  window -pfzhdk0Bo +dL @Loading $calc($dialog(plist).x + 37) $calc($dialog(plist).y + 138) 200 20
  drawfill -rf @Loading $rgb(255,255,255) 0 0 0
  drawrect -r @Loading $rgb(0,0,0) 2 0 0 200 20
  var %rgb == $rand(20,240) $+ , $+ $rand(20,240) $+ , $+ $rand(20,240)
  while (%x <= %files) { 
    drawrect -r @Loading $rgb( [ %rgb ] ) 0 2 2 $calc(%x / %files * 196) 16
    did -i plist 4 %x $iif($mpini(Playlistnum) == ON,%x $+ .) $iif($mpini(Convert) == ON,$replace($left($nopath($read(mIRCamp\TempPL.txt,%x)),-4),_,$chr(32),$chr(37) $+ 20,$chr(32)),$left($nopath($read(mIRCamp\TempPL.txt,%x)),-4))
    inc %x
  }
  window -c @Loading
}
alias -l mptab {
  if (!$1) return $chr(9) | var %t,%w = 1
  while ($($+($,%w),2)) { %t = $instok(%t,$($+($,%w),2),0,9) | inc %w }
  return %t
}

On *:LOAD:{ run mIRCamp\readme.txt }
dialog mp3tag {
  title "Informations MP3"
  size $iif($dialog(plist),$calc($dialog(plist).x + 280),-1) $iif($dialog(plist),$dialog(plist).y,-1) 140 124
  option dbu
  icon mIRCamp\mIRCamp.ico, 0
  text "", 1, 5 8 130 14
  text "", 2, 5 21 130 8
  text "", 3, 5 29 130 8
  text "", 4, 5 41 130 8
  text "", 5, 5 49 130 8
  text "", 6, 5 56 130 8
  text "", 7, 5 69 60 8
  text "", 8, 75 69 60 8
  text "", 9, 5 76 60 8
  text "", 12, 75 76 60 8
  text "", 10, 5 91 130 14
  button "&Ok", 11, 105 110 32 12, ok
  box "", 13, 2 0 136 108
  button "", 14, 64 110 40 12
  text "mIRCamp 1.07", 15, 2 112 60 8, center
}
On *:dialog:mp3tag:init:0:{ did -ra mp3tag 14 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,13) | refmp3infos }
On *:dialog:mp3tag:sclick:14:refmp3infos
alias -l refmp3infos {
  if (!$insong.fname) && ($did(plist,4,0).sel != 1) { did -ra mp3tag 1 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,1) | halt }
  did -ra mp3tag 1 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,2) ( $nopath($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)) )
  did -ra mp3tag 2 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,3) ( $mp3($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).artist )
  did -ra mp3tag 3 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,4) ( $mp3($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).title )
  did -ra mp3tag 4 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,5) ( $mp3($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).album )
  did -ra mp3tag 5 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,6) ( $mp3($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).year )
  did -ra mp3tag 6 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,7) ( $mp3($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).genre )
  did -ra mp3tag 7 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,8) ( $duration($calc($mp3($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).length / 1000)) )
  did -ra mp3tag 8 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,9) ( $mp3($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).bitrate Kbps )
  did -ra mp3tag 9 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,10) ( $mp3($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).sample Hz )
  did -ra mp3tag 10 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,11) ( $mp3($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).comment )
  did -ra mp3tag 12 $readini(mIRCamp\Langages\ $+ $mpini(Langue),MP3TAG,12) ( $round($calc($file($iif($did(plist,4,0).sel == 1,$read(mIRCamp\TempPL.txt,$did(plist,4).sel),$insong.fname)).size / 1024000),2) Mo )
}
alias -l mpskinsearch {
  var %skins = $finddir(mIRCamp\Skins\,*,0,1)
  if (%skins <= $mpini(NbSkins)) halt
  if ($input(mIRCamp a détecté $calc(%skins - $mpini(NbSkins)) $iif($calc(%skins - $mpini(NbSkins)) > 1,nouveaux skins,nouveau skin) ! Voulez-vous les charger automatiquement dans la liste ?) != $true) halt
  var %x = 1,%lines = $lines(mIRCamp\Skins\Skins.txt)
  while (%x <= %lines) { set %tskins %tskins $+ $chr(1) $+ $gettok($read(mIRCamp\Skins\Skins.txt,%x),1,1) | inc %x }
  var %x = 1
  while (%x <= %skins) {
    var %actskin = $finddir(mIRCamp\Skins\,*,%x,1)
    if ($istok(%tskins,$gettok(%actskin,$gettok(%actskin,0,92),92),1)) { inc %x | continue }
    write mIRCamp\Skins\Skins.txt $gettok(%actskin,$gettok(%actskin,0,92),92) $+ $chr(1) $+ %actskin
    inc %x
  }
  writeini mIRCamp\Options.ini MP3 NBSkins $finddir(mIRCamp\Skins\,*,0,1)
}

;__________________________________________________
