mp3 player

By PuNkTuReD on May 21, 2008

Mp3-Player By PuNkTuReD
Add this to the "remotes" section of your "scripts editor"
Type /mp3 to start the Mp3 Player

nothing fancy but its done me ok

feel free to suggest anything
apart from spam options , im getting around to that :))

update:
now choose to spam to one of the nollowing
all
1channel
none

dialog  mp3 {
  title "Mp3 Player"
  size -1 -1 169 180
  option dbu
  box "Now Playing", 110, 5 17 158 20, 
  text "N/A", 111, 10 25 100 8, 
  text "00:00", 138, 145 25 15 8, 
  box "Mp3 List", 112, 5 37 100 107, 
  list 113, 7 44 96 97, size, 
  box "Controls", 121, 107 37 56 107, 
  button "Play", 115, 109 44 25 10, flat, 
  button "Pause", 116, 109 54 25 10, flat, 
  button "Resume", 117, 109 64 25 10, flat, 
  button "Stop", 118, 109 74 25 10, flat, 
  button "Make List", 119, 115 86 37 10, flat, 
  button "Update List", 120, 115 96 37 10, flat, 
  text "Volume", 125, 140 45 25 10, 
  button "Low", 122, 136 54 25 10, flat, 
  button "Med", 123, 136 64 25 10, flat, 
  button "High", 124, 136 74 25 10, flat, 
  text "Loop", 126, 129 106 25 7, 
  button "On", 127, 113 114 15 10, flat, 
  button "Off", 128, 128 114 15 10, flat, 
  button "Next", 129, 143 114 15 10, flat, 
  text "Random", 130, 125 124 25 7, 
  button "On", 131, 113 132 15 10, flat, 
  button "Off", 132, 128 132 15 10, flat, 
  button "Next", 133, 143 132 15 10, flat, 
  menu "File", 140
  item "Close", 141, cancel
  menu "Tools", 150
  item "Make List", 151
  item "Update List", 152
  item break, 160
  item "-SpamOptions-", 155
  item break, 161
  item "All", 156
  item "1Channel", 157
  item "None", 158
  text "", 159, 20 157 80 10,
  box "Play To", 153, 2 150 165 20, 
  text "Made By PuNkTuReD", 154, 60 172 165 20, 
}
on *:mp3end:{ set %playing N/A | set %length 00:00 | did -ra mp3 138 %length | did -ra mp3 111 %playing
  if (%random == on) { splay $read(playlist.txt) | set %playing $nopath($insong.fname) | set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss) | did -ra mp3 111 %playing | did -ra mp3 138 %length | %spamto 4.:12 $+ %playing $+ 4:.:4(12 $+ %Length $+ 4):.:|12 $+ S4.12A4.12S4.12S4|:. }
  if (%loop == on) { inc %songnumber | splay $read(playlist.txt,%songnumber) | set %playing $nopath($insong.fname) | set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss) | did -ra mp3 111 %playing | did -ra mp3 138 %length | %spamto 4.:12 $+ %playing $+ 4:.:4(12 $+ %Length $+ 4):.:|12 $+ S4.12A4.12S4.12S4|:. }
}
on *:dialog:mp3:menu:*:{
  if $did = 151 { set %dir $sdir="Mp3 Directory" | did -r mp3 113 | write -c playlist.txt | noop $findfile(%dir,*.mp3,0,write playlist.txt $1-) | var %num $findfile(%dir,*.mp3,0,did -a mp3 113 $nopath($1-)) }
  if $did = 152 { did -r mp3 113 | write -c playlist.txt | noop $findfile(%dir,*.mp3,0,write playlist.txt $1-) | var %num $findfile(%dir,*.mp3,0,did -a mp3 113 $nopath($1-)) }
  if $did = 156 { set %spamto /ame | did -ra mp3 159 %spamto }
  if $did = 157 { set %spamto /describe $$?"Channel-Include The #" | did -ra mp3 159 %spamto }
  if $did = 158 { set %spamto /echo -a | did -ra mp3 159 %spamto }
}
on *:dialog:mp3:sclick:*:{
  if $did = 115 { set %Playing $did(mp3,113).seltext | set %song $findfile(%dir,$did(mp3,113).seltext,1) | set %length $gmt($round($calc($mp3(%song).length / 1000),0),nn:ss) | splay %song | did -ra mp3 111 %playing | did -ra mp3 138 %length | %spamto 4.:12 $+ %playing $+ 4:.:4(12 $+ %Length $+ 4):.:|12 $+ S4.12A4.12S4.12S4|:. } 
  if $did = 116 { splay pause }
  if $did = 117 { splay resume }
  if $did = 118 { splay Stop | did -ra mp3 111 N/A |  did -ra mp3 138 00:00 }
  if $did = 119 { set %dir $sdir="Mp3 Directory" | did -r mp3 113 | write -c playlist.txt | noop $findfile(%dir,*.mp3,0,write playlist.txt $1-) | var %num $findfile(%dir,*.mp3,0,did -a mp3 113 $nopath($1-)) }
  if $did = 120 { did -r mp3 113 | write -c playlist.txt | noop $findfile(%dir,*.mp3,0,write playlist.txt $1-) | var %num $findfile(%dir,*.mp3,0,did -a mp3 113 $nopath($1-)) }
  if ($did = 122) { vol -v 10000 }
  if ($did = 123) { vol -v 30000 }
  if ($did = 124) { vol -v 65535 }
  if $did = 127 { splay stop | set %loop on | set %random off | set %songnumber 1 | splay $read(playlist.txt,%songnumber) | set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss) | did -ra mp3 111 $nopath($insong.fname) | did -ra mp3 138 %length }
  if $did = 128 { splay stop | set %loop off | did -ra mp3 111 N/A | did -ra mp3 138 0:00 }
  if $did = 129 { if (%loop == off) { Halt } | splay stop | inc %songnumber | splay $read(playlist.txt,%songnumber) | set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss) | did -ra mp3 111 $nopath($insong.fname) | did -ra mp3 138 %length }
  if $did = 131 { splay stop | set %loop off | set %random on | splay $read(playlist.txt) | set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss) | did -ra mp3 111 $nopath($insong.fname) | did -ra mp3 138 %length }
  if $did = 132 { splay stop | set %random off | did -ra mp3 111 N/A | did -ra mp3 138 0:00 }
if $did = 133 { if (%random == off) { Halt } | splay stop | splay $read(playlist.txt) | set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss) | did -ra mp3 111 $nopath($insong.fname) | did -ra mp3 138 %length } }
on *:dialog:mp3:init:0:{ did -a mp3 111 %playing | did -a mp3 113 $findfile(%dir,*.mp3,0,did -a mp3 113 $nopath($1-)) | did -a mp3 138 %length | did -ra mp3 159 %spamto }
on *:dialog:mp3:close:* { set %random off | set %loop off }
alias mp3 dialog -dm mp3 mp3 

Comments

Sign in to comment.
PuNkTuReD   -  Aug 10, 2008

im not gnna update this one as i have posted a new better one. search for
music player mp3 wma wav

 Respond  
PuNkTuReD   -  Aug 10, 2008

no , coz that is an alias and there is no opening { , so no need to close .

 Respond  
damdempsel   -  Jul 28, 2008

does this need a } at the end or no...

 Respond  
SnoooP   -  May 21, 2008

It isn\'t bad... works quite well and the dialog is good too... Just... I think you should be able to add single files.. Aswell as folders..... The colours too are a bit plain hehe but thats nothing major :P... Rate it: 6/10.... Isn\'t a demonstration of pure coding excellence but it isnt bad... Its nice :)... I\'ll keep check and see if you add any updates... Then ill probally improve the rating

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.