This is just another mp3 player. i got asked to post it so i did. I might upgrade and include playlist option (got it on my old one) but might not.
Run: right click channel and click CaiMP3
To skip during continuous play press F2 or press the skip button.
Update: Will halt timer if you unload script and stops the song.
on *:UNLOAD:{
timerMp3 Off
splay stop
}
menu channel {
-
CaiMP3: dialog -dm CaiMP3 CaiMP3
MP3 Info: info
-
}
dialog CaiMP3 {
title "CàiI®C Mp3 Player"
option dbu
size -1 -1 200 100
box "Songs", 1, 1 0 198 50
list 2, 3 8 98 45, vsbar
Text "Playing:", 3, 105 10 30 20
Text "N/A", 4, 145 10 50 20
Text "Time Remaining:", 5, 105 30 30 20
Text "00:00", 6, 145 35 30 10
Button "Play Selected", 7, 15 55 40 20
Button "Play All", 8, 60 55 40 20
Button "Stop", 9, 105 55 40 20
Button "Pause/Resume", 10, 150 55 40 20
Button "Load Songs", 11, 30 75 40 20
Button "Update Songs", 12, 70 75 40 20
Button "Skip", 13, 110 75 40 20
}
on *:MP3END:{
if (%ContPlay == On) { inc %start | contplay }
}
on *:DIALOG:CaiMP3:Sclick:*:{
if ($did == 7) {
set %Contplay Off
set %Playing $Remove($did(CaiMP3,2).seltext,.mp3)
set %length $gmt($round($calc($mp3(%playing).length / 1000),0),nn:ss)
splay $read(mp3.txt, w, * $+ $did(CaiMP3,2).seltext $+ *)
did -ra CaiMP3 4 %playing
.timermp3 0 0 Remaining
msg $active $Cai 12,1[-11MP3 Playing:12 %Playing 11|| Length:12 $gmt($round($calc($insong.length / 1000),0),nn:ss) $+ 12-]
}
if ($did == 8) {
set %ContPlay on
set %Start 1
contplay
}
if ($did == 9) {
splay stop
set %ContPlay Off
msg $active $Cai 12,1[-11MP3 STOPPED12-]
}
if ($did == 10) {
if ($insong) && (!$insong.pause) {
splay pause
msg $active $Cai 12,1[-11MP3 PAUSED12-]
}
elseif ($insong) && ($Insong.Pause) {
splay Resume
msg $active $Cai 12,1[-11MP3 RESUMED12-]
}
}
if ($did == 11) {
set %dir $sdir="Mp3 Directory"
write -c mp3.txt
noop $findfile(%dir,*.mp3,0,write mp3.txt $1-)
var %num $findfile(%dir, *.mp3,0,did -a CaiMP3 2 $nopath($1-))
}
if ($did == 12) {
did -r CaiMP3 2
write -c mp3.txt
noop $findfile(%dir,*.mp3,0,write mp3.txt $1-)
var %num $findfile(%dir, *.mp3,0,did -a CaiMP3 2 $nopath($1-))
Echo $active $Cai 12,1[-11MP312-] [-11List Updates12-]
dialog -x CaiMP3 CaiMP3
dialog -dm CaiMP3 CaiMP3
}
if ($did == 13) {
skip
}
}
alias Skip {
if (%ContPlay == On) {
inc %Start
contplay
}
}
alias F2 { skip }
alias contplay {
if ($read(mp3.txt,%start) == $null) { set %start 1 }
splay $read(mp3.txt,%start)
set %Playing $remove($nopath($read(mp3.txt,%start))$1-,.mp3)
msg $active $Cai 12,1[-11Continuous Play:12 $remove($nopath($read(mp3.txt,%start))$1-,.mp3) 11|| Length:12 $asctime($round($calc(($insong.length - $insong.pos) / 1000),0),nn:ss) $+ -]
.timermp3 0 0 remaining
}
on *:DIALOG:CaiMP3:init:0: {
inc %MP3LOADS
msg $Active $Cai 12,1[-11 $+ $me Has loaded CaiMP3 For the %MP3Loads $+ $ending time.12-]
/did -r CaiMP3 2
set %count 0
while (%count <= $lines(mp3.txt)) {
inc %count
/did -a CaiMP3 2 $remove($nopath($read(mp3.txt,%count))$1-,.mp3)
}
}
alias ending {
if ($right(%MP3Loads,1) == 1) && ($right(%MP3Loads,1) != 11) { return st }
if ($right(%MP3Loads,1) == 2) && ($right(%MP3Loads,1) != 12) { return nd }
if ($right(%MP3Loads,1) == 3) && ($right(%MP3Loads,1) != 13) { return rd }
else { return th }
}
alias remaining {
if ($dialog(CaiMP3)) {
did -ra CaiMP3 4 %playing
did -ra CaiMP3 6 $asctime($round($calc(($insong.length - $insong.pos) / 1000),0),nn:ss),none)
}
}
alias Info {
msg $Active $Cai 12,1[-11CaiMP3 Currently has12 $lines(mp3.txt) 11Songs12-]
msg $active $Cai 12,1[-11CaiMP3 Created by Rayth12-]
}
alias cai {
return $left $+ $newcolor(CàiI®C) $+ $right
}