All pastes #622980 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-07-17 08:05 UTC
rendered paste body
Menu * { 
  - 
  JJR iPod!:/dialog -md eMP3 eMP3 
  - 
} 

alias wtfz { var %x = 1
  while ($did(emp3,2,%x)) {
    if (!$did(emp3,2,$calc(%x + 1))) { 
      set %naabedie " $+ $readini(mp3player.ini,Directory,Playlist1) $+ $did(emp3,2,$r(1,%x)) $+ .mp3 $+ " 
    halt }
    inc %x
  }
}

Dialog eMP3 { 
  Title "iPod V1.2 by Dani :D" 
  size -1 -1 150 150 
  option dbu 
  Button "Nieuwe afspeellijst", 1, 20 1 110 14 
  List 2, 20 20 110 100, vsbar 
  Button "Play", 8, 13 115 30 10 
  Button "Pauze", 10, 43 115 30 10 
  Button "Stop", 9, 103 115 30 10 
  Button "+", 50, 35 129 10 10 
  Edit "1", 51, 47 129 50 10, center read 
  Button "-", 52, 100 129 10 10 
  Check "Amsg", 123, 35 140 23 12 
  Check "Mute", 124, 65 140 23 12 
  button "Skip", 3, 73 115 30 10 , center
  check "Shuffle", 6, 95 140 25 12
} 
on *:dialog:eMP3:sclick:6:{
  if ($did(6).state == 1) { wtfz }
  if ($did(6).state == 0) { inext }
}
on *:dialog:emp3:sclick:3:{
  splay -p %naabedie 
  if ($did(123).state == 1) { amsg iamsg }
  if ($did(6).state == 1) { /wtfz }
  if ($did(6).state == 0) { /inext }
}
on *:mp3end:{
  splay -p %naabedie
  if ($did(emp3,123).state) { iamsg }
  if ($did(emp3,6).state == 1) { /wtfz }
  else { inext }
}

ON *:DIALOG:emp3:init:*:{ 
  noop $findfile($readini(mp3player.ini,directory,Playlist1),*.mp3,0,did -a eMP3 2 $nopath($left($1-,-4))) 
  did -ra $dname 51 $int($calc(( $vol(master) / 65535) * 100)) $+ % 
} 
on *:Dialog:eMP3:sclick:1: { 
  did -r eMp3 2 
  .writeini mp3player.ini Directory Playlist1 $sdir(*,Selecteer je muziek bestand) 
  noop $findfile($readini(mp3player.ini,directory,Playlist1),*.mp3,0,did -a emp3 2 $nopath($left($1-,-4))) 
} 
ON *:DIALOG:eMP3:sclick:8:{   if ($insong.pause) { 
    splay resume 
    halt 
  } 
  if ($did(EMP3,123).state == 0) { set %Amsg Lmao } 
  if ($did(EMP3,123).state == 1) { set %Amsg On } 
  splay -p $qt($findfile($readini(mp3player.ini,Directory,Playlist1),$+(*,$did(2).seltext,.mp3),1,)) 
  if (%AmSG == on) {  iamsg  } 
  inext
}
ON *:DIALOG:eMP3:Sclick:9:{ 
  /splay stop 
} 

on *:dialog:eMP3:sclick:50:{ 
  /vol -v $calc( $vol(master) + 5000) 
  did -ra $dname 51 $int($calc(( $vol(master) / 65535) * 100)) $+ % 
} 
on *:dialog:eMP3:sclick:123: { 
  if ($did(EMP3,123).state == 0) { set %Amsg Lmao } 
  if ($did(EMP3,123).state == 1) { set %Amsg On } 
} 
ON *:DIALOG:eMP3:sclick:124:{ 
  if ($did(eMP3,124).state == 0) { vol -vu2 } 
  if ($did(eMP3,124).state == 1) {  vol -vu1 
  } 
} 

on *:dialog:eMP3:sclick:52:{ 
  /vol -v  $calc( $vol(master) - 5000) 
  did -ra $dname 51 $int($calc(( $vol(master) / 65535) * 100)) $+ % 
} 
ON *:DIALOG:eMP3:sclick:*:{ 
  if ($did == 10) { /splay pause } 
  if ($did == 11) { /splay resume } 
}

alias inext { var %x = 1
  while ($did(eMP3,2,%x)) {
    if (!$did(emp3,2,$calc(%x + 1))) { 
      set %naabedie " $+ $readini(mp3player.ini,Directory,Playlist1) $+ $did(emp3,2,1) $+ .mp3 $+ "
      halt 
    }
    if ($did(eMP3,2,%x) == $remove($nopath($insong.fname),.mp3)) { 
      set %naabedie $qt($+($readini(mp3player.ini,Directory,Playlist1),$did(emp3,2,$calc(%x + 1)),.mp3))
      halt 
    } 
    inc %x
  }
}

alias mp3stop { if ($1 == $null) { //echo 4vul een channel in | halt }
  if ($left($1,1) != $chr(35)) { //echo 4Ongeldige channel | halt }
  set %stop [ $+ [ $1 ] ] blaat 
  //echo 4een amsg gaat nu niet meer naar $1
}
alias mp3show { //echo 4De channels waar een halt op staat:
  var %x = 1 
  while ($var(stop*,%x)) { 
    echo -a 4 $+ $right($v1,-5)
  inc %x }
}
alias mp3go { if ($1 == $null) { //echo 4vul een channel in | halt }
  if ($left($1,1) != $chr(35)) { //echo 4Ongeldige channel | halt }
  if (%stop [ $+ [ $1 ] ] == $null) { //echo 4Er staat geen halt op die channel | halt }
  unset %stop [ $+ [ $1 ] ]
  //echo 4een amsg gaat nu weer naar $1 
}
alias iamsg { var %x = 1
  while ($chan(%x) <= $chan(0)) { 
    if (%stop [ $+ [ $chan(%x) ] ] == $null) { msg $chan(%x) ×»(Dani rockt)«× $remove($nopath($insong.fname),.mp3) }
    inc %x
  }
}