alias mp3 {
dialog -mdnie mp3 mp3
}
alias info {
if ($mp3(%mp3).length == 0) { set %mp3.length 0 }
else { set %mp3.length $duration($calc($mp3(%mp3).length / 1001.02564102564096)) }
if ($mp3(%mp3).bitrate == $null) { set %mp3.bitrate n/a }
else { set %mp3.bitrate $mp3(%mp3).bitrate }
if ($mp3(%mp3).sample == $null) { set %mp3.sample n/a }
else { set %mp3.sample $calc($mp3(%mp3).sample / 1000) }
if (Stereo isin $mp3(%mp3).mode) { set %mp3.mode Stereo }
else { set %mp3.mode Mono }
if ($file(%mp3).size == 0) { set %mp3.size 0 }
else { set %mp3.size $round($calc($file(%mp3).size / 1048576),2) }
if ($mp3(%mp3).info == $null) { return $remove($nopath(%mp3),.mp3) }
else { return $mp3(%mp3).info }
}
dialog mp3 {
title “Mp³ Player”
size 75 125 283 115
option dbu
list 2, 2 7 162 93, sort size vsbar
edit “”, 4, 167 103 115 10, read multi autohs center
button “Play”, 5, 184 10 22 10, flat
button “Stop”, 6, 184 32 22 10, flat
button “Pause”, 7, 168 21 22 10, flat
button “Close”, 100, 198 73 22 10, flat ok
button “Mp³ Folder”, 9, 169 73 29 10, flat
radio “On”, 10, 227 28 25 12
box “”, 666, 0 2 166 100
box “Controls”, 667, 166 2 58 42
radio “Off”, 12, 251 28 23 12
box “Public Play”, 3, 224 20 57 21
text “”, 11, 228 9 29 11, center
box “Mp³’s”, 1, 224 2 36 17
box “Skin Color”, 13, 224 44 57 20
scroll “”, 25, 170 52 50 8, range 20 horizontal
box “Volume”, 24, 166 44 56 20
combo 28, 231 52 44 41, size drop
scroll “”, 8, 1 103 165 8, range 100 horizontal
box “Options”, 16, 167 65 55 20
button “Resume”, 17, 200 21 22 10, flat
}
on *:dialog:mp3:init:*:{
set %list.total $findfile(%mp3dir,*.mp*,0)
did -a mp3 11 %list.total
did -r mp3 2 | var %mp3.total = $findfile(%mp3dir,*.mp3,0, did -a mp3 2 $nopath($1-)) { did -a mp3 2 $nopath($findfile(%mp3dir,*.mp3,%x)) | inc %x }
did -a mp3 4 $remove($nopath(%mp3),.mp3)
if ($group(#mp3) == on) { did -c mp3 10 }
did -c $dname %mp3.action
did -i mp3 28 1 White
did -i mp3 28 2 Black
did -i mp3 28 3 Blue
did -i mp3 28 4 Green
did -i mp3 28 5 Light Red
did -i mp3 28 6 Brown
did -i mp3 28 7 Purple
did -i mp3 28 8 Orange
did -i mp3 28 9 Yellow
did -i mp3 28 10 Light Green
did -i mp3 28 11 Cyan
did -i mp3 28 12 Light Cyan
did -i mp3 28 13 Light Blue
did -i mp3 28 14 Pink
did -i mp3 28 15 Grey
did -i mp3 28 16 Light Grey
did -c mp3 28 $calc(%mp3.c +1)
did -c mp3 25 %mp3.vol
}
on *:dialog:mp3:*:28:{
set %mp3.c $chr(3) $+ $calc($did(mp3,28).sel -1)
}
on *:dialog:mp3:sclick:5:{
if (%mp3.action == 10) { splay -p $shortfn(%mp3) | info | amsg $mp3skin }
if (%mp3.action == 12) { splay -p $shortfn(%mp3) | info | echo $active $mp3skin }
set %mp3.time 5
scroll2
}
on *:dialog:mp3:sclick:*:{
if ($did == 2) { .set %mp3 %mp3dir $+ $did(mp3,2,$did(mp3,2).sel).text | did -ra mp3 4 $remove($nopath(%mp3),.mp3) }
if ($did isnum 10-12) { set %mp3.action $did }
if ($did == 7) { .splay -p pause }
if ($did == 17) { .splay -p resume }
if ($did == 6) { .splay -p stop }
if ($did == 9) { .set %mp3dir $sdir=”Select Mp³ List” | did -r mp3 2 | var %x = 1 | while ($findfile(%mp3dir,*.mp3,%x)) { did -a mp3 2 $nopath($findfile(%mp3dir,*.mp3,%x)) | inc %x } }
if ($did == 100) { .splay -p stop }
}
on *:dialog:mp3:scroll:25:{
if ($did == 25) {
if ($did(25).sel == 20) { vol -p 65535) | set %mp3.vols 4||||||||||||||||||| }
elseif ($did(25).sel == 19) { vol -p 57000) | set %mp3.vols 8|| 7|||| 4||||||||||||| }
elseif ($did(25).sel == 18) { vol -p 54000) | set %mp3.vols 8||| 7||| 4||||||||||||| }
elseif ($did(25).sel == 17) { vol -p 51000) | set %mp3.vols 9| 8||| 7||| 4|||||||||||| }
elseif ($did(25).sel == 16) { vol -p 48000) | set %mp3.vols 9|| 8|||| 7||| 4|||||||||| }
elseif ($did(25).sel == 15) { vol -p 45000) | set %mp3.vols 9||| 8|||| 7|||| 4||||||||| }
elseif ($did(25).sel == 14) { vol -p 42000) | set %mp3.vols 9||| 8|||| 7|||| 4||| 0|||||| }
elseif ($did(25).sel == 13) { vol -p 39000) | set %mp3.vols 9||| 8|||| 7|||| 4|| 0||||||| }
elseif ($did(25).sel == 12) { vol -p 36000) | set %mp3.vols 9||| 8|||| 7|||| 4| 0|||||||| }
elseif ($did(25).sel == 11) { vol -p 33000) | set %mp3.vols 9||| 8|||| 7|||| 4| 0|||||||| }
elseif ($did(25).sel == 10) { vol -p 30000) | set %mp3.vols 9||| 8|||| 7|||| 0||||||||| }
elseif ($did(25).sel == 9) { vol -p 27000) | set %mp3.vols 9||| 8|||| 7|| 0||||||||||| }
elseif ($did(25).sel == { vol -p 24000) | set %mp3.vols 9||| 8|||| 7| 0|||||||||||| }
elseif ($did(25).sel == 7) { vol -p 21000) | set %mp3.vols 9||| 8|||| 0||||||||||||| }
elseif ($did(25).sel == 6) { vol -p 18000) | set %mp3.vols 9||| 8||| 0|||||||||||||| }
elseif ($did(25).sel == 5) { vol -p 15000) | set %mp3.vols 9||| 8|| 0||||||||||||||| }
elseif ($did(25).sel == 4) { vol -p 12000) | set %mp3.vols 9||| 8| 0|||||||||||||||| }
elseif ($did(25).sel == 3) { vol -p 9000) | set %mp3.vols 9||| 0||||||||||||||||| }
elseif ($did(25).sel == 2) { vol -p 6000) | set %mp3.vols 9|| 0|||||||||||||||||| }
elseif ($did(25).sel == 1) { vol -p 3000) | set %mp3.vols 9| 0||||||||||||||||||| }
elseif ($did(25).sel == 0) { vol -p 0) | set %mp3.vols 0|||||||||||||||||||| }
set %mp3.vol $did(25).sel
}
}
on *:dialog:mp3:scroll:8:{
if ($inmp3 == $true) {
var %perc = $round($calc($did(mp3,8).sel / 22000 * $inmp3.length),0)
.splay seek $calc((%perc + $did(mp3,8).sel) * 200)
.timer 1 2 scroll2
}
}
alias scroll2 {
.timerscroll -m 0 1 scroll
}
alias -l scroll {
if ($dialog(mp3) != $null) && ($inmp3 == $true) {
did -c mp3 8 $round($calc($calc($insong.pos / $insong.length) * 100),0)
}
elseif ($dialog(mp3) != $null) && ($inmp3 == $true) {
.timerscroll off
}
if ($inmp3 != $true) {
.timerscroll off
if ($dialog(mp3) != $null) {
}
}
}
menu channel {
Mp³ Player:mp3
}
alias logo { return - 4M - 1I - 4L - 1A - 4N - }
alias mp3skin { return $logo $+ $chr(3) $+ %mp3.c $+ - 4M - 1U - 4S - 1I - 4C - $remove($nopath(%mp3),.mp3) $+ $+ $char(3) $+ %mp3.c $+ )( $+ $chr(3) $+ %mp3.c $+ 15Selama 14: 15 %mp3.length $+ $+ $chr(3) $+ %mp3.c $+ )( $+ $chr(3) $+ %mp3.c $+ 15Performance 14: 15 $+ %mp3.bitrate $+ $chr(3) $+ %mp3.c $+ . $+ $chr(3) $+ Kbs $char(3) $+ %mp3.c $+ $+ 15 %mp3.sample $+ $chr(3) $+ %mp3.c $+ . $+ $chr(3) $+ Khz $+ $char(3) $+ %mp3.c $+ )( $+ $chr(3) $+ %mp3.c $+ 15Size 14: 15 %mp3.size $+ Mb $+ $chr(3) $+ %mp3.c $+ )( $+ $chr(3) $+ %mp3.c $+ 15Sound 14: 15 %mp3.mode $+ $+ $chr(3) $+ %mp3.c $+ ) }
dialog -mdnie mp3 mp3
}
alias info {
if ($mp3(%mp3).length == 0) { set %mp3.length 0 }
else { set %mp3.length $duration($calc($mp3(%mp3).length / 1001.02564102564096)) }
if ($mp3(%mp3).bitrate == $null) { set %mp3.bitrate n/a }
else { set %mp3.bitrate $mp3(%mp3).bitrate }
if ($mp3(%mp3).sample == $null) { set %mp3.sample n/a }
else { set %mp3.sample $calc($mp3(%mp3).sample / 1000) }
if (Stereo isin $mp3(%mp3).mode) { set %mp3.mode Stereo }
else { set %mp3.mode Mono }
if ($file(%mp3).size == 0) { set %mp3.size 0 }
else { set %mp3.size $round($calc($file(%mp3).size / 1048576),2) }
if ($mp3(%mp3).info == $null) { return $remove($nopath(%mp3),.mp3) }
else { return $mp3(%mp3).info }
}
dialog mp3 {
title “Mp³ Player”
size 75 125 283 115
option dbu
list 2, 2 7 162 93, sort size vsbar
edit “”, 4, 167 103 115 10, read multi autohs center
button “Play”, 5, 184 10 22 10, flat
button “Stop”, 6, 184 32 22 10, flat
button “Pause”, 7, 168 21 22 10, flat
button “Close”, 100, 198 73 22 10, flat ok
button “Mp³ Folder”, 9, 169 73 29 10, flat
radio “On”, 10, 227 28 25 12
box “”, 666, 0 2 166 100
box “Controls”, 667, 166 2 58 42
radio “Off”, 12, 251 28 23 12
box “Public Play”, 3, 224 20 57 21
text “”, 11, 228 9 29 11, center
box “Mp³’s”, 1, 224 2 36 17
box “Skin Color”, 13, 224 44 57 20
scroll “”, 25, 170 52 50 8, range 20 horizontal
box “Volume”, 24, 166 44 56 20
combo 28, 231 52 44 41, size drop
scroll “”, 8, 1 103 165 8, range 100 horizontal
box “Options”, 16, 167 65 55 20
button “Resume”, 17, 200 21 22 10, flat
}
on *:dialog:mp3:init:*:{
set %list.total $findfile(%mp3dir,*.mp*,0)
did -a mp3 11 %list.total
did -r mp3 2 | var %mp3.total = $findfile(%mp3dir,*.mp3,0, did -a mp3 2 $nopath($1-)) { did -a mp3 2 $nopath($findfile(%mp3dir,*.mp3,%x)) | inc %x }
did -a mp3 4 $remove($nopath(%mp3),.mp3)
if ($group(#mp3) == on) { did -c mp3 10 }
did -c $dname %mp3.action
did -i mp3 28 1 White
did -i mp3 28 2 Black
did -i mp3 28 3 Blue
did -i mp3 28 4 Green
did -i mp3 28 5 Light Red
did -i mp3 28 6 Brown
did -i mp3 28 7 Purple
did -i mp3 28 8 Orange
did -i mp3 28 9 Yellow
did -i mp3 28 10 Light Green
did -i mp3 28 11 Cyan
did -i mp3 28 12 Light Cyan
did -i mp3 28 13 Light Blue
did -i mp3 28 14 Pink
did -i mp3 28 15 Grey
did -i mp3 28 16 Light Grey
did -c mp3 28 $calc(%mp3.c +1)
did -c mp3 25 %mp3.vol
}
on *:dialog:mp3:*:28:{
set %mp3.c $chr(3) $+ $calc($did(mp3,28).sel -1)
}
on *:dialog:mp3:sclick:5:{
if (%mp3.action == 10) { splay -p $shortfn(%mp3) | info | amsg $mp3skin }
if (%mp3.action == 12) { splay -p $shortfn(%mp3) | info | echo $active $mp3skin }
set %mp3.time 5
scroll2
}
on *:dialog:mp3:sclick:*:{
if ($did == 2) { .set %mp3 %mp3dir $+ $did(mp3,2,$did(mp3,2).sel).text | did -ra mp3 4 $remove($nopath(%mp3),.mp3) }
if ($did isnum 10-12) { set %mp3.action $did }
if ($did == 7) { .splay -p pause }
if ($did == 17) { .splay -p resume }
if ($did == 6) { .splay -p stop }
if ($did == 9) { .set %mp3dir $sdir=”Select Mp³ List” | did -r mp3 2 | var %x = 1 | while ($findfile(%mp3dir,*.mp3,%x)) { did -a mp3 2 $nopath($findfile(%mp3dir,*.mp3,%x)) | inc %x } }
if ($did == 100) { .splay -p stop }
}
on *:dialog:mp3:scroll:25:{
if ($did == 25) {
if ($did(25).sel == 20) { vol -p 65535) | set %mp3.vols 4||||||||||||||||||| }
elseif ($did(25).sel == 19) { vol -p 57000) | set %mp3.vols 8|| 7|||| 4||||||||||||| }
elseif ($did(25).sel == 18) { vol -p 54000) | set %mp3.vols 8||| 7||| 4||||||||||||| }
elseif ($did(25).sel == 17) { vol -p 51000) | set %mp3.vols 9| 8||| 7||| 4|||||||||||| }
elseif ($did(25).sel == 16) { vol -p 48000) | set %mp3.vols 9|| 8|||| 7||| 4|||||||||| }
elseif ($did(25).sel == 15) { vol -p 45000) | set %mp3.vols 9||| 8|||| 7|||| 4||||||||| }
elseif ($did(25).sel == 14) { vol -p 42000) | set %mp3.vols 9||| 8|||| 7|||| 4||| 0|||||| }
elseif ($did(25).sel == 13) { vol -p 39000) | set %mp3.vols 9||| 8|||| 7|||| 4|| 0||||||| }
elseif ($did(25).sel == 12) { vol -p 36000) | set %mp3.vols 9||| 8|||| 7|||| 4| 0|||||||| }
elseif ($did(25).sel == 11) { vol -p 33000) | set %mp3.vols 9||| 8|||| 7|||| 4| 0|||||||| }
elseif ($did(25).sel == 10) { vol -p 30000) | set %mp3.vols 9||| 8|||| 7|||| 0||||||||| }
elseif ($did(25).sel == 9) { vol -p 27000) | set %mp3.vols 9||| 8|||| 7|| 0||||||||||| }
elseif ($did(25).sel == { vol -p 24000) | set %mp3.vols 9||| 8|||| 7| 0|||||||||||| }
elseif ($did(25).sel == 7) { vol -p 21000) | set %mp3.vols 9||| 8|||| 0||||||||||||| }
elseif ($did(25).sel == 6) { vol -p 18000) | set %mp3.vols 9||| 8||| 0|||||||||||||| }
elseif ($did(25).sel == 5) { vol -p 15000) | set %mp3.vols 9||| 8|| 0||||||||||||||| }
elseif ($did(25).sel == 4) { vol -p 12000) | set %mp3.vols 9||| 8| 0|||||||||||||||| }
elseif ($did(25).sel == 3) { vol -p 9000) | set %mp3.vols 9||| 0||||||||||||||||| }
elseif ($did(25).sel == 2) { vol -p 6000) | set %mp3.vols 9|| 0|||||||||||||||||| }
elseif ($did(25).sel == 1) { vol -p 3000) | set %mp3.vols 9| 0||||||||||||||||||| }
elseif ($did(25).sel == 0) { vol -p 0) | set %mp3.vols 0|||||||||||||||||||| }
set %mp3.vol $did(25).sel
}
}
on *:dialog:mp3:scroll:8:{
if ($inmp3 == $true) {
var %perc = $round($calc($did(mp3,8).sel / 22000 * $inmp3.length),0)
.splay seek $calc((%perc + $did(mp3,8).sel) * 200)
.timer 1 2 scroll2
}
}
alias scroll2 {
.timerscroll -m 0 1 scroll
}
alias -l scroll {
if ($dialog(mp3) != $null) && ($inmp3 == $true) {
did -c mp3 8 $round($calc($calc($insong.pos / $insong.length) * 100),0)
}
elseif ($dialog(mp3) != $null) && ($inmp3 == $true) {
.timerscroll off
}
if ($inmp3 != $true) {
.timerscroll off
if ($dialog(mp3) != $null) {
}
}
}
menu channel {
Mp³ Player:mp3
}
alias logo { return - 4M - 1I - 4L - 1A - 4N - }
alias mp3skin { return $logo $+ $chr(3) $+ %mp3.c $+ - 4M - 1U - 4S - 1I - 4C - $remove($nopath(%mp3),.mp3) $+ $+ $char(3) $+ %mp3.c $+ )( $+ $chr(3) $+ %mp3.c $+ 15Selama 14: 15 %mp3.length $+ $+ $chr(3) $+ %mp3.c $+ )( $+ $chr(3) $+ %mp3.c $+ 15Performance 14: 15 $+ %mp3.bitrate $+ $chr(3) $+ %mp3.c $+ . $+ $chr(3) $+ Kbs $char(3) $+ %mp3.c $+ $+ 15 %mp3.sample $+ $chr(3) $+ %mp3.c $+ . $+ $chr(3) $+ Khz $+ $char(3) $+ %mp3.c $+ )( $+ $chr(3) $+ %mp3.c $+ 15Size 14: 15 %mp3.size $+ Mb $+ $chr(3) $+ %mp3.c $+ )( $+ $chr(3) $+ %mp3.c $+ 15Sound 14: 15 %mp3.mode $+ $+ $chr(3) $+ %mp3.c $+ ) }
Tidak ada komentar:
Posting Komentar