on *:load:{ 
  if ($version < 6.0) echo -a  $+ $colour(info2) $+ *** You need mirc 6.0 or greater in order to use this addon. | beep 
  echo -a  4A_C-mp3speler V4.1 | echo -a  4Please type: /A_C-mp3speler to begin dialog /A_C-mp3speler -help for listing of manual commands.
  if ($script(A_C-mp3speler2.mrc) != $null) { .unload -rs A_C-mp3speler2.mrc } 
  _vw A_C-mp3speler version V4.1 
}
alias -l big {
  dialog -s A_C-mp3speler -1 -1 440 411
  if ($nexgen == $true) { sclick }
}
alias -l small {
  dialog -s A_C-mp3speler -1 -1 440 175
}
alias -l _son.ver return v1.61 
;[read write data/settings.ini]
alias _vr {
  if ($exists(data\settings.ini) == $false) { mkdir data | write -c data\settings.ini }
  return $readini data\settings.ini $$1 $$2 
}
alias _vw {
  if ($exists(data\settings.ini) == $false) { mkdir data | write -c data\settings.ini }
  writeini data\settings.ini $$1 $$2 $$3-
}
alias _vrem {
  if ($exists(data\settings.ini) == $false) { mkdir data | write -c data\settings.ini }
  remini data\settings.ini $$1 $$2 
}
menu menubar {
  $iif($acid == $true,• $l(28,media))
  .A_C-mp3speler mp3:A_C-mp3speler
  $iif($acid != $true,A_C-mp3speler mp3):A_C-mp3speler | $rs(mediare.wav)
  .-
}
alias A_C-mp3speler { 
  if ($version < 6.0) { echo -s 4This addon will not work properly with mIRC $version $+ , please upgrade to latest mIRC www.mirc.com | beep | halt }
  if ($dialog(A_C-mp3speler) == $null) { 
    if ($exists(data\A_C-mp3speler.mpl) == $false) { write -c data\A_C-mp3speler.mpl }   
    %A_C-mp3speler.active = $active 
    if (%A_C-mp3speler.active == Status Window) { %A_C-mp3speler.active = Status Window }  
    if ((!$chan(%A_C-mp3speler.active)) && (!$query(%A_C-mp3speler.active))) { 
      if ($chan(1)) { %A_C-mp3speler.active = $chan(1) } 
      elseif ($query(1)) { %A_C-mp3speler.active = $query(1) } 
      else { %A_C-mp3speler.active = Status Window }    
    }     
    if ($1 == -s) { if ($inmp3 == $true) { splay -p stop |  if ($dialog(A_C-mp3speler) != $null) { $d(-b) 110,111 | dialog -t A_C-mp3speler $longfn($sondir) } } | .timer7879 off   }
    elseif ($1 == -r) { A_C-mp3speler.shuffle }
    elseif ($1 == -public) { 
      if ($2 == off) { _vw A_C-mp3speler public off }
      else { _vw A_C-mp3speler public on } 
    }  
    elseif ($1 == -m) { if ($vol(mp3).mute == $true) { vol -pu2 | if ($dialog(A_C-mp3speler) != $null) { $d(-o) 317 1 } | halt } | else { vol -pu1 | if ($dialog(A_C-mp3speler) != $null) { $d(-o) 317 1 mute } | halt } }
    elseif ($1 == -v10) { vol -p 65535 } 
    elseif ($1 == -v9) { vol -p 60000 } 
    elseif ($1 == -v8) { vol -p 55000 } 
    elseif ($1 == -v7) { vol -p 50000 } 
    elseif ($1 == -v6) { vol -p 45000 } 
    elseif ($1 == -v5) { vol -p 40000 } 
    elseif ($1 == -v4) { vol -p 35000 }
    elseif ($1 == -v3) { vol -p 30000 }
    elseif ($1 == -v2) { vol -p 25000 }
    elseif ($1 == -v1) { vol -p 20000 }
    elseif ($1 == -v0) { vol -p 0 }
    elseif ($1 == $null) { $A_C-mp3speler.dialog }
    elseif ($1 == -h) || ($1 == -help) { 
      $ae $space(3) 4/A_C-mp3speler 10[executes dialog] 
      $ae $space(3) 4/A_C-mp3speler -s 10[stop play] 
      $ae $space(3) 4/A_C-mp3speler -r 10[random play] 
      $ae $space(3) 4/A_C-mp3speler -m 10[mute] 
      $ae $space(3) 4/A_C-mp3speler -v# 10[volume. ie: /A_C-mp3speler -v9] 
      $ae $space(3) 4/A_C-mp3speler -public on/off 10[public display on/off] 
    }
  } 
  else return
}
alias -l A_C-mp3speler.resize { 
  if ($_vr(A_C-mp3speler,sizer) == big) { small }
  else { big }
}
alias -l d return did $1 A_C-mp3speler
dialog A_C-mp3speler {
  title "A_C- Mp3 Speler V4.1"
  size -1 -1 440 410
  icon $icodir(1.ico), 0 noborder
  option pixels
  tab "inhoud", 1, 7 192 425 217
  text "overige", 142, 379 278 45 15, tab 1
  text "files", 16, 391 240 25 15, tab 1
  text "de grote", 17, 35 247 55 18, tab 1
  edit "", 11, 192 229 108 18, tab 1 autohs
  text "zanger", 132, 146 229 40 15, tab 1
  edit "", 125, 192 247 108 18, tab 1 autohs
  text "titel", 131, 146 247 40 15, tab 1
  edit "", 12, 192 265 108 18, tab 1 autohs
  text "album", 130, 146 265 40 15, tab 1
  edit "", 13, 192 283 108 18, tab 1 autohs
  text "titel", 129, 146 283 45 15, tab 1
  edit "", 14, 192 301 108 18, tab 1 autohs
  text "jaar", 128, 146 301 40 15, tab 1
  text "genre", 127, 146 319 40 15, tab 1
  text "bitrate", 18, 17 282 40 15, tab 1
  text "mode", 20, 77 282 40 15, tab 1
  text "sample rate", 27, 77 317 60 15, tab 1
  text "lengte", 29, 17 317 40 15, tab 1
  edit "", 9, 17 229 120 18, tab 1 read autohs center
  edit "", 141, 377 258 50 18, tab 1 read autohs center
  edit "", 19, 77 264 60 18, tab 1 read autohs center
  edit "", 26, 77 299 60 18, tab 1 read autohs center
  edit "", 28, 17 299 55 18, tab 1 read autohs center
  edit "", 15, 17 264 55 18, tab 1 read autohs center
  edit "", 8, 377 221 50 18, tab 1 read autohs center
  scroll "", 79, 316 246 17 88, tab 1 range 10 left
  box "volume", 80, 306 217 68 124, tab 1
  text "00", 81, 318 346 13 12, tab 1 center
  box "", 82, 306 338 68 24, tab 1
  scroll "", 83, 346 246 17 88, tab 1 range 10 left
  text "00", 84, 348 346 13 12, tab 1 center
  text "mp3", 85, 314 230 21 16, tab 1
  text "master", 86, 339 230 32 16, tab 1
  button "update id3", 40, 213 343 63 15, tab 1
  box "id3", 41, 141 217 164 145, tab 1
  edit "", 42, 192 321 108 18, tab 1 read autohs
  edit "", 43, 377 298 50 18, tab 1 read autohs center
  text "compleet", 44, 380 318 46 16, tab 1
  tab "voorkeur", 2
  check "naar publiek", 21, 21 235 75 15, tab 2
  check "ctcp mp3", 25, 21 255 75 15, tab 2
  check "loop play", 31, 21 275 75 15, tab 2
  check "allerlei", 32, 21 295 75 15, tab 2
  check "show lengte", 310, 126 235 75 15, tab 2
  check "show mode", 311, 126 255 75 15, tab 2
  check "show bitrate", 312, 126 275 75 15, tab 2
  check "show grote", 313, 126 295 75 15, tab 2
  check "show inio", 314, 226 235 75 15, tab 2
  check "altijd boven", 316, 226 255 85 15, tab 2
  combo 219, 332 255 90 100, tab 2 drop
  text "color theme", 220, 332 241 70 12, tab 2
  combo 221, 332 297 90 100, tab 2 drop
  text "stijl thema", 222, 332 283 70 12, tab 2
  check "stop spelen bij uit", 50, 21 312 148 20, tab 2
  box "thema", 52, 327 229 100 100, tab 2
  check "! meesturen", 315, 226 275 78 15, tab 2
  check "speel ctcp", 404, 226 295 78 15, tab 2
  tab "opzetten", 3
  list 119, 14 233 276 72, hide tab 3 size hsbar vsbar
  radio "speler opzetten ", 120, 300 230 122 15, tab 3
  radio "mp3 directory(s)", 121, 300 250 94 15, tab 3
  check "laat alles zien", 333, 300 293 90 15, tab 3
  check "interne speler", 109, 300 329 90 15, tab 3
  check "onder directory(s)", 409, 300 311 120 15, tab 3
  edit "", 101, 17 247 275 20, tab 3 read autohs
  combo 102, 20 272 40 200, tab 3 drop
  button "zoek", 104, 182 272 50 20, tab 3
  button "save", 105, 62 272 50 20, disable tab 3
  button "volgend", 106, 122 272 50 20, tab 3
  button "opzoeken", 107, 242 272 50 20, tab 3
  box "speler zoeken", 108, 12 227 285 75, tab 3
  button "adres", 122, 22 312 50 20, hide tab 3
  button "wissen", 410, 82 312 50 20, hide tab 3
  text "mp3 plaatsen", 55, 15 215 56 16, hide tab 3
  button "Legen", 60, 140 312 50 20, hide tab 3
  tab "speel naar", 98
  list 57, 172 240 100 72, tab 98 size hsbar
  list 58, 276 240 100 72, disable tab 98 size hsbar
  button "kamers", 61, 200 315 51 17, disable tab 98
  button "wissen", 62, 300 315 51 17, disable tab 98
  text "spelen in:", 63, 300 224 50 16, disable tab 98
  text "beschikbaar", 64, 180 224 60 16, tab 98
  box "", 65, 164 216 220 120, tab 98
  radio "alleen hier", 67, 36 252 76 20, tab 98
  radio "speel overal", 68, 36 268 80 25, tab 98
  radio "speel alleen naar", 69, 36 287 100 20, tab 98
  box "", 70, 27 242 124 72, tab 98
  button "R", 72, 168 317 14 14, tab 98
  tab "speellijst", 400
  list 401, 20 235 330 98, tab 400 size hsbar vsbar
  button "adres", 402, 367 237 50 15, disable tab 400
  button "move", 403, 367 254 50 15, disable tab 400
  button "overslaan", 406, 367 271 50 15, disable tab 400
  button "leeg lijst", 407, 367 289 50 15, tab 400
  button "speel", 405, 367 307 50 15, disable tab 400
  text "speellijst", 54, 23 219 40 16, tab 400
  check "speellijst aan", 87, 20 335 92 20, tab 400
  tab "maak lijst", 600
  text "totaal gespeeld", 602, 17 224 61 14, tab 600
  edit "", 601, 17 244 60 18, tab 600 read autohs center
  edit "", 48, 223 251 188 21, disable tab 600 autohs
  box "hernaam mp3", 49, 216 236 204 61, tab 600
  button "hernaam", 47, 351 276 60 15, disable tab 600
  button "verwijder", 218, 351 220 60 15, disable tab 600
  button "gedraait", 56, 17 268 59 17, disable tab 600
  button "maak lijst", 24, 117 254 59 17, tab 600
  button "kijk lijst", 36, 117 275 59 17, tab 600
  check "geef lijst publiek", 37, 94 232 107 20, tab 600
  box "mp3 lijst", 38, 89 216 120 82, tab 600
  edit "", 45, 24 314 111 21, tab 600
  button "zoeken", 46, 197 315 59 17, tab 600
  box "mp3 zoeken", 66, 16 299 251 44, tab 600
  combo 88, 140 314 47 100, tab 600 size drop
  tab "over", 71
  link  "http://www.freeangel.nl", 51, 158 271 149 16, tab 71
  text "baas is:Rinus", 73, 100 244 90 16, tab 71
  text "versie:", 74, 100 258 38 16, tab 71
  text "Tekst Label", 75, 140 258 51 16, tab 71
  text "home page:", 76, 100 270 57 16, tab 71
  text "P.S: Deze speler is in het nederlands vertaald door                 Rinus in 2012", 77, 100 290 247 43, tab 71
  box "Over De A_C-MP3 Speler", 78, 83 229 283 105, tab 71
  button "speel", 5, 313 157 50 15, disable
  button "allerlei", 23, 258 157 50 15
  button "", 110, 203 157 50 15, hide disable
  button "stop", 111, 148 157 50 15, hide disable
  text "", 317, 105 157 40 15
  button "+1", 6, 44 157 25 15
  button "X", 500, 800 155 25 15, default ok
  button ">", 7, 400 157 25 15, disable
  list 4, 10 5 420 128, sort size hsbar vsbar
  button "max", 10, 10 157 30 15
  button "AAN", 140, 75 157 40 15, hide
  icon 99, 25 368 110 27
  icon 100, 386 360 35 35
  text "", 22, 143 374 210 15
  text "browse", 30, 378 172 35 16
  text "muziek", 33, 76 173 33 16, hide
  text "verfris", 34, 37 173 34 16
  text "min", 35, 14 173 17 16
  box "", 53, 18 359 356 40
  button "<", 59, 369 157 25 15, disable
  scroll "", 39, 11 140 418 13, range 100 horizontal
}
alias -l son.le $mp3($inmp3.fname).length
on *:dialog:A_C-mp3speler:init:*:{
  A_C-mp3speler.resize
  di.list  
  if ($_vr(A_C-mp3speler,showmode) == all) did -c A_C-mp3speler 333
  $d(-o) 22 1 A_C- MP3 speler Versie 4.2 $+ , ©2012,Rinus
  $d(-o) 75 1 Versie 4.2
  if ($_vr(A_C-mp3speler,playstop) == on) { $d(-c) 50 } 
  if ($_vr(A_C-mp3speler,ctcpplay) == $null) { _vw A_C-mp3speler ctcpplay on }
  if ($_vr(A_C-mp3speler,intplayer) == $null) { _vw A_C-mp3speler intplayer on }
  if ($_vr(A_C-mp3speler,intplayer) != off) { $d(-b) 120 | $d(-v) 110,111,140,33 }
  if ($_vr(A_C-mp3speler,ontop) == on) { $d(-c) 316 } 
  if (%sonic.cur == $null) { %sonic.cur = 1 }
  if ($_vr(A_C-mp3speler,intplayer) == on) { did -g  A_C-mp3speler 100 mirc.exe  } 
  elseif ($exists($_vr(A_C-mp3speler,player)) == $true) { did -g A_C-mp3speler 100 $shortfn($_vr(mp3,player)) }
  elseif ($exists($findfile($mircdir,nexgen.ico,1)) == $true) did -g A_C-mp3speler 100 $shortfn($findfile($mircdir,nexgen.ico,1))
  if ($shortfn($findfile($mircdir,knuffelroos.jpg,1)) != $null) did -g A_C-mp3speler 99 $shortfn($findfile($mircdir,knuffelroos.jpg,1))
  $d(-o) 110 1 pause 
  A_C-mp3speler.browse
  actchan
  vol.check
  vol.check.master  
  if ($_vr(A_C-mp3speler,playlist) == on) { $d(-e) 405 | $d(-c) 87 } 
  if ($_vr(A_C-mp3speler,d-inio) == $null) { _vw A_C-mp3speler d-inio on }  
  if ($_vr(A_C-mp3speler,ctcpplay) == on) { $d(-c) 404 }
  if ($_vr(A_C-mp3speler,ctcp) == on) { $d(-c) 25 }
  if ($_vr(A_C-mp3speler,public) == $null) { _vw A_C-mp3speler public on }
  if ($_vr(A_C-mp3speler,public) == on) { $d(-c) 21 } 
  if ($_vr(A_C-mp3speler,mp3list) == on) { $d(-c) 37 } 
  if ($_vr(A_C-mp3speler,mp3list) == on) && ($exists(@ $+ $me $+ .txt) == $true) { $d(-c) 37 | $d(-e) 37 }  
  else { $d(-b) 36,37 | _vw A_C-mp3speler mp3list off | $d(-u) 37 }  
  if ($_vr(A_C-mp3speler,loop) == on) { $d(-c) 31 } 
  if ($_vr(A_C-mp3speler,shuffle) == on) { $d(-c) 32 } 
  if ($_vr(A_C-mp3speler,intplayer) == on) { $d(-c) 109 } 
  if ($_vr(A_C-mp3speler,d-length) == on) { $d(-c) 310 }
  if ($_vr(A_C-mp3speler,d-mode) == on) { $d(-c) 311 }
  if ($_vr(A_C-mp3speler,d-bitrate) == on) { $d(-c) 312 }
  if ($_vr(A_C-mp3speler,d-size) == on) { $d(-c) 313 }
  if ($_vr(A_C-mp3speler,d-inio) == on) { $d(-c) 314 }
  if ($_vr(A_C-mp3speler,triggersend) == on) { $d(-c) 315 }
  $d(-a) 219 none | $d(-a) 219 blue | $d(-a) 219 red | $d(-a) 219 green | $d(-a) 219 purple | $d(-a) 219 yellow | $d(-a) 219 aqua | $d(-a) 219 silver | $d(-a) 219 random 
  $d(-a) 221 none | $d(-a) 221 [bracket] | $d(-a) 221 large dot | $d(-a) 221 small dot | $d(-a) 221 dots | $d(-a) 221 .:style:. | $d(-a) 221 style2 
  if ($_vr(A_C-mp3speler,theme) == $null) { _vw A_C-mp3speler theme red | $d(-c) 219 3 }  
  elseif ($_vr(A_C-mp3speler,theme) == none) { $d(-c) 219 1 }
  elseif ($_vr(A_C-mp3speler,theme) == blue) { $d(-c) 219 2 }
  elseif ($_vr(A_C-mp3speler,theme) == red) { $d(-c) 219 3 }
  elseif ($_vr(A_C-mp3speler,theme) == green) { $d(-c) 219 4 }
  elseif ($_vr(A_C-mp3speler,theme) == purple) { $d(-c) 219 5 }
  elseif ($_vr(A_C-mp3speler,theme) == yellow) { $d(-c) 219 6 }
  elseif ($_vr(A_C-mp3speler,theme) == aqua) { $d(-c) 219 7 }
  elseif ($_vr(A_C-mp3speler,theme) == silver) { $d(-c) 219 8 }
  elseif ($_vr(A_C-mp3speler,theme) == random) { $d(-c) 219 9 }
  if ($_vr(A_C-mp3speler,styletheme) == $null) { _vw A_C-mp3speler styletheme .:style:. | $d(-c) 221 6 }  
  elseif ($_vr(A_C-mp3speler,styletheme) == none) { $d(-c) 221 1 }
  elseif ($_vr(A_C-mp3speler,styletheme) == bracket) { $d(-c) 221 2 }
  elseif ($_vr(A_C-mp3speler,styletheme) == large dot) { $d(-c) 221 3 }
  elseif ($_vr(A_C-mp3speler,styletheme) == small dot) { $d(-c) 221 4 }
  elseif ($_vr(A_C-mp3speler,styletheme) == dots) { $d(-c) 221 5 }
  elseif ($_vr(A_C-mp3speler,styletheme) == .:style:.) { $d(-c) 221 6 }
  elseif ($_vr(A_C-mp3speler,styletheme) == style2) { $d(-c) 221 7 }
  A_C-mp3speler.act 
  .timer -m 1 1 A_C-mp3speler.dir1
  if ($inmp3 == $true) && ($_vr(A_C-mp3speler,intplayer) == on) { $d(-e) 5,110,111 | .timerscroll -m 0 1 scroll }
  if ($inmp3 == $true) { A_C-mp3speler.info }  
  if ($inmp3 == $true) { .timer9898 0 1 A_C-mp3speler.trs }
  if ($_vr(A_C-mp3speler,active) == all) { $d(-c) 68 } 
  elseif ($_vr(A_C-mp3speler,active) == selected) { $d(-c) 69 | $d(-e) 58,61,62,63 }  
  elseif ($_vr(A_C-mp3speler,active) == active) { $d(-c) 67 }  
  else { $d(-c) 67 | _vw A_C-mp3speler active active }  
  $d(-b) 106 
  $d(-c) 120
  if ($_vr(A_C-mp3speler,intplayer) == on) { $d(-b) 120 } 
  if ($_vr(A_C-mp3speler,subfolders) == on) { $d(-c) 409  }
  if (%ask.con1 == $null) { set %ask.con1 50 }
  if ($disk(c:) == $true) { $d(-i) 102 1 C: }
  if ($disk(d:) == $true) || ($disk(d:).type == cdrom) { $d(-i) 102 2 D: }
  if ($disk(e:) == $true) || ($disk(e:).type == cdrom) { $d(-i) 102 3 E: }
  if ($disk(f:) == $true) || ($disk(f:).type == cdrom) { $d(-i) 102 4 F: }
  if ($disk(g:) == $true) || ($disk(g:).type == cdrom) { $d(-i) 102 5 G: }
  if ($disk(h:) == $true) || ($disk(h:).type == cdrom) { $d(-i) 102 6 H: }
  if ($disk(i:) == $true) || ($disk(i:).type == cdrom) { $d(-i) 102 7 I: }
  if ($disk(j:) == $true) || ($disk(j:).type == cdrom) { $d(-i) 102 8 J: }
  if ($disk(k:) == $true) || ($disk(k:).type == cdrom) { $d(-i) 102 9 K: }
  $d(-c) 102 1
  if ($vol(mp3).mute == $true) { $d(-o) 317 1 mute  }
  if ($lines(data\A_C-mp3speler.mpl) == 0) { $d(-b) 405,407 } 
  if ($_vr(A_C-mp3speler,songs.played) == $null) { _vw A_C-mp3speler songs.played 0 }
  $d(-o) 601 1 $_vr(A_C-mp3speler,songs.played) 
  if ($exists($shortfn($findfile($mircdir,A_C-mp3speler.mp3,1))) == $true) && ($_vr(A_C-mp3speler,them) == $null) { .splay $shortfn($findfile($mircdir,A_C-mp3speler.mp3,1)) } 
  if ($_vr(A_C-mp3speler,them) == $null) { _vw A_C-mp3speler them 1 }
  did -z A_C-mp3speler 4,119,401
} 
alias -l A_C-mp3speler.dir return $ini(data\settings.ini,A_C-mp3spelerdir,%sonic.cur) 
alias -l A_C-mp3speler.dir1 {
  if ($dialog(A_C-mp3speler) !=  $null) { $d(-r) 119 1 }
  var %f = 0
  :loop
  inc %f 1
  var %dir = $ini(data\settings.ini,A_C-mp3spelerdir,%f)
  if (%dir) { $d(-a) 119 $longfn(%dir) | set %sonic.cur %f | goto loop } 
  did -z A_C-mp3speler 119 
  A_C-mp3speler.browse 
  A_C-mp3speler.list
}
alias -l A_C-mp3speler.dialog {
  if ($_vr(A_C-mp3speler,ontop) == on) { return dialog -m A_C-mp3speler A_C-mp3speler }
  else return dialog -md A_C-mp3speler A_C-mp3speler
}
alias smp3 { A_C-mp3speler.shuffle }
alias -l A_C-mp3speler.list {
  if ($dialog(A_C-mp3speler)) {
    dialog -t A_C-mp3speler A_C- MP3 Speler V4.1
    if ($exists(data\settings.ini) == $false) { write -c data\settings.ini }
    $d(-r) 4 1
    var %f = 0
    if ($_vr(A_C-mp3speler,subfolders) == on) var %do.sub = $true
    if ($_vr(A_C-mp3speler,ShowMode) == all) {
      var %soni.num = 0
      :loop 
      inc %f 1
      var %soni.dir = $ini(data\settings.ini,A_C-mp3spelerdir,%f)
      if (%soni.dir) {
        if (%do.sub) { inc %soni.num $findfile(%soni.dir,*.mp3,0, did -a A_C-mp3speler 4 $nopath($1-) ) }
        else { inc %soni.num $findfile(%soni.dir,*.mp3,0,1, did -a A_C-mp3speler 4 $nopath($1-) ) }
        did -z A_C-mp3speler 4     
        goto loop
      }
      dialog -t A_C-mp3speler alle MP3-folders
    }
    else {
      var %soni.num = 0
      if ($A_C-mp3speler.dir) {
        if (%do.sub) { set %soni.num $findfile($A_C-mp3speler.dir,*.mp3,0, did -a A_C-mp3speler 4 $nopath($1-) ) }
        else { set %soni.num $findfile($A_C-mp3speler.dir,*.mp3,0,1, did -a A_C-mp3speler 4 $nopath($1-) ) }
      }
      dialog -t A_C-mp3speler $longfn($sondir)  
    }
    $d(-o) 8 1 %soni.num
    $d(-b) 56
    if (%son.num != $null) && ($inmp3 == $true) { $d(-e) 110,111,406 | $d(-b) 402,403,407,405 | dialog -t A_C-mp3speler (play list) $nopath($longfn(%A_C-mp3speler.song)) }  
    elseif ($inmp3 == $true) { dialog -t A_C-mp3speler (playing) $nopath($longfn($inmp3.fname)) | .timer9898 0 1 A_C-mp3speler.trs }
  }
}
alias -l A_C-mp3speler.shuffle {
  .timerscroll -m 0 1 scroll 
  if ($dialog(A_C-mp3speler).title != search results) && ($dialog(A_C-mp3speler) !=  $null) dialog -t A_C-mp3speler A_C-mp3speler MP3 Speler V4.1
  if ($dialog(A_C-mp3speler) != $null) { $d(-e) 110,111 } 
  .timer7879 off | .timer7878 off  
  set %A_C-mp3speler.song $rsondir
  _vw A_C-mp3speler playtype shuffle 
  if ($_vr(A_C-mp3speler,intplayer) == on) && ($shortfn(%A_C-mp3speler.song) != $null) { .splay -p $shortfn(%A_C-mp3speler.song) }
  elseif ($_vr(A_C-mp3speler,intplayer) == on) && ($shortfn(%A_C-mp3speler.song) == $null) { beep | echo -s •4• error » bad path or mp3. | haltdef }   
  else { .run $shortfn($_vr(mp3,player)) $shortfn(%A_C-mp3speler.song) }
  if ($dialog(A_C-mp3speler) != $null) { $d(-r) 9,11,12,13,14,15,19,26,28 }
  if ($dialog(A_C-mp3speler) != $null) { 
    if ($file(%A_C-mp3speler.song).size != $null) { $d(-o) 9 1 $file(%A_C-mp3speler.song).size $+ kb ( $+ $sizesonic(%A_C-mp3speler.song) $+ mb $+ ) }
    else $d(-o) 9 1 n/a
    .timerscroll -m 0 1 scroll    
    .timer9898 0 1 A_C-mp3speler.trs
    A_C-mp3speler.info
    if ($dialog(A_C-mp3speler).title != search results) && ($_vr(A_C-mp3speler,intplayer) == on) { dialog -t A_C-mp3speler (playing) $nopath(%A_C-mp3speler.song) }
    elseif ($dialog(A_C-mp3speler).title != search results) && ($_vr(A_C-mp3speler,intplayer) != on) { dialog -t A_C-mp3speler $nopath(%A_C-mp3speler.song) }  
  } 
  son.shuffle
  if ($_vr(A_C-mp3speler,public) == on) {
    unset %r.c  
    ; if (%A_C-mp3speler.active == Status Window) || ($server == $null) { $se  $+ $colour(info) [mp3] $did(A_C-mp3speler,4).seltext }
    ;else { smsg }
    smsg  
  }
}
alias -l playtype {
  if ($_vr(A_C-mp3speler,playtype) == shuffle) { return random play99 }
  if ($_vr(A_C-mp3speler,playtype) == reg) { return mp399 }
}
alias -l strigger { 
  if ($_vr(A_C-mp3speler,triggersend) == on) { return ! $+ $me }
  else return 
} 
alias -l rsondir {
  var %dir.num = $ini(data\settings.ini,A_C-mp3spelerdir,0)
  if (%dir.num) {
    var %dir.get = $ini(data\settings.ini,A_C-mp3spelerdir,$rand(1,%dir.num))
    if ($_vr(A_C-mp3speler,subfolders) == on) return $findfile(%dir.get,*.mp3,$rand(1,$findfile(%dir.get,*.mp3,0)))
    else return $findfile(%dir.get,*.mp3,$rand(1,$findfile(%dir.get,*.mp3,0,1)),1)
  }
  else return
}
alias -l son.vol { 
  $d(-c) 79 %son.vol | $d(-o) 81 1 $calc($calc(%son.vol * -1) + 10)
}
alias -l son.vol.master { 
  $d(-c) 83 %son.vol.master | $d(-o) 84 1 $calc($calc(%son.vol.master * -1) + 10)
}
alias -l vol.check { 
  if ($vol(mp3) >= 55001) && ($vol(mp3) <= 65535) { %son.vol = 0 }
  elseif ($vol(mp3) >= 50001) && ($vol(mp3) <= 55000) { %son.vol = 1 }
  elseif ($vol(mp3) >= 45001) && ($vol(mp3) <= 50000) { %son.vol = 2 }
  elseif ($vol(mp3) >= 40001) && ($vol(mp3) <= 45000) { %son.vol = 3 }
  elseif ($vol(mp3) >= 35001) && ($vol(mp3) <= 40000) { %son.vol = 4 }
  elseif ($vol(mp3) >= 25001) && ($vol(mp3) <= 35000) { %son.vol = 5 }
  elseif ($vol(mp3) >= 25001) && ($vol(mp3) <= 35000) { %son.vol = 6 }
  elseif ($vol(mp3) >= 20001) && ($vol(mp3) <= 25000) { %son.vol = 7 }
  elseif ($vol(mp3) >= 15001) && ($vol(mp3) <= 20000) { %son.vol = 8 }
  elseif ($vol(mp3) >= 1) && ($vol(mp3) <= 15000) { %son.vol = 9 }
  elseif ($vol(mp3) <= 0) { %son.vol = 10 }
  $d(-c) 79 %son.vol | $d(-o) 81 1 $calc($calc(%son.vol * -1) + 10)

}
alias -l vol.check.master { 
  if ($vol(master) >= 55001) && ($vol(master) <= 65535) { %son.vol.master = 0 }
  elseif ($vol(master) >= 50001) && ($vol(master) <= 55000) { %son.vol.master = 1 }
  elseif ($vol(master) >= 45001) && ($vol(master) <= 50000) { %son.vol.master = 2 }
  elseif ($vol(master) >= 40001) && ($vol(master) <= 45000) { %son.vol.master = 3 }
  elseif ($vol(master) >= 35001) && ($vol(master) <= 40000) { %son.vol.master = 4 }
  elseif ($vol(master) >= 25001) && ($vol(master) <= 35000) { %son.vol.master = 5 }
  elseif ($vol(master) >= 25001) && ($vol(master) <= 35000) { %son.vol.master = 6 }
  elseif ($vol(master) >= 20001) && ($vol(master) <= 25000) { %son.vol.master = 7 }
  elseif ($vol(master) >= 15001) && ($vol(master) <= 20000) { %son.vol.master = 8 }
  elseif ($vol(master) >= 1) && ($vol(master) <= 15000) { %son.vol.master = 9 }
  elseif ($vol(master) <= 0) { %son.vol.master = 10 }
  $d(-c) 83 %son.vol.master | $d(-o) 84 1 $calc($calc(%son.vol.master * -1) + 10)
}
alias scroll2 {
  .timerscroll -m 0 1 scroll
}
alias -l scroll {
  if ($dialog(A_C-mp3speler) != $null) && ($inmp3 == $true) { $d(-c) 39 $round($calc($calc($insong.pos / $insong.length) * 100),0)
    if ($dialog(A_C-mp3speler).title != search results) { dialog -t A_C-mp3speler (playing) $nopath($longfn($inmp3.fname)) $chr(91) $+ $did(A_C-mp3speler,39).sel $+ % $+ $chr(93) }
    $d(-o) 43 1 $did(A_C-mp3speler,39).sel $+ %  
  }
  elseif ($dialog(A_C-mp3speler) != $null) && ($inmp3 == $true) { .timerscroll off }
  if ($inmp3 != $true) { .timerscroll off | if ($dialog(A_C-mp3speler) != $null) { dialog -t A_C-mp3speler A_C-mp3speler MP3 Speler V4.1 | $d(-c) 39 0 } }
}
on *:dialog:A_C-mp3speler:scroll:*:{
  if ($did == 39) { 
    if ($inmp3 == $true) {   
      var %perc = $round($calc($did(A_C-mp3speler,39).sel / 22000 * $inmp3.length),0)
      splay seek  $calc((%perc + $did(A_C-mp3speler,39).sel) * 200)
      .timer 1 2 scroll2 
    }
    if ($inmp3 != $true) { $d(-c) 39 0 }
  }  
  if ($did == 79) {
    if ($did(79).sel == 0) { vol -p 65535  } 
    elseif ($did(79).sel == 1) { vol -p 60000 } 
    elseif ($did(79).sel == 2) { vol -p 55000 } 
    elseif ($did(79).sel == 3) { vol -p 50000 } 
    elseif ($did(79).sel == 4) { vol -p 45000 } 
    elseif ($did(79).sel == 5) { vol -p 40000 } 
    elseif ($did(79).sel == 6) { vol -p 35000 }
    elseif ($did(79).sel == 7) { vol -p 25000 }
    elseif ($did(79).sel == 8) { vol -p 20000 }
    elseif ($did(79).sel == 9) { vol -p 15000 }
    elseif ($did(79).sel == 10) { vol -p 0 }
    %son.vol = $did(79).sel   
  }
  if ($did == 83) {
    if ($did(83).sel == 0) { vol -v 65535  } 
    elseif ($did(83).sel == 1) { vol -v 60000 } 
    elseif ($did(83).sel == 2) { vol -v 55000 } 
    elseif ($did(83).sel == 3) { vol -v 50000 } 
    elseif ($did(83).sel == 4) { vol -v 45000 } 
    elseif ($did(83).sel == 5) { vol -v 40000 } 
    elseif ($did(83).sel == 6) { vol -v 35000 }
    elseif ($did(83).sel == 7) { vol -v 25000 }
    elseif ($did(83).sel == 8) { vol -v 20000 }
    elseif ($did(83).sel == 9) { vol -v 15000 }
    elseif ($did(83).sel == 10) { vol -v 0 }
    %son.vol.master = $did(83).sel   
  }
  son.vol  
  son.vol.master
}
on *:dialog:A_C-mp3speler:edit:*:{
  if ($did == 48) { var %sgdhs = " $+ $did(48,$did(48).text) $+ " |  _vw A_C-mp3speler rename %sgdhs }
}
on *:dialog:A_C-mp3speler:sclick:*:{
  if ($did == 99) { if ($server != $null) { msg %A_C-mp3speler.active $sot(1) $+ A_C-mp3speler $+  $sot(1) MP3 Speler V4.1 $+ , ©2008, Rinus Nan - $sot(1) $+ http://www.freeangel.nl $sot(1) $+  mp3 Draaien en Mp3 Ruilen } | if ($exists($shortfn($findfile($mircdir\download\mp3,acescript.mp3,1))) == $true) { .splay $shortfn($findfile($mircdir\download\mp3,acescript.mp3,1)) } }
  if ($did == 4) { 
    if ($dialog(A_C-mp3speler).title == search results) { %A_C-mp3speler.song = $did(A_C-mp3speler,4).seltext }  
    $d(-r) 9,11,12,13,14,15,19,26,28    
    if ($dialog(A_C-mp3speler).title != search results) { %A_C-mp3speler.song = $A_C-mp3speler.findsong($did(A_C-mp3speler,4).seltext) }
    $d(-e) 5,110,111,218,402,47,48,56
    A_C-mp3speler.info
    $d(-o) 28 1 $A_C-mp3speler.dur(%A_C-mp3speler.song) 
    $d(-o) 48 1  $did(A_C-mp3speler,4).seltext
  }  
  if ($did == 40) { 
    $id3w($shortfn(%A_C-mp3speler.song),artist,$did(A_C-mp3speler,11).text) $id3w($shortfn(%A_C-mp3speler.song),title,$did(A_C-mp3speler,125).text) $id3w($shortfn(%A_C-mp3speler.song),album,$did(A_C-mp3speler,12).text) $id3w($shortfn(%A_C-mp3speler.song),comment,$did(A_C-mp3speler,13).text) $id3w($shortfn(%A_C-mp3speler.song),year,$did(A_C-mp3speler,14).text) 
    ;$id3w($shortfn(%A_C-mp3speler.song),genre,$did(A_C-mp3speler,42).seltext)
  }
  if ($did == 6) { A_C-mp3speler.list  }
  if ($did == 5) && ($did(A_C-mp3speler,4).seltext != $null) { 
    _vw A_C-mp3speler loopsong $shortfn(%A_C-mp3speler.song)  
    if ($dialog(A_C-mp3speler).title != search results) { %A_C-mp3speler.song = $A_C-mp3speler.findsong($did(A_C-mp3speler,4).seltext) }
    if ($dialog(A_C-mp3speler).title != search results) { %A_C-mp3speler.song = $findfile($nofile(%A_C-mp3speler.song),$nopath(%A_C-mp3speler.song),1) } 
    if ($dialog(A_C-mp3speler).title != search results) && ($_vr(A_C-mp3speler,intplayer) == on) { dialog -t A_C-mp3speler (playing) $nopath(%A_C-mp3speler.song) }
    elseif ($dialog(A_C-mp3speler).title != search results) && ($_vr(A_C-mp3speler,intplayer) != on) { dialog -t A_C-mp3speler $nopath(%A_C-mp3speler.song) }  
    if ($_vr(A_C-mp3speler,intplayer) == on) { .splay -p $shortfn(%A_C-mp3speler.song) | .timerscroll -m 0 1 scroll }
    else { .run $shortfn($_vr(mp3,player)) $shortfn(%A_C-mp3speler.song) }
    $d(-e) 110,111
    $d(-b) 218,47,48  
    .timer9898 off
    A_C-mp3speler.play  
  }
  if ($did == 7) { 
    $d(-r) 9,11,12,13,14,15,19,26,28
    if (%sonic.cur == $null) { set %sonic.cur 1 | dialog -t A_C-mp3speler  $longfn($sondir) }
    inc %sonic.cur 1
    if (%sonic.cur > $A_C-mp3speler.dir.count) set %sonic.cur 1
    if ($_vr(A_C-mp3speler,ShowMode) == all) {
      dialog -t A_C-mp3speler all folders
    }
    else {
      dialog -t A_C-mp3speler  $longfn($sondir) 
      A_C-mp3speler.list 
    }
    $d(-b) 5 
  }
  if ($did == 46) { $d(-r) 4 | find }
  if ($did == 59) { 
    $d(-r) 9,11,12,13,14,15,19,26,28
    if (%sonic.cur == $null) { set %sonic.cur 1 }
    dec %sonic.cur 1
    if (%sonic.cur == 0) { set %sonic.cur $A_C-mp3speler.dir.count |  dialog -t A_C-mp3speler  $longfn($sondir) | haltdef }
    if ($_vr(A_C-mp3speler,ShowMode) == all) {
      dialog -t A_C-mp3speler all folders
    }
    else {
      dialog -t A_C-mp3speler  $longfn($sondir) 
      A_C-mp3speler.list 
    }
    $d(-b) 5 
  }
  if ($did == 10) {
    if ($_vr(A_C-mp3speler,sizer) == big) { _vw A_C-mp3speler sizer small } 
    else _vw A_C-mp3speler sizer big
    A_C-mp3speler.resize
  }
  if ($did == 21) {
    if ($_vr(A_C-mp3speler,public) == on) { _vw A_C-mp3speler public off | $d(-b) 25 | if ($_vr(A_C-mp3speler,ctcp) == on) { _vw A_C-mp3speler ctcp off | $d(-u) 25 } }
    else { _vw A_C-mp3speler public on | $d(-c) 21 | $d(-e) 25 }
  }
  if ($did == 23) {
    if ($inmp3 == $true) { splay -p stop } | A_C-mp3speler.shuffle
  }
  if ($did == 24) { mp3.list | $d(-e) 36,37 } 
  if ($did == 25) {
    if ($_vr(A_C-mp3speler,ctcp) == on) { _vw A_C-mp3speler ctcp off  }
    else { _vw A_C-mp3speler ctcp on | $d(-c) 25  }
  }
  if ($did == 31) {
    if ($_vr(A_C-mp3speler,loop) == on) { _vw A_C-mp3speler loop off | .timer7878 off }
    else { _vw A_C-mp3speler loop on | $d(-c) 31 | if ($_vr(A_C-mp3speler,shuffle) == on) { _vw A_C-mp3speler shuffle off | $d(-u) 32 | .timer7879 off } }
  }
  if ($did == 32) {
    if ($_vr(A_C-mp3speler,shuffle) == on) { _vw A_C-mp3speler shuffle off | .timer7879 off }
    else { _vw A_C-mp3speler shuffle on | $d(-c) 32  | if ($_vr(A_C-mp3speler,loop) == on) { _vw A_C-mp3speler loop off | $d(-u) 31 } }
  }
  if ($did == 36) { run @ $+ $me $+ .txt }  
  if ($did == 37) { 
    if ($_vr(A_C-mp3speler,mp3list) == on) { _vw A_C-mp3speler mp3list off }
    else {
      if ($exists(@ $+ $me $+ .txt) == $true) { _vw A_C-mp3speler mp3list on }
      else { $d(-u) 37 }  
    }
  } 
  if ($did == 50) {
    if ($_vr(A_C-mp3speler,playstop) == on) { _vw A_C-mp3speler playstop off  }
    else { _vw A_C-mp3speler playstop on | $d(-c) 50  }
  }
  if ($did == 316) {
    if ($_vr(A_C-mp3speler,ontop) == on) { _vw A_C-mp3speler ontop off  | dialog -x A_C-mp3speler A_C-mp3speler | .timer -m 1 1 A_C-mp3speler }
    else { _vw A_C-mp3speler ontop on | $d(-c) 316 | dialog -x A_C-mp3speler A_C-mp3speler | .timer -m 1 1 A_C-mp3speler }
  }
  if ($did == 51) {
    run http://knuffelclub.onsadres.nl
  }
  if ($did == 56) {
    $mp3.pub.info(%A_C-mp3speler.song)
  }
  if ($did == 61) && ($did(57,$did(57).sel) != $null) {
    $d(-a) 58 $did(57,$did(57).sel) | write data\A_C-mp3speleract.txt $did(57,$did(57).sel) 
  }
  if ($did == 62) && ($did(58,$did(58).sel) != $null) { actrem $did(58,$did(58,1).sel).text | $d(-d) 58 $did(58,1).sel }
  if ($did == 72) { A_C-mp3speler.act }
  if ($did == 87) { 
    if ($_vr(A_C-mp3speler,playlist) == on) { _vw A_C-mp3speler playlist off | $d(-b) 405 }
    else { _vw A_C-mp3speler playlist on | $d(-e) 405 }
  }
  if ($did == 109) {
    if ($_vr(A_C-mp3speler,intplayer) == on) { _vw A_C-mp3speler intplayer off | $d(-e) 120 | $d(-h) 110,111,140,33  | if ($exists($_vr(A_C-mp3speler,player)) == $true) { did -g A_C-mp3speler 100 $shortfn($_vr(mp3,player)) } }
    else { _vw A_C-mp3speler intplayer on | .timer9898 off | $d(-c) 109 | $d(-b) 120 | $d(-v) 110,111,140,33  | did -g  A_C-mp3speler 100 mirc.exe }
  }
  if ($did == 409) {
    if ($_vr(A_C-mp3speler,subfolders) == on) { _vw A_C-mp3speler subfolders off  }
    else { _vw A_C-mp3speler subfolders on | $d(-c) 409  }
  }
  if ($did == 110) { 
    if ($_vr(A_C-mp3speler,pause) == on) { _vw A_C-mp3speler pause off | .timer9898 0 1 A_C-mp3speler.tr | splay -p resume | $d(-e) 5 | $d(-o) 110 1 pause | if ($dialog(A_C-mp3speler).title != search results) { dialog -t A_C-mp3speler (playing) $nopath($longfn($inmp3.fname)) } }
    else { _vw A_C-mp3speler pause on | .splay -p pause | $d(-b) 5 | $d(-o) 110 1 resume | if ($dialog(A_C-mp3speler).title != search results) { dialog -t A_C-mp3speler (paused) $nopath($longfn($inmp3.fname)) } }
  }
  if ($did == 310) { 
    if ($_vr(A_C-mp3speler,d-length) == on) { _vw A_C-mp3speler d-length off }
    else { _vw A_C-mp3speler d-length on }
  }
  if ($did == 404) { 
    if ($_vr(A_C-mp3speler,ctcpplay) == on) { _vw A_C-mp3speler ctcpplay off }
    else { _vw A_C-mp3speler ctcpplay on }
  }  
  if ($did == 311) { 
    if ($_vr(A_C-mp3speler,d-mode) == on) { _vw A_C-mp3speler d-mode off }
    else { _vw A_C-mp3speler d-mode on }
  }
  if ($did == 312) { 
    if ($_vr(A_C-mp3speler,d-bitrate) == on) { _vw A_C-mp3speler d-bitrate off }
    else { _vw A_C-mp3speler d-bitrate on }
  }
  if ($did == 313) { 
    if ($_vr(A_C-mp3speler,d-size) == on) { _vw A_C-mp3speler d-size off }
    else { _vw A_C-mp3speler d-size on }
  }
  if ($did == 314) { 
    if ($_vr(A_C-mp3speler,d-inio) == on) { _vw A_C-mp3speler d-inio off }
    else { _vw A_C-mp3speler d-inio on }
  }
  if ($did == 315) { 
    if ($_vr(A_C-mp3speler,triggersend) == on) { _vw A_C-mp3speler triggersend off }
    else { _vw A_C-mp3speler triggersend on }
  }
  if ($did == 218) { set %A_C-mp3spelerd $sondir $+ $did(A_C-mp3speler,4).seltext  | .timer -m 1 1 A_C-mp3speler.del }
  if ($did == 47) { 
    var %songren =  " $+ $sondir $+ $did(A_C-mp3speler,4).seltext $+ "
    var %songren2 =  " $+ $sondir $+ $_vr(A_C-mp3speler,rename) $+ "
    .rename %songren %songren2    
    A_C-mp3speler.list
    $d(-b) 47,48
    $d(-r) 48 
  }
  if ($did == 219) { 
    if ($did(A_C-mp3speler,$did,1).sel == 1) { $svwst1 none | svrt }
    if ($did(A_C-mp3speler,$did,1).sel == 2) { $svwst1 blue | svrt }
    if ($did(A_C-mp3speler,$did,1).sel == 3) { $svwst1 red | svrt }
    if ($did(A_C-mp3speler,$did,1).sel == 4) { $svwst1 green | svrt }
    if ($did(A_C-mp3speler,$did,1).sel == 5) { $svwst1 purple | svrt }
    if ($did(A_C-mp3speler,$did,1).sel == 6) { $svwst1 yellow | svrt }
    if ($did(A_C-mp3speler,$did,1).sel == 7) { $svwst1 aqua | svrt }
    if ($did(A_C-mp3speler,$did,1).sel == 8) { $svwst1 silver | svrt }
    if ($did(A_C-mp3speler,$did,1).sel == 9) { $svwst1 random }
  }
  if ($did == 221) { 
    if ($did(A_C-mp3speler,$did,1).sel == 1) { $svwst none }
    if ($did(A_C-mp3speler,$did,1).sel == 2) { $svwst bracket }
    if ($did(A_C-mp3speler,$did,1).sel == 3) { $svwst large dot }
    if ($did(A_C-mp3speler,$did,1).sel == 4) { $svwst small dot }
    if ($did(A_C-mp3speler,$did,1).sel == 5) { $svwst dots }
    if ($did(A_C-mp3speler,$did,1).sel == 6) { $svwst .:style:. }
    if ($did(A_C-mp3speler,$did,1).sel == 7) { $svwst style2 }
  }
  if ($did == 223) { 
    if ($did(A_C-mp3speler,$did,1).sel == 1) { set %A_C-mp3speler.active $active }
    if ($did(A_C-mp3speler,$did,1).sel == 2) { _vw A_C-mp3speler playall on }
    if ($did(A_C-mp3speler,$did,1).sel == 3) { set %A_C-mp3speler.active Status Window |  _vw A_C-mp3speler playall off }
    if ($did(A_C-mp3speler,$did,1).sel >= 4) { 
      set %A_C-mp3speler.active $did(223,$did(223).sel) 
    }
  }
  if ($did == 119) { set %oi $shortfn($did(119,$did(119).sel)) }
  if ($did == 111) { if ($inmp3 == $true) { splay -p stop | $d(-b) 110,111 | $d(-e) 403,405,4,402,407 } | unset %son.num | .timer7879 off | if ($dialog(A_C-mp3speler).title != search results) { dialog -t A_C-mp3speler $longfn($sondir) } }
  if ($did == 140) { 
    if ($vol(mp3).mute == $true) { vol -pu2 | $d(-o) 317 1 }
    else { vol -pu1 | $d(-o) 317 1 <-uit }
  }
  if ($did == 3) { $d(-v) 101,102,104,105,106,107,108 |  $d(-h) 60,119,122,410,55 | $d(-u) 121 | $d(-c) 120 }

  if ($did == 120) { 
    if ($did(A_C-mp3speler,120).state == 1) { $d(-v) 101,102,104,105,106,107,108 |  $d(-h) 60,119,122,410,55 } 
  } 
  if ($did == 121) {
    if ($did(A_C-mp3speler,121).state == 1) { $d(-h) 101,102,104,105,106,107,108 | $d(-v) 60,119,122,410,55 | $d(-u) 120 | .timer -m 1 1 A_C-mp3speler.dir1 }
  } 
  if ($did == 60) { A_C-mp3speler.dir.del | $d(-r) 119  }
  if ($did == 67) { 
    if ($did(A_C-mp3speler,67).state == 1) { $d(-u) 69,68 | $d(-b) 58,61,62,63 | _vw A_C-mp3speler active active } 
  } 
  if ($did == 68) {
    if ($did(A_C-mp3speler,68).state == 1) { $d(-u) 69,67 | $d(-b) 58,61,62,63 | _vw A_C-mp3speler active all }
  } 
  if ($did == 69) {
    if ($did(A_C-mp3speler,69).state == 1) { $d(-u) 68,67 | $d(-e) 58,61,62,63 | _vw A_C-mp3speler active selected }
  } 
  if ($did == 333) {
    if ($did(A_C-mp3speler,333).state == 1) { _vw A_C-mp3speler showmode all }
    else { _vw A_C-mp3speler showmode current }
    A_C-mp3speler.browse | A_C-mp3speler.list
  }
  if ($did == 400) { mpl.list }
  if ($did == 401) { $d(-e) 403 | set %mpl.song $did(401,$did(401).sel) } 
  if ($did == 402) && (.mp3 isin $did(A_C-mp3speler,4).seltext) { 
    $d(-e) 405,407 
    var %sh = $shortfn($A_C-mp3speler.findsong($did(A_C-mp3speler,4).seltext)) | write -i1 data\A_C-mp3speler.mpl $shortfn(%sh) | $d(-a) 401 $longfn(%sh) 
  } 
  if ($did == 405) { %son.num = 1 | $d(-b) 403,405,402,407 | $d(-u) 31,32 | _vw A_C-mp3speler shuffle off | _vw A_C-mp3speler loop off | $d(-e) 111,110,406 | son.playlist }
  if ($did == 406) { inc %son.num 1 | son.playlist }
  if ($did == 407) { write -c data\A_C-mp3speler.mpl | $d(-r) 401 | $d(-b) 405,407 }
  if ($did == 403) { var %ghs = $shortfn(%mpl.song) |  write -ds $+ %ghs data\A_C-mp3speler.mpl | mpl.list } 
  if ($did == 122) { .timer -m 1 1 A_C-mp3speler.dir.add }
  if ($did == 410) { .remini data\settings.ini A_C-mp3spelerdir $shortfn($did(A_C-mp3speler,119).seltext) $+ $chr(92) | .timer -m 1 1 A_C-mp3speler.dir1 }
  ; if ($did == 225) { set %mp.seldir $sondir | set %mp.sel $sondir $+ $did(A_C-mp3speler,4).seltext  | .timer -m 1 1 mp3.rename }
  if ($did == 102) { set %drive $did(102,$did(102).sel) } 
  if ($did == 104) { if ($did(102,$did(102).sel) == $null) { $d(-o) 101 1 You did not select  a drive to search. | halt | else $d(-b) 104  | set %pf 1 | set %drive $did(102,$did(102).sel) } | A_C-mp3speler.ps }
  if ($did == 106) { set %drive $did(102,$did(102).sel)  | $d(-r) 101 1 | $d(-o) 101 1 Searching... | inc %pf 1 | A_C-mp3speler.ps } 
  if ($did == 107) { .timer -m 1 1 A_C-mp3speler.man }
  if ($did == 105) { _vw A_C-mp3speler player $shortfn($did(A_C-mp3speler,101,1).text) | $se  $+ $colour(info2) $+ *** MP3 Player set to $did(A_C-mp3speler,101,1).text | set %pf 1 | unset %drive | unset %mp3.exe | $d(-b) 106,105 | $d(-e) 104 | if ($dialog(A_C-mp3speler) != $null) { did -g A_C-mp3speler 100 $_vr(A_C-mp3speler,player) } 
    _vw A_C-mp3speler playername $remove($nopath($_vr(A_C-mp3speler,player)),.exe) 
    unset %pf 
  }
}
alias -l di.list {
  $d(-r) 88
  if ($disk(c:) == $true) { $d(-a) 88 c:\ }
  if ($disk(d:) == $true) { $d(-a) 88 d:\ }
  if ($disk(e:) == $true) { $d(-a) 88 e:\ }
  if ($disk(f:) == $true) { $d(-a) 88 f:\ }
  if ($disk(g:) == $true) { $d(-a) 88 g:\ }
  if ($disk(h:) == $true) { $d(-a) 88 h:\ }
  if ($disk(i:) == $true) { $d(-a) 88 i:\ }
  if ($disk(j:) == $true) { $d(-a) 88 j:\ }

  $d(-c) 88 1
}
alias -l i return did $1 A_C-mp3speler
alias -l o return did -o A_C-mp3speler
alias -l c return did -c A_C-mp3speler 
alias -l svwst return _vw A_C-mp3speler styletheme
alias -l svwst1 return _vw A_C-mp3speler theme
alias -l svrt _vrem A_C-mp3speler theme2
alias -l actrem set -u0 %act $lines(data\A_C-mp3speleract.txt) | if (%act == 0) || (%act == $null) { goto end } | :loop | if ($1- == $read -l [ $+ [ %act ] ] data\A_C-mp3speleract.txt) { write -dl [ $+ [ %act ] ] data\A_C-mp3speleract.txt | goto end } | dec %act | if (%act =< 0) { goto end } | goto loop | :end
alias A_C-mp3speler.play {
  .timerscroll -m 0 1 scroll 
  .timer9898 0 1 A_C-mp3speler.tr 
  unset %r.c  
  if ($dialog(A_C-mp3speler) != $null) { $d(-e) 406,111,110 } 
  if ($_vr(A_C-mp3speler,intplayer) != on) && ($_vr(A_C-mp3speler,loop) == on) { .timer7878 0 $calc($file($shortfn(%A_C-mp3speler.song)).size / 15876.24752+10) son.loop.play1 }
  elseif ($_vr(A_C-mp3speler,intplayer) != on) && ($_vr(A_C-mp3speler,loop) != on) { .timer7878 off }
  if ($_vr(A_C-mp3speler,public) == on) {
    _vw A_C-mp3speler playtype reg  
    .timer7879 off | .timer7878 off  
    ; if (%A_C-mp3speler.active == Status Window) || ($server == $null) || ($left(%A_C-mp3speler.active,1) == $chr(64)) { $son.looper $se  $+ $colour(info) [mp3] $did(A_C-mp3speler,4).seltext }
    ;else { smsg } 
    smsg 
  }
}
alias -l play.all {
  if ($dialog(A_C-mp3speler) != $null) {
    var %channum = 0
    :findchan
    inc %channum 1
    var %chan = $chan(%channum)
    if (%chan != $null) { msg %chan $sot(3) $+ $sst(3) $+ $playtype $+ $sot(3) $+ $sst(4) $+  $strigger $nopath(%A_C-mp3speler.song) $slength(%A_C-mp3speler.song) $+ $smode(%A_C-mp3speler.song) $+ $sbitrate(%A_C-mp3speler.song) $+ $ssize(%A_C-mp3speler.song) $sinio | if ($_vr(A_C-mp3speler,ctcp) == on) { ctcp %chan mp3 $nopath(%A_C-mp3speler.song) } | goto findchan }
    else goto query 
    :query
    var %querynum = 0
    :findquery
    inc %querynum 1
    var %query = $query(%querynum)
    if (%query != $null) { msg %query $sot(3) $+ $sst(3) $+ $playtype $+ $sot(3) $+ $sst(4) $+  $strigger $nopath(%A_C-mp3speler.song) $slength(%A_C-mp3speler.song) $+ $smode(%A_C-mp3speler.song) $+ $sbitrate(%A_C-mp3speler.song) $+ $ssize(%A_C-mp3speler.song) $sinio | if ($_vr(A_C-mp3speler,ctcp) == on) { ctcp %query mp3 $nopath(%A_C-mp3speler.song) } | goto findquery }
    else return 
  }
}
alias -l smsg {
  if ($_vr(A_C-mp3speler,active) == active) {
    if ($query($active) == $active) || ($chan($active) == $active) && ($server != $null) { msg  %A_C-mp3speler.active  9-3--9`3--9,3--9`3--9{4@ $sot(3) $+ $sst(3) $+ $playtype $+ $sot(3) $+ $sst(4) $+  $strigger $nopath(%A_C-mp3speler.song) $slength(%A_C-mp3speler.song) $+ $smode(%A_C-mp3speler.song) $+ $sbitrate(%A_C-mp3speler.song) $+ $ssize(%A_C-mp3speler.song) 4@9}3--9`3--9,3--9`3--9- $sinio | if ($_vr(A_C-mp3speler,ctcp) == on) { ctcp %A_C-mp3speler.active mp3 $nopath(%A_C-mp3speler.song) } }
    else { $se  $+ $colour(info) [mp3] $did(A_C-mp3speler,4).seltext } 
  }
  elseif ($_vr(A_C-mp3speler,active) == all) { play.all }
  elseif ($_vr(A_C-mp3speler,active) == selected) {
    var %s = $lines(data\A_C-mp3speleract.txt)
    var %s1 = 1 
    while (%s1 <= %s) { msg $read(data\A_C-mp3speleract.txt,%s1) $sot(3) $+ $sst(3) $+ $playtype $+ $sot(3) $+ $sst(4) $+  $strigger $nopath(%A_C-mp3speler.song) $slength(%A_C-mp3speler.song) $+ $smode(%A_C-mp3speler.song) $+ $sbitrate(%A_C-mp3speler.song) $+ $ssize(%A_C-mp3speler.song) $sinio | if ($_vr(A_C-mp3speler,ctcp) == on) { ctcp $read(data\A_C-mp3speleract.txt,%s1) mp3 $nopath(%A_C-mp3speler.song) } | inc %s1 1 }
    else return
  }
}
alias -l A_C-mp3speler.dir.remove { remini data\settings.ini A_C-mp3spelerdir $shortfn(%oi) . | unset %oi | .timer -m 1 1 A_C-mp3speler.dir1 }
alias -l A_C-mp3speler.info {
  if ($_vr(A_C-mp3speler,subfolders) == on) { %A_C-mp3speler.song = $nopath(%A_C-mp3speler.song) | %A_C-mp3speler.song = $A_C-mp3speler.findsong(%A_C-mp3speler.song) }
  $d(-o) 9 1 $file(%A_C-mp3speler.song).size $+ kb ( $+ $sizesonic(%A_C-mp3speler.song) $+ mb $+ ) 
  if ($mp3(%A_C-mp3speler.song).artist != $null) { $d(-o) 11 1 $mp3(%A_C-mp3speler.song).artist } | else $d(-o) 11 1 n/a
  if ($mp3(%A_C-mp3speler.song).title != $null) { $d(-o) 125 1 $mp3(%A_C-mp3speler.song).title } | else $d(-o) 125 1 n/a
  if ($mp3(%A_C-mp3speler.song).genre != $null) { $d(-o) 42 1 $mp3(%A_C-mp3speler.song).genre } | else $d(-o) 42 1 n/a
  if ($mp3(%A_C-mp3speler.song).album != $null) { $d(-o) 12 1 $mp3(%A_C-mp3speler.song).album } | else $d(-o) 12 1 n/a
  if ($mp3(%A_C-mp3speler.song).comment != $null) { $d(-o) 13 1 $mp3(%A_C-mp3speler.song).comment } | else $d(-o) 13 1 n/a
  if ($mp3(%A_C-mp3speler.song).year != $null) { $d(-o) 14 1 $mp3(%A_C-mp3speler.song).year } | else $d(-o) 14 1 n/a
  if ($mp3(%A_C-mp3speler.song).bitrate != $null) { $d(-o) 15 1 $mp3(%A_C-mp3speler.song).bitrate $+ kbps } | else $d(-o) 15 1 n/a
  if ($mp3(%A_C-mp3speler.song).mode != $null) { $d(-o) 19 1 $lower($mp3(%A_C-mp3speler.song).mode) } | else $d(-o) 19 1 n/a
  if ($mp3(%A_C-mp3speler.song).sample != $null) { $d(-o) 26 1 $mp3(%A_C-mp3speler.song).sample $+ khz } | else $d(-o) 26 1 n/a
  $d(-o) 42 1 Blues | $d(-o) 42 2 Classic Rock | $d(-o) 42 3 Country | $d(-o) 42 4 Dance | $d(-o) 42 5 Disco | $d(-o) 42 6 Funk | $d(-o) 42 7 Grunge | $d(-o) 42 8 Hip-Hop | $d(-o) 42 9 Jazz | $d(-o) 42 10 Metal | $d(-o) 42 11 New Age | $d(-o) 42 12 oldies | $d(-o) 42 13 Other | $d(-o) 42 14 Pop | $d(-o) 42 15 R&B | $d(-o) 42 16 Rap | $d(-o) 42 17 Reggae | $d(-o) 42 18 Rock | $d(-o) 42 19 Techno | $d(-o) 42 20 Industrial | $d(-o) 42 21 Alternative | $d(-o) 42 22 Ska | $d(-o) 42 23 Death Metal | $d(-o) 42 24 Pranks | $d(-o) 42 25 Soundtrack | $d(-o) 42 26 Euro-Techno | $d(-o) 42 27 Ambient | $d(-o) 42 28 Trip-Hop | $d(-o) 42 29 Vocal | $d(-o) 42 30 Jazz+Funk | $d(-o) 42 31 Fusion | $d(-o) 42 32 Trance | $d(-o) 42 33 Classical | $d(-o) 42 34 Instrumental | $d(-o) 42 35 Acid | $d(-o) 42 36 House | $d(-o) 42 37 Game | $d(-o) 42 38 Sound Clip | $d(-o) 42 39 Gospel | $d(-o) 42 40 Noise | $d(-o) 42 41 AlternRock | $d(-o) 42 42 Bass 
  $d(-o) 42 43 Soul | $d(-o) 42 44 Punk | $d(-o) 42 45 Space | $d(-o) 42 46 Meditative | $d(-o) 42 47 Instrumental Pop | $d(-o) 42 48 Instrumental Rock | $d(-o) 42 49 Ethnic | $d(-o) 42 49 Gothic | $d(-o) 42 50 Darkwave | $d(-o) 42 51 Techno-Industrial | $d(-o) 42 52 Electronic | $d(-o) 42 53 Pop-Folk | $d(-o) 42 54 Eurodance | $d(-o) 42 55 Dream | $d(-o) 42 56 Southern Rock | $d(-o) 42 57 Comedy | $d(-o) 42 58 Cult| $d(-o) 42 59 Gangsta | $d(-o) 42 59 Top 40 | $d(-o) 42 60 Christian Rap | $d(-o) 42 61 Pop/Funk | $d(-o) 42 61 Jungle | $d(-o) 42 62 Native American | $d(-o) 42 63 Cabaret | $d(-o) 42 64 New Wave | $d(-o) 42 65 Psychadelic | $d(-o) 42 65 Rave | $d(-o) 42 66 Showtunes | $d(-o) 42 67 Trailer | $d(-o) 42 68 Lo-Fi | $d(-o) 42 69 Tribal | $d(-o) 42 70 Acid Punk | $d(-o) 42 71 Acid Jazz | $d(-o) 42 72 Polka | $d(-o) 42 73 Retro | $d(-o) 42 74 Musical | $d(-o) 42 75 Rock & Roll | $d(-o) 42 76 Hard Rock
  $d(-o) 42 77 Folk | $d(-o) 42 78 Folk Rock | $d(-o) 42 79 Swing | $d(-o) 42 80 Fast Fusion | $d(-o) 42 81 Bebob | $d(-o) 42 82 Latin | $d(-o) 42 83 Revival | $d(-o) 42 84 Celtic | $d(-o) 42 85 Bluegrass | $d(-o) 42 86 Avantgarde | $d(-o) 42 87 Gothic Rock | $d(-o) 42 88 Progressive Rock | $d(-o) 42 89 Psychedelic Rock | $d(-o) 42 90 Symphonic Rock | $d(-o) 42 91 Slow Rock | $d(-o) 42 92 Big Bang | $d(-o) 42 93 Chorus | $d(-o) 42 94 Easy Listening | $d(-o) 42 95 Acoustic | $d(-o) 42 96 Humour | $d(-o) 42 97 Speech | $d(-o) 42 98 Chanson | $d(-o) 42 99 Opera | $d(-o) 42 100 Chamber Music | $d(-o) 42 101 Sonata | $d(-o) 42 102 Symphony | $d(-o) 42 103 Booty Brass | $d(-o) 42 104 Primus | $d(-o) 42 105 Porn Groove | $d(-o) 42 106 Satire | $d(-o) 42 107 Slow Jam | $d(-o) 42 108 Club | $d(-o) 42 109 Tango | $d(-o) 42 110 Samba | $d(-o) 42 111 Floklore | $d(-o) 42 112 Ballad | $d(-o) 42 113 Poweer Ballad | $d(-o) 42 114 Rhytmic Soul 
  $d(-o) 42 115 Rhytmic Soul | $d(-o) 42 116 Freestyle | $d(-o) 42 117 Duet | $d(-o) 42 118 Punk Rock | $d(-o) 42 119 Drum Solo | $d(-o) 42 120 A Capela | $d(-o) 42 121 Euro-House | $d(-o) 42 122 Dance Hall

  ;if ($mp3(%A_C-mp3speler.song).genre != $null) { $d(-o) 42 1 $mp3(%A_C-mp3speler.song).genre } | else $d(-o) 42 1 n/a
  $d(-o) 42 1 $mp3(%A_C-mp3speler.song).genre 
  $d(-c) 42 1
}
alias find {
  dialog -t A_C-mp3speler searching... 
  $d(-r) 4 
  var %t = $findfile($did(A_C-mp3speler,88).text, * $+ $did(A_C-mp3speler,45).text $+ * $+ .mp3,0)
  var %t1 = 1
  while (%t1 <= %t) { $d(-a) 4 $findfile($did(A_C-mp3speler,88).text, * $+ $did(A_C-mp3speler,45).text $+ * $+ .mp3,%t1) | inc %t1 1 |  if (%t1 == %t) { dialog -t A_C-mp3speler search results | did -z A_C-mp3speler 4 } }
}
alias -l mp3.pub.info {
  msg %A_C-mp3speler.active $sot(1) $+ mp3 info $+ $sot(2) $did(A_C-mp3speler,4).seltext 
  msg %A_C-mp3speler.active $s.size($1) $s.artist($1) $s.title($1) $s.genre($1) $s.album($1) $s.current($1) $s.year($1) $s.bitrate($1) $s.mode($1) $s.sample($1)
}
alias -l s.artist {
  if ($mp3($1).artist != $null) { return $sot(3) $+ $sst(1) $+ 99 $+ artist $+ $sot(3) $+ $sst(2) $+ 99 $mp3($1).artist } | else return $sot(3) $+ $sst(1) $+ 99 $+ artist $+ $sot(3) $+ $sst(2) $+ 99 n/a
}
alias -l s.size {
  return $sot(3) $+ $sst(1) $+ 99 $+ size $+ $sot(3) $+ $sst(2) $+ 99 $file($1).size $+ kb ( $+ $sizesonic($1) $+ mb $+ ) 
}
alias -l s.title {
  if ($mp3($1).title != $null) { return $sot(3) $+ $sst(1) $+ 99 $+ title $+ $sot(3) $+ $sst(2) $+ 99 $mp3($1).title } | else return $sot(3) $+ $sst(1) $+ 99 $+ title $+ $sot(3) $+ $sst(2) $+ 99 n/a
}
alias -l s.genre {
  if ($mp3($1).genre != $null) { return $sot(3) $+ $sst(1) $+ 99 $+ genre $+ $sot(3) $+ $sst(2) $+ 99 $mp3($1).genre } | else return $sot(3) $+ $sst(1) $+ 99 $+ genre $+ $sot(3) $+ $sst(2) $+ 99 n/a
}
alias -l s.album {
  if ($mp3($1).album != $null) { return $sot(3) $+ $sst(1) $+ 99 $+ album $+ $sot(3) $+ $sst(2) $+ 99 $mp3($1).album } | else return $sot(3) $+ $sst(1) $+ 99 $+ album $+ $sot(3) $+ $sst(2) $+ 99 n/a
}
alias -l s.comment {
  if ($mp3($1).comment != $null) { return $sot(3) $+ $sst(1) $+ 99 $+ comment $+ $sot(3) $+ $sst(2) $+ 99 $mp3($1).comment } | else return $sot(3) $+ $sst(1) $+ 99 $+ comment $+ $sot(3) $+ $sst(2) $+ 99 n/a
}
alias -l s.year {
  if ($mp3($1).year != $null) { return $sot(3) $+ $sst(1) $+ 99 $+ year $+ $sot(3) $+ $sst(2) $+ 99 $mp3($1).year } | else return $sot(3) $+ $sst(1) $+ 99 $+ year $+ $sot(3) $+ $sst(2) $+ 99 n/a
}
alias -l s.bitrate {
  if ($mp3($1).bitrate != $null) { return $sot(3) $+ $sst(1) $+ 99 $+ bitrate $+ $sot(3) $+ $sst(2) $+ 99 $mp3($1).bitrate $+ kbps } | else return $sot(3) $+ $sst(1) $+ 99 $+ bitrate $+ $sot(3) $+ $sst(2) $+ 99 n/a
}
alias -l s.mode {
  if ($mp3($1).mode != $null) { return $sot(3) $+ $sst(1) $+ 99 $+ mode $+ $sot(3) $+ $sst(2) $+ 99 $lower($mp3($1).mode) } | else return $sot(3) $+ $sst(1) $+ 99 $+ mode $+ $sot(3) $+ $sst(2) $+ 99 n/a
}
alias -l s.sample {
  if ($mp3($1).sample != $null) { return $sot(3) $+ $sst(1) $+ 99 $+ sample rate $+ $sot(3) $+ $sst(2) $+ 99 $mp3($1).sample $+ khz } | else return $sot(3) $+ $sst(1) $+ 99 $+ sample rate $+ $sot(3) $+ $sst(2) $+ 99 n/a
}
alias -l A_C-mp3speler.browse {
  if ($A_C-mp3speler.dir.count <= 1) || ($_vr(A_C-mp3speler,showmode) == all) { $d(-b) 7,59 }
  else $d(-e) 7,59
}
alias -l A_C-mp3speler.dir.count return $ini(data\settings.ini,A_C-mp3spelerdir,0)
alias -l A_C-mp3speler.dir.del { .remini data\settings.ini A_C-mp3spelerdir | A_C-mp3speler.browse }
;shuffle duration
alias -l A_C-mp3speler.trs {
  if ($dialog(A_C-mp3speler) != $null) { 
    if ($inmp3.fname != $shortfn(%A_C-mp3speler.song)) || ($inmp3 == $false) && ($inmp3.fname != $shortfn(%A_C-mp3speler.song)) { .timer9898 off  | $d(-r) 141 1 |  halt }
    $d(-o) 141 1 $remove($duration($calc(($mp3($shortfn(%A_C-mp3speler.song)).length - $inmp3.pos) / 1000)),rs,ins,ecs) 
  }
}
alias -l son.shuffle { if ($_vr(A_C-mp3speler,shuffle) == on) { _vw A_C-mp3speler playtype shuffle | .timer7879 0 $calc($file($shortfn(%A_C-mp3speler.song)).size / 15876.24752+10) A_C-mp3speler.shuffle  } }
alias -l slength { 
  if ($_vr(A_C-mp3speler,d-length) == on) { return $sot(3) $+ $sst(1) $+ 99 $+ $A_C-mp3speler.dur($1) $+ $sot(3) $+ $sst(2) $+ 99 }
  else return 
} 
alias -l smode { 
  if ($_vr(A_C-mp3speler,d-mode) == on) { return $sot(3) $+ $sst(1) $+ 99 $+  $lower($mp3($1).mode) $+ $sot(3) $+ $sst(2) $+ 99  }
  else return 
} 
alias -l sbitrate { 
  if ($_vr(A_C-mp3speler,d-bitrate) == on) { return $sot(3) $+ $sst(1) $+ 99 $+ $mp3($1).bitrate $+ kbps $+ $sot(3) $+ $sst(2) $+ 99  }
  else return 
} 
alias -l ssize { 
  if ($_vr(A_C-mp3speler,d-size) == on) { return $sot(3) $+ $sst(1) $+ 99 $+ $sizesonic($1) $+ mb $+ $sot(3) $+ $sst(2) $+ 99  }
  else return 
} 
alias -l sinio { 
  if ($_vr(A_C-mp3speler,d-inio) == on) { return $sot(1) $+ A_C-mp3speler $+ $sot(2)  }
  else return 
} 
alias -l son.playlist {
  if ($_vr(A_C-mp3speler,playlist) == on) && ($lines(data\A_C-mp3speler.mpl) != $null) {
    %mp3.lines = $lines(data\A_C-mp3speler.mpl) 
    if ($exists(data\A_C-mp3speler.mpl) == $true) { set %A_C-mp3speler.song $read -l %son.num data\A_C-mp3speler.mpl }
    else { write data\A_C-mp3speler.mpl }  
    %A_C-mp3speler.song = $findfile($nofile($longfn(%A_C-mp3speler.song)),$nopath($longfn(%A_C-mp3speler.song)),1)    
    %A_C-mp3speler.song = $longfn(%A_C-mp3speler.song)
    if (%son.num > %mp3.lines) { if ($dialog(A_C-mp3speler) != $null) { $d(-b) 406 | $d(-e) 403,405,4,402,5,23 | dialog -t A_C-mp3speler $longfn($sondir) } | goto end } 
    if ($_vr(A_C-mp3speler,intplayer) == on) { .splay -p $shortfn(%A_C-mp3speler.song) }
    else { .run $shortfn($_vr(mp3,player)) $shortfn(%A_C-mp3speler.song) }
    if ($dialog(A_C-mp3speler) != $null) { 
      dialog -t A_C-mp3speler (play list) $nopath($longfn(%A_C-mp3speler.song)) 
      $d(-o) 11 1 $mp3(%A_C-mp3speler.song).artist 
      $d(-o) 125 1 $mp3(%A_C-mp3speler.song).title
      $d(-o) 42 1 $mp3(%A_C-mp3speler.song).genre
      $d(-o) 12 1 $mp3(%A_C-mp3speler.song).album 
      $d(-o) 13 1 $mp3(%A_C-mp3speler.song).comment 
      $d(-o) 14 1 $mp3(%A_C-mp3speler.song).year
      $d(-o) 15 1 $mp3(%A_C-mp3speler.song).bitrate $+ kbps
      $d(-o) 19 1 $lower($mp3(%A_C-mp3speler.song).mode)
      $d(-o) 26 1 $mp3(%A_C-mp3speler.song).sample $+ khz
      $d(-o) 28 1 $A_C-mp3speler.dur(%A_C-mp3speler.song) 
      $d(-e) 111  
    }
    A_C-mp3speler.play
    goto end2
    :end
    unset %son.num | .splay -p stop
    :end2
  }
}
alias -l _son12 if ($exists(data\A_C-mp3speler.mpl) == $true) { return $read -l %vto data\A_C-mp3speler.mpl  }
alias -l mpl.list {
  if ($findfile($mircdir,A_C-mp3speler.mpl,1) == $null) { write -1 %vto data\A_C-mp3speler.mpl }
  $d(-r) 401    
  set %vto 0
  :loop 
  inc %vto 1 
  if ($_son12 != $null) { var %hj = $_son12 | $d(-a) 401 $longfn(%hj) | goto loop } 
  else goto end 
  :end 
  unset %vto
  did -z A_C-mp3speler 401
} 

on *:dialog:A_C-mp3speler:dclick:*:{
  if ($did == 4) { 
    if ($dialog(A_C-mp3speler).title != search results) { 
      set %A_C-mp3speler.song $sondir $+ $did(A_C-mp3speler,4).seltext
      set %A_C-mp3speler.song $findfile($nofile(%A_C-mp3speler.song),$nopath(%A_C-mp3speler.song),1)
      if ($_vr(A_C-mp3speler,intplayer) == on) { dialog -t A_C-mp3speler (playing) $nopath(%A_C-mp3speler.song) }
      else { dialog -t A_C-mp3speler $nopath(%A_C-mp3speler.song) }  
    }  
    if ($_vr(A_C-mp3speler,intplayer) == on) { .splay -p $shortfn(%A_C-mp3speler.song) }
    else { .run $shortfn($_vr(mp3,player)) $shortfn(%A_C-mp3speler.song) }
    A_C-mp3speler.play
  }
}
alias -l sondir return $ini(data\settings.ini,A_C-mp3spelerdir,%sonic.cur)
alias -l A_C-mp3speler.del { set -q %del $iif($$?!="delete this mp3?" == $true,yes,no) | sondel }
alias -l sondel {
  if (%del == yes) { remove $shortfn(%A_C-mp3spelerd)  | unset %del | .timer -m 1 1 A_C-mp3speler.list } 
  else { unset %del }
}
alias -l A_C-mp3speler.dir.add { _vw A_C-mp3spelerdir $shortfn($$sdir="mp3 folder") . | A_C-mp3speler.dir1 }
alias -l son.loop.play {
  unset %r.c  
  if ($_vr(A_C-mp3speler,public) == on) { msg %A_C-mp3speler.active $sot(3) $+ $sst(3) $+ mp3 loop $+ $sot(3) $+ $sst(4) $+  $strigger $nopath($longfn($_vr(A_C-mp3speler,loopsong))) $slength(%A_C-mp3speler.song) $+ $smode(%A_C-mp3speler.song) $+ $sbitrate(%A_C-mp3speler.song) $+ $ssize(%A_C-mp3speler.song) $sinio }
  if ($_vr(A_C-mp3speler,intplayer) == on) { .splay -p $shortfn($_vr(A_C-mp3speler,loopsong)) }
  else { .run $shortfn($_vr(mp3,player)) $shortfn(%A_C-mp3speler.song) }
  if ($_vr(A_C-mp3speler,ctcp) == on) { ctcp %A_C-mp3speler.active mp3 $nopath(%A_C-mp3speler.song) } 
  .timer9898 0 1 A_C-mp3speler.tr 
}
alias -l sizesonic return $round($calc($file($shortfn($1-).size) / 1048576),2) 
alias -l pf.player { if (%pf > 14) return end | if (%pf == 1) return winamp.exe | elseif (%pf == 2) return nexencode.exe | elseif (%pf == 3) return sonique.exe | elseif (%pf == 4) return kjofol.exe | elseif (%pf == 5) return XingMP3.exe | elseif (%pf == 6) return unreal.exe | elseif (%pf == 7) return mplayer2.exe | elseif (%pf == 8) return CTPlay.exe | elseif (%pf == 9) return pulse.exe | elseif (%pf == 10) return nad.exe | elseif (%pf == 11) return digideck.exe | elseif (%pf == 12) return soritong.exe | elseif (%pf == 13) return eclipse.exe | elseif (%pf == 14) return studio.exe } 
alias -l A_C-mp3speler.ps {
  :start
  if ($pf.player == end) { $d(-o) 101 1 no other players found on $did(102,$did(102).sel) | $d(-b) 106,105 | unset %pf | $d(-e) 104 |  goto end }
  var %mp3.exe = $shortfn($findfile(%drive,$pf.player,1))
  :start2
  if (%mp3.exe == $null) { $d(-r) 101 1 | $d(-o) 101 1 Searching... | inc %pf 1 | goto start }
  if ($dialog(A_C-mp3speler) != $null) { did -g A_C-mp3speler 100 %mp3.exe } 
  $d(-o) 101 1 $longfn(%mp3.exe) | beep 
  $d(-e) 106,105 | $d(-b) 104  
  set -q %player? $d(-o) 101 1 $longfn(%mp3.exe) | goto end 
  if (%player? == $true) { $d(-o) 101 1 MP3 Player Set to $_vr(MP3,playername)  | unset %pf | unset %drive | unset %player? }
  :end
}   
alias -l A_C-mp3speler.man {
  var %mp3.exe = $$dir="Path to the mp3 player(.exe name):"  c:\*.exe  
  _vw mp3 player $shortfn(%mp3.exe) 
  if ($dialog(mp3con) != $null) { did -g mp3con 100 $longfn($_vr(MP3,player))  }
  $ae  $+ $colour(info2) $+ *** MP3 Player set to $longfn(%mp3.exe) | beep
}        
alias -l son.length { 
  var %t = $round($calc($1 - (( [ $int($calc($1 / 60 )) ] ) *  60 )),0) 
  if ($len(%t) == 1) set %t 0 $+ %t
  return $int($calc($1 / 60 )) $+ : $+ %t
}
alias -l son.dur { 
  set %minute 0
  unset %sec
  unset %total
  set %length $round($calc($mp3($1-).length / 1000), 0)
  while (%length >= 60) { 
    inc %minute 1
    dec %length 60
  } 
  %sec = %length
  if ($len(%length) == 1) %sec = 0 $+ %sec
  %total = %minute $+ m $+ %sec $+ s
  return %total
}
alias -l son.loop { return $calc($file($1-).size / 15876.24752+10) }
on *:mp3end: {
  if ($_vr(A_C-mp3speler,loop) != on) { _vw A_C-mp3speler loop off | .timer7878 off }
  if (%son.num != null) { inc %son.num 1 | son.playlist |  if ($dialog(A_C-mp3speler) != $null) { $d(-b) 406 } }  
  if ($dialog(A_C-mp3speler).title != search results) && ($dialog(A_C-mp3speler) != $null) { if ($_vr(A_C-mp3speler,intplayer) == on) { dialog -t A_C-mp3speler $longfn($sondir) } }
  if ($dialog(A_C-mp3speler) != $null) { $d(-b) 110,111 }
  if ($_vr(A_C-mp3speler,loop) == on) { .timer 1 5 son.loop.play } 
  %angelika = $_vr(A_C-mp3speler,songs.played) | inc %angelika 1 |  _vw A_C-mp3speler songs.played %angelika | if ($dialog(A_C-mp3speler) != $null) { $d(-o) 601 1 $_vr(A_C-mp3speler,songs.played) }
}

;time remaining
alias A_C-mp3speler.tr {
  if ($dialog(A_C-mp3speler) == $null) && ($_vr(A_C-mp3speler,playstop) == on) { .timer9898 off | splay -p stop }
  if ($dialog(A_C-mp3speler) != $null) { 
    if ($inmp3.fname != $shortfn(%A_C-mp3speler.song)) || ($inmp3 == $false) && ($inmp3.fname != $shortfn(%A_C-mp3speler.song)) { .timer9898 off | $d(-r) 141 1 |  halt }
    else $d(-o) 141 1 $remove($duration($calc(($mp3($shortfn(%A_C-mp3speler.song)).length - $inmp3.pos) / 1000)),rs,ins,ecs) 
  }
}
alias -l A_C-mp3speler.act {
  if ($dialog(A_C-mp3speler) != $null) {
    $d(-r) 57 
    var %channum = 0
    :findchan
    inc %channum 1
    var %chan = $chan(%channum)
    if (%chan == $null) { goto query }
    $d(-i) 57 1 %chan
    goto findchan
    :query
    var %querynum = 0
    :findquery
    inc %querynum 1
    var %query = $query(%querynum)
    if (%query == $null) { goto end }
    $d(-i) 57 1 %query
    goto findquery
    :end
  }
}
on *:input:?: { .timer -m 1 1 A_C-mp3speler.act }
on *:join:#: if ($nick == $me) { .timer -m 1 1 A_C-mp3speler.act } 
on *:part:#: if ($nick == $me) { .timer -m 1 1 A_C-mp3speler.act | actrem $chan | .timer -m 1 1 actchan }    
on *:kick:#: if ($nick == $me) { .timer -m 1 1 A_C-mp3speler.act | actrem $chan | .timer -m 1 1 actchan }
on *:open:?: { .timer -m 1 1 A_C-mp3speler.act }
on *:close:?: { .timer -m 1 1 A_C-mp3speler.act | actrem $nick | .timer -m 1 1 actchan }
alias -l son.loop.play1 {
  unset %r.c  
  if ($_vr(A_C-mp3speler,public) == on) { msg %A_C-mp3speler.active $sot(3) $+ [mp3 loop $+ $sot(3) $+ ] $strigger $nopath(%A_C-mp3speler.song) $slength(%A_C-mp3speler.song) $+ $smode(%A_C-mp3speler.song) $+ $sbitrate(%A_C-mp3speler.song) $+ $ssize(%A_C-mp3speler.song) $sinio }
  if ($_vr(A_C-mp3speler,intplayer) == on) { .splay -p $shortfn($_vr(A_C-mp3speler,loopsong)) }
  else { .run $shortfn($_vr(mp3,player)) $shortfn(%A_C-mp3speler.song) }
  if ($_vr(A_C-mp3speler,ctcp) == on) { ctcp %A_C-mp3speler.active mp3 $nopath(%A_C-mp3speler.song) } 
}
alias show.s echo -a $sot(3) $+ $sst(3) $+ $playtype $+ $sot(3) $+ $sst(4) $+  $nopath(%A_C-mp3speler.song) $slength(%A_C-mp3speler.song) $+ $smode(%A_C-mp3speler.song) $+ $sbitrate(%A_C-mp3speler.song) $+ $ssize(%A_C-mp3speler.song) $sinio
alias -l A_C-mp3speler.dur return $remove($duration($calc(($mp3($shortfn($1)).length - ) / 1000)),ins,ecs,in,ec)
alias -l sst {
  if ($_vr(A_C-mp3speler,styletheme) == none) { 
    if ($1 == 1) { return }
    if ($1 == 2) { return }
    if ($1 == 3) { return }
    if ($1 == 4) { return }
  }
  elseif ($_vr(A_C-mp3speler,styletheme) == bracket) { 
    if ($1 == 1) { return [ }
    if ($1 == 2) { return ] }
    if ($1 == 3) { return [ }
    if ($1 == 4) { return ] }
  }
  elseif ($_vr(A_C-mp3speler,styletheme) == large dot) { 
    if ($1 == 1) { return • }
    if ($1 == 2) { return • }
    if ($1 == 3) { return • }
    if ($1 == 4) { return • }
  }
  elseif ($_vr(A_C-mp3speler,styletheme) == small dot) { 
    if ($1 == 1) { return · }
    if ($1 == 2) { return · }
    if ($1 == 3) { return · }
    if ($1 == 4) { return · }
  }
  elseif ($_vr(A_C-mp3speler,styletheme) == dots) { 
    if ($1 == 1) { return · }
    if ($1 == 2) { return · }
    if ($1 == 3) { return • }
    if ($1 == 4) { return • }
  }
  elseif ($_vr(A_C-mp3speler,styletheme) == .:style:.) { 
    if ($1 == 1) { return : }
    if ($1 == 2) { return : }
    if ($1 == 3) { return .: }
    if ($1 == 4) { return :. }
  }
  elseif ($_vr(A_C-mp3speler,styletheme) == style2) { 
    if ($1 == 1) { return « }
    if ($1 == 2) { return » }
    if ($1 == 3) { return « }
    if ($1 == 4) { return » }
  }
}
alias -l sot {
  if ($_vr(A_C-mp3speler,theme) == random) { 
    if (%r.c == $null) { set %r.c $rand(1,8) }
    if (%r.c == 1) { _vw A_C-mp3speler theme2 1 }
    elseif (%r.c == 2) { _vw A_C-mp3speler theme2 2 }
    elseif (%r.c == 3) { _vw A_C-mp3speler theme2 3 }
    elseif (%r.c == 4) { _vw A_C-mp3speler theme2 4 }
    elseif (%r.c == 5) { _vw A_C-mp3speler theme2 5 }
    elseif (%r.c == 6) { _vw A_C-mp3speler theme2 6 }
    elseif (%r.c == 7) { _vw A_C-mp3speler theme2 7 }
    elseif (%r.c == 8) { _vw A_C-mp3speler theme2 8 }
  } 
  if ($_vr(A_C-mp3speler,theme2) == 1) || ($_vr(A_C-mp3speler,theme) == none) { 
    if ($1 == 1) { return ·• }
    if ($1 == 2) { return •· }
    if ($1 == 3) { return $chr(160) }
  }
  elseif ($_vr(A_C-mp3speler,theme2) == 2) || ($_vr(A_C-mp3speler,theme) == red) { 
    if ($1 == 1) { return 5•4• }
    if ($1 == 2) { return 4•5• }
    if ($1 == 3) { return 4 }
  }
  elseif ($_vr(A_C-mp3speler,theme2) == 3) || ($_vr(A_C-mp3speler,theme) == yellow) { 
    if ($1 == 1) { return 7•8• }
    if ($1 == 2) { return 8•7• }
    if ($1 == 3) { return 8 }
  }

  elseif ($_vr(A_C-mp3speler,theme2) == 4) || ($_vr(A_C-mp3speler,theme) == blue) { 
    if ($1 == 1) { return 2•12• }
    if ($1 == 2) { return 12•2• }
    if ($1 == 3) { return 12 }
  }
  elseif ($_vr(A_C-mp3speler,theme2) == 5) || ($_vr(A_C-mp3speler,theme) == green) { 
    if ($1 == 1) { return 3•9• }
    if ($1 == 2) { return 9•3• }
    if ($1 == 3) { return 9 }
  }
  elseif ($_vr(A_C-mp3speler,theme2) == 6) || ($_vr(A_C-mp3speler,theme) == purple) { 
    if ($1 == 1) { return 6•13• }
    if ($1 == 2) { return 13•6• }
    if ($1 == 3) { return 13 }
  }
  elseif ($_vr(A_C-mp3speler,theme2) == 7) || ($_vr(A_C-mp3speler,theme) == aqua) { 
    if ($1 == 1) { return 10•11• }
    if ($1 == 2) { return 11•10• }
    if ($1 == 3) { return 11 }
  }
  elseif ($_vr(A_C-mp3speler,theme2) == 8) || ($_vr(A_C-mp3speler,theme) == silver) { 
    if ($1 == 1) { return 15•14• }
    if ($1 == 2) { return 14•15• }
    if ($1 == 3) { return 14 }
  }
}
alias A_C-mp3speler.findsong {
  var %f = 0
  :loop
  inc %f 1
  var %soni.dir = $ini(data\settings.ini,A_C-mp3spelerdir,%f)
  if (%soni.dir) {
    if ($_vr(A_C-mp3speler,subfolders) == on) { var %file = $findfile(%soni.dir,$1-,1) }
    else { var %file = $findfile(%soni.dir,$1-,1,1) }
    if (%file) return %file
    else goto loop
  }
  return
}
on *:text:*:*: {
  if ($1 == ! $+ $me) && (*.mp3 iswm $2-) {
    if ($_vr(A_C-mp3speler,triggersend) == $null) { _vw A_C-mp3speler mp3.asend on } 
    if ($_vr(A_C-mp3speler,triggersend) == off) { .notice $nick [MP3 STUREN GEANNULEERD] -4 $2- - Sorry mijn mp3 Auto-Sturen staat uit. $sinio | halt } 
    var %file = $A_C-mp3speler.findsong($2-)
    if (%file) { dcc send $nick $longfn(%file) }
    var %mc = $_vr(A_C-mp3speler,mp3sent) 
    inc %mc 1
    _vw A_C-mp3speler mp3sent %mc 
  }
  if ($1 == @ $+ $me) {
    if ($exists(@ $+ $me $+ .txt) == $true) && ($_vr(A_C-mp3speler,mp3list) == on) { dcc send $nick @ $+ $me $+ .txt }
    elseif ($exists(@ $+ $me $+ .txt) != $true) { .notice $nick [MP3 LIJST STUREN GEANNULEERD] er is geen MP3lijst gemaakt. } 
    elseif ($_vr(A_C-mp3speler,mp3list) != on) { .notice $nick [MP3 LIJST STUREN STAAT UIT] geef nu geen MP3lijst weg. } 
  }
}
ctcp *:mp3:*: {
  if ($_vr(A_C-mp3speler,ctcpplay) == on) {
    var %file = $A_C-mp3speler.findsong($2-)
    if (%file) {
      if ($_vr(A_C-mp3speler,intplayer) == on) && ($_vr(mp3,player) != $null) { .splay -p $shortfn(%file) } 
      else { .run -n $shortfn($_vr(mp3,player)) $shortfn(%file) } 
    }
    else {
      set %sound.nick $nick 
      set %sound.chan $chan
      set %sound.file $left($2-,$calc($pos($2-,.mp3,1) +3))
      if ($chan == $null) { set %sound.chan $comchan($nick,1) }
      $se $chan 12*** MP3 unable to find $left($2-,$calc($pos($2-,.mp3,1) +3))  
      ;echo -s >> press 12•shift12• + 12•f1012• to request12 $left($2-,$calc($pos($2-,.mp3,1) +3)) | if ($_vr(mp3mon,switch) == on) && ($dialog(mp3mon) != $null) { did -a mp3mon 4 %sound.chan ! $+ %sound.nick $left($2-,$calc($pos($2-,.mp3,1) +3))  | mp3mon.c } 
    }
  }
}
alias -l actchan {
  if ($dialog(A_C-mp3speler) != $null) {
    $d(-r) 58 
    var %t1 = $lines(data\A_C-mp3speleract.txt)  
    if ($lines(data\A_C-mp3speleract.txt) == 0) { $d(-c) 67 | $d(-u) 68,69 | $d(-b) 63,58,62 | _vw A_C-mp3speler active active | return } 
    var %t = 1
    :loop
    if (%t <= %t1) { $d(-a) 58 $read(data\A_C-mp3speleract.txt, %t) | inc %t 1 | goto loop }
    else return
  }
}
alias A_C-mp3speler.play.sel {
  if ($did(A_C-mp3speler,4).sel) { 
    _vw A_C-mp3speler loopsong $shortfn(%A_C-mp3speler.song)  
    set %A_C-mp3speler.song $sondir $+ $did(A_C-mp3speler,4).seltext
    set %A_C-mp3speler.song $findfile($nofile(%A_C-mp3speler.song),$nopath(%A_C-mp3speler.song),1)    
    if ($_vr(A_C-mp3speler,intplayer) == on) { dialog -t A_C-mp3speler (playing) $nopath(%A_C-mp3speler.song) }
    else { dialog -t A_C-mp3speler $nopath(%A_C-mp3speler.song) }  
    if ($_vr(A_C-mp3speler,intplayer) == on) { .splay -p $shortfn(%A_C-mp3speler.song) }
    else { .run $shortfn($_vr(mp3,player)) $shortfn(%A_C-mp3speler.song) }
    $d(-e) 110,111
    $d(-b) 218,47,48  
    .timer9898 off
    A_C-mp3speler.play  
  }
}
alias mp3.list {
  if ($exists(data\settings.ini) == $false) { write -c data\settings.ini }
  write -c @ $+ $me $+ .txt 
  var %f = 0
  var %soni.num = 0
  var %tot = 0
  :loop 
  inc %f 1
  var %soni.dir = $ini(data\settings.ini,A_C-mp3spelerdir,%f)
  var %tot = $calc(%tot + $findfile(%soni.dir,*.mp3,0))
  if (%soni.dir) {
    write -i @ $+ $me $+ .txt 
    write @ $+ $me $+ .txt ==========================
    write @ $+ $me $+ .txt $chr(91) $+ $longfn(%soni.dir) $+ $chr(93) Total: $findfile(%soni.dir,*.mp3,0) 
    write @ $+ $me $+ .txt ==========================
    if (%do.sub) { inc %soni.num $findfile(%soni.dir,*.mp3,0, write @ $+ $me $+ .txt ! $+ $me $nopath($1-) ) }
    else { inc %soni.num $findfile(%soni.dir,*.mp3,0,1, write @ $+ $me $+ .txt ! $+ $me $nopath($1-) ) }
    goto loop
  }
  write -il1 @ $+ $me $+ .txt Deze daterende lijst van %tot files is gemaakt $asctime(ddd mmm dd hh:nn:sstt yyyy) Met Gebruik van A_C- MP3 Speler.
  write -il2 @ $+ $me $+ .txt Om een  MP3file te krijgen , Copieer/Plak De Naam naar de room waar ik zit: ! $+ $me <mp3 filename>
}
alias id3w {
  if (!$file($1) || $right($1,4) != .mp3) {
    return $false
  }
  bread $1 $calc($file($1).size - 128) 128 &id3
  if ($bvar(&id3,1,3).text !== TAG) {
    bset &id3w 128 0
    bwrite $1 -1 128 &id3w
    bwrite $1 $calc($file($1).size - 128) 3 TAG
  }
  if ($2 == title) {
    bset &id3w 30 0
    bwrite $1 $calc($file($1).size - 125) 30 &id3w
    if ($3) {
      bwrite $1 $calc($file($1).size - 125) 30 $3-
    }
  }
  else if ($2 == artist) {
    bset &id3w 30 0
    bwrite $1 $calc($file($1).size - 95) 30 &id3w
    if ($3) {
      bwrite $1 $calc($file($1).size - 95) 30 $3-
    }
  }
  else if ($2 == album) {
    bset &id3w 30 0
    bwrite $1 $calc($file($1).size - 65) 30 &id3w
    if ($3) {
      bwrite $1 $calc($file($1).size - 65) 30 $3-
    }
  }
  else if ($2 == year) {
    bset &id3w 4 0
    bwrite $1 $calc($file($1).size - 35) 4 &id3w
    if ($3) {
      bwrite $1 $calc($file($1).size - 35) 4 $3-
    }
  }
  else if ($2 == comment) {
    bset &id3w 28 0
    bwrite $1 $calc($file($1).size - 31) 28 &id3w
    if ($3) {
      bwrite $1 $calc($file($1).size - 31) 28 $3-
    }
  }
  else if ($2 == ;genre) {
    bset &id3w 29 0
    bwrite $1 $calc($file($1).size - 2) 29 &id3w
    if ($3) {
      bwrite $1 $calc($file($1).size - 2) 29 $3-
    }
  }
  else if ($2 == track) {
    bset &id3w 2 0
    bwrite $1 $calc($file($1).size - 3) 2 &id3w
    if ($3) {
      bwrite $1 $calc($file($1).size - 2) 1 $chr($3)
    }
  }
  ; return $true
}
}
