Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;dcx alias
- alias -l dcx {
- if ($isid) returnex $dll($mircdir $+ MP3\DLL\dcx.dll,$1,$2-)
- else dll " $+ $mircdir $+ MP3\DLL\dcx.dll $+ " $1 $2-
- }
- ;xdid alias
- alias -l xdid {
- if ( $isid ) returnex $dcx( _xdid, $1 $2 $prop $3- )
- dcx xdid $2 $3 $1 $4-
- }
- ;xdialog alias
- alias -l xdialog {
- if ( $isid ) returnex $dcx( _xdialog, $1 $prop $2- )
- dcx xdialog $2 $1 $3-
- }
- #fkeys on
- alias FF1 { dialog $iif($dialog(mp3),-v,-md) mp3 mp3 }
- alias FF2 { if ($insong) { if ($insong.pause) splay resume | else splay pause } }
- alias FF3 { $mp3broadcast }
- #fkeys end
- ;on load events
- on *:load: {
- set %dialog mp3
- echo -a
- echo -a
- /mkdir Color
- set %fontsize 12
- set %dbg 0,0,0
- set %bgbg 0,0,0
- set %bgtxt 255,255,255
- set %mqtxt 255,255,255
- set %mqbg 127,127,127
- set %bxtxt 255,255,255
- set %bdr 255,255,255
- set %scrollc 255,0,0
- /alias F10 FF1
- /alias F11 FF2
- /alias F12 FF3
- }
- ;mdx alias
- alias -l mdx {
- return MP3\DLL\mdx.dll
- }
- ;menu
- menu * {
- .MP3 Player: { dialog $iif($dialog(mp3),-v,-md) mp3 mp3 }
- }
- ;alias to open dialog
- alias mp3 { dialog $iif($dialog(mp3),-v,-md) mp3 mp3 }
- ;mp3 player dialog
- dialog mp3 {
- title "MP3 Player"
- size -1 -1 387 380
- option pixels
- list 1, 5 5 185 290, hsbar vsbar size
- button "9", 5, 203 101 50 20, flat
- button ";", 6, 233 126 50 20, flat
- button "4", 7, 296 126 50 20, flat
- button ":", 8, 326 101 50 20, flat
- button "Add Directory", 9, 203 215 80 25, flat
- button "<", 22, 263 101 50 20, flat
- button "Remove All", 26, 290 215 80 25, flat
- button "Add File", 27, 203 246 80 25, flat
- button "Remove File", 28, 290 246 80 25, flat
- edit "", 3, 5 305 185 20, read
- edit "", 34, 5 330 185 20, read
- button "Hide", 19, 203 327 170 20, flat
- button "MP3 Information", 18, 203 305 170 20, flat
- button "Broadcast now!", 23, 203 283 170 20, flat
- check "", 43, 351 171 20 17
- edit "", 45, 5 355 225 20
- button "Search", 57, 235 355 65 20, group
- button "Search + Play", 58, 305 355 75 20, group
- menu "File", 15
- item "Play Options", 16, 15
- item "Broadcasting", 17, 15
- item "break", 30, 15
- item "Exit", 21, 15
- menu "View", 52
- item "Filepath", 53, 52
- item "break", 59, 52
- item "Colors", 60, 52
- item "Font", 61, 52
- menu "Tools", 30
- menu "Function Keys", 54, 30
- item "On", 46, 54
- item "Off", 47, 54
- item "Status", 48, 54
- item "break", 55, 54
- item "Editor", 56, 54
- menu "Export to Text", 33, 30
- item "Write to MP3 List", 36, 33
- item "View MP3 List", 35, 33
- item "break", 51, 30
- item "ID3 Tag Editor", 44, 30
- menu "Help", 24
- item "Topics", 31, 24
- item "break", 32, 24
- item "About", 25, 24
- }
- ;mp3 help
- on *:dialog:mp3:menu:31: {
- dialog $iif($dialog(faq),-v,-md) faq faq
- }
- ;enable function keys
- on *:dialog:mp3:menu:46: {
- enable #fkeys
- echo -a
- }
- ;disable function keys
- on *:dialog:mp3:menu:47: {
- disable #fkeys
- echo -a
- }
- ;view status
- on *:dialog:mp3:menu:48: {
- if ($group(#fkeys) == on) {
- echo -a
- }
- elseif ($group(#fkeys) == off) {
- echo -a
- }
- }
- ;open id3 tag editor
- on *:dialog:mp3:menu:44: {
- dialog $iif($dialog(id3),-v,-md) id3 id3
- }
- ;open mp3 info dialog
- on *:dialog:mp3:sclick:18: {
- dialog $iif($dialog(mp3.info),-v,-md) mp3.info mp3.info
- }
- ;mp3 info dialog
- dialog mp3.info {
- title "MP3 Information"
- size -1 -1 360 219
- option pixels
- edit "", 1, 0 0 360 20, read
- edit "", 2, 0 20 360 20, read
- edit "", 3, 0 40 360 20, read
- edit "", 4, 0 60 360 20, read
- button "Close", 6, 0 200 360 18, flat
- edit "", 5, 0 80 360 20, read
- edit "", 8, 0 100 360 20, read
- edit "", 9, 0 140 360 20, read
- edit "", 10, 0 120 360 20, read
- edit "", 7, 1 160 360 20, read
- edit "", 11, 1 180 360 20, read
- }
- ;mp3 info initialization
- on *:dialog:mp3.info:init:0: {
- dll $mdx SetMircVersion $version
- dll $mdx MarkDialog $dname
- dll $mdx SetColor $dname 1,2,3,4,5,8,9,10,7,11 background $rgb( [ %bgbg ] )
- dll $mdx SetColor $dname 1,2,3,4,5,8,9,10,7,11 textbg $rgb( [ %bgbg ] )
- dll $mdx SetColor $dname 1,2,3,4,5,8,9,10,7,11 text $rgb( [ %bgtxt ] )
- dll $mdx SetFont $dname 1,2,3,4,5,8,9,10,7,11 - $+ %fontsize 400 %font
- var %title2 = $iif($sound($read(playlist.txt,%songnum)).title,$v1,$regsubex($gettok($nopath($insong.fname),-1,45),/(\.mp3)$/,))
- var %artist2 = $iif($sound($read(playlist.txt,$did(1).sel)).artist,$v1,$gettok($nopath($insong.fname),-2,45))
- var %len2 = $remove($duration($calc($insong.length /1000),3),00:)
- var %bit2 = $sound($read(playlist.txt,%songnum)).bitrate
- var %genre2 = $iif($sound($insong.fname).genre, $sound($insong.fname).genre, Unknown genre)
- var %album2 = $iif($sound($insong.fname).album, $sound($insong.fname).album, Unknown album)
- var %size2 = $bytes($file($insong.fname).size).suf
- var %year2 = $iif($sound($insong.fname).year, $sound($insong.fname).year, Unknown year)
- var %comment2 = $iif($sound($insong.fname).comment, $sound($insong.fname).comment, No comment)
- did -a $dname 1 Title: %title2
- did -a $dname 2 Artist: %artist2
- did -a $dname 3 Length: %len2
- did -a $dname 4 Played: $readini(playcount.ini,plays,$replace($insong.fname,$chr(32),_))) time(s)
- did -a $dname 5 Album: %album2
- did -a $dname 8 Genre: %genre2
- did -a $dname 9 Year: %year2
- did -a $dname 10 Comment: %comment2
- did -a $dname 7 Size: %size2
- did -a $dname 11 Bitrate: %bit2 $+ kbps
- }
- ;mp3 info close
- on *:dialog:mp3.info:sclick:6: { dialog -x $dname }
- ;broadcast now button
- on *:dialog:mp3:sclick:23: { $mp3broadcast }
- ;open font dialog
- on *:dialog:mp3:menu:61: {
- dialog $iif($dialog(font),-v,-md) font font
- }
- ;font dialog
- dialog font {
- title "Set Font"
- size -1 -1 250 64
- option pixels
- edit "", 1, 125 15 115 20
- combo 2, 10 15 100 70, drop
- box "Size", 3, 5 0 110 40
- box "Font", 4, 120 0 125 40
- button "Apply", 5, 180 42 65 20
- }
- ;font init
- on *:dialog:font:init:0: {
- did -a $dname 2 10
- did -a $dname 2 11
- did -a $dname 2 12
- did -a $dname 2 13
- did -a $dname 2 14
- if (%fontsize == 10) { did -c $dname 2 1 }
- if (%fontsize == 11) { did -c $dname 2 2 }
- if (%fontsize == 12) { did -c $dname 2 3 }
- if (%fontsize == 13) { did -c $dname 2 4 }
- if (%fontsize == 14) { did -c $dname 2 5 }
- did -a $dname 1 %font
- }
- ;font sclick events
- on *:dialog:font:sclick:5: {
- set %fontsize $did(2).seltext
- set %font $did(1).text
- dialog -x $dname
- dialog -x mp3
- dialog -md mp3 mp3
- }
- alias cb_scroll {
- var %dname = $1, %devent = $2, %did = $3
- if (%devent == tracking) {
- if (%did == 13) {
- if (!$insong) halt
- if (!%mp3tseek) {
- .timerpos.update -p
- set %mp3tseek $true
- }
- .timermp3tseek -m 1 500 splay seek $int($calc(($xdid(mp3,13).value /10000) * $insong.length)) $chr(124) unset %mp3tseek $chr(124) .timerpos.update -r
- }
- if (%did == 12) {
- vol -v $xdid(mp3,12).value
- xdid -t mp3 14 Volume: $round($calc($vol(master) / 65535 * 100),0) $+ %
- }
- }
- }
- ;mp3 dialog initialisation
- on *:dialog:mp3:init:0: {
- dcx Mark $dname cb_scroll
- xdialog -g $dname +b $rgb( [ %dbg ] )
- xdialog -c $dname 12 scroll 203 172 124 17 horizontal bottom
- xdialog -c $dname 13 scroll 203 61 170 17 horizontal bottom
- xdialog -c $dname 10 box 193 1 190 41 rounded transparent
- xdialog -c $dname 11 box 193 46 190 38 rounded transparent
- xdialog -c $dname 4 box 193 87 191 65 rounded transparent
- xdialog -c $dname 29 box 193 201 190 78 rounded transparent
- xdialog -c $dname 14 box 193 154 141 43 rounded transparent
- xdialog -c $dname 38 box 339 154 44 43 rounded transparent
- xdid -f $dname 10 +a default 9 %font
- xdid -f $dname 29 +a default 9 %font
- xdid -f $dname 4 +a default 9 %font
- xdid -f $dname 14 +a default 9 %font
- xdid -f $dname 11 +a default 9 %font
- xdid -f $dname 38 +a default 8 %font
- xdid -t $dname 38 Mute
- xdid -t $dname 14 Volume: $round($calc($vol(master) / 65535 * 100),0) $+ %
- xdid -t $dname 10 Now Playing
- xdid -t $dname 29 MP3 Files
- xdid -t $dname 4 Controls
- xdid -t $dname 11 Position: $iif($int($calc(($insong.pos /1000)/60)) > 10,$int($calc(($insong.pos /1000)/60)), 0 $+ $int($calc(($insong.pos /1000)/60)) ) $+ : $+ $iif($round($calc(($insong.pos /1000) - $int($calc(($insong.pos /1000)/60))*60),0) > 10, $round($calc(($insong.pos /1000) - $int($calc(($insong.pos /1000)/60))*60),0), 0 $+ $round($calc(($insong.pos /1000) - $int($calc(($insong.pos /1000)/60))*60),0)) $+ / $+ $remove($duration($calc($insong.length /1000),3),00:)
- xdid -C $dname 10 +t $rgb( [ %bxtxt ] )
- xdid -C $dname 29 +t $rgb( [ %bxtxt ] )
- xdid -C $dname 4 +t $rgb( [ %bxtxt ] )
- xdid -C $dname 14 +t $rgb( [ %bxtxt ] )
- xdid -C $dname 11 +t $rgb( [ %bxtxt ] )
- xdid -C $dname 38 +t $rgb( [ %bxtxt ] )
- xdid -C $dname 10 +r $rgb( [ %bdr ] )
- xdid -C $dname 29 +r $rgb( [ %bdr ] )
- xdid -C $dname 4 +r $rgb( [ %bdr ] )
- xdid -C $dname 14 +r $rgb( [ %bdr ] )
- xdid -C $dname 11 +r $rgb( [ %bdr ] )
- xdid -C $dname 38 +r $rgb( [ %bdr ] )
- xdid -C $dname 13 +b $rgb( [ %scrollc ] )
- xdid -C $dname 12 +b $rgb( [ %scrollc ] )
- xdid -C $dname 13 +g $rgb(0,0,0)
- xdid -C $dname 13 +G $rgb(255,255,255)
- xdid -r $dname 12 0 65535
- xdid -r $dname 13 0 100
- dll $mdx SetMircVersion $version
- dll $mdx MarkDialog $dname
- dll $mdx DynamicControl create $dname 2 edit 203 16 170 20 read autohs
- dll $mdx SetColor $dname 23,18,19,57,58 background $rgb( [ %dbg ] )
- dll $mdx SetFont $dname 5,6,7,8,22 -14 400 Webdings
- dll $mdx SetFont $dname 18,57,58,19,20,23,26,27,28,9,3,34,45 -11 400 %font
- dll $mdx SetFont $dname 2 -11 400 %font
- dll $mdx SetFont $dname 1 - $+ %fontsize 400 %font
- dll $mdx SetColor $dname 1 background $rgb( [ %bgbg ] )
- dll $mdx SetColor $dname 1 textbg $rgb( [ %bgbg ] )
- dll $mdx SetColor $dname 2 textbg $rgb( [ %mqbg ] )
- dll $mdx SetColor $dname 2 background $rgb( [ %dbg ] )
- dll $mdx SetColor $dname 1 text $rgb( [ %bgtxt ] )
- dll $mdx SetColor $dname 2 text $rgb( [ %mqtxt ] )
- dll $mdx SetColor $dname 5,6,7,8,9,22,26,27,28,20,19,18,23,57,58 background $rgb( [ %dbg ] )
- dll $mdx SetColor $dname 45,3,34,43 background $rgb( [ %dbg ] )
- dll $mdx SetColor $dname 45,3,34 textbg $rgb( [ %dbg ] )
- dll $mdx SetColor $dname 3,45,34 text $rgb( [ %bgtxt ] )
- dll $mdx SetBorderStyle $dname 5,6,7,8,9,22,26,27,28,20,19,18,23,57,58
- var %a = 1, %b = playlist.txt
- while ( %a <= $lines(%b) ) {
- did -a $dname 1 $left($nopath($read(%b,%a)),-4)
- inc %a
- }
- if (!$sound($insong.fname)) {
- did -a $dname 2 Nothing is playing.
- did -b $dname 6,22,18
- xdid -t mp3 11 Position: 00:00/00:00
- }
- if ($sound($insong.fname)) {
- did -b $dname 44
- did -e $dname 53
- }
- if ($vol($insong.fname).mute) {
- did -c $dname 43
- }
- if (!$did(1).lines) {
- did -b $dname 36
- }
- did -b $dname 57,58
- did -a $dname 34 Played: $readini(playcount.ini,plays,$replace($insong.fname,$chr(32),_)))
- did -z $dname 1
- did -a $dname 3 Total MP3's: $did(1).lines
- did -c $dname 12 $vol(master)
- if ($readini(playcount.ini,plays,$replace($read(playlist.txt,%songnum),$chr(32),_))) did -o $dname 34 1 Played: $v1
- if ($insong) {
- did -c $dname 1 %songnum
- did -o $dname 2 1 $left($nopath($insong.fname),-4)
- did -z $dname 13 0 10000
- did -c $dname 13 $calc(($insong.pos / $insong.length)*10000)
- .timerpos.update -r
- if (%mp3.sm != none && $width($left($nopath($insong.fname),-4),Arial,10) > 150) .timerscrolltitle 0 1 scrolltitle
- .timerpos.txt 1 1 calcnewpos
- }
- }
- ;calcnewpos alias
- alias -l calcnewpos {
- var %x $int($calc(($insong.pos /1000)/60))
- var %y $round($calc(($insong.pos /1000) - %x *60),0)
- var %a $iif(%x > 10,%x,0 $+ %x)
- var %b $iif(%y > 10,%y,0 $+ %y)
- if ($dialog(mp3)) xdid -t mp3 11 $+(Position: %a,:,%b,/,$iif($insong.fname, $remove($duration($calc($insong.length /1000),3),00:), 00:00))
- .timer 1 1 calcnewpos
- }
- ;help dialog
- dialog faq {
- title "Help"
- size -1 -1 165 115
- option pixels
- list 1, 5 27 155 65, vsbar size
- button "Close", 2, 95 92 65 20
- text "Double click a topic.", 3, 7 8 150 17
- }
- ;faq initialization
- on *:dialog:faq:init:0: {
- did -a $dname 1 MP3 Player
- did -a $dname 1 Play Options
- did -a $dname 1 Broadcasting
- did -a $dname 1 Color Changer
- did -a $dname 1 Font
- did -a $dname 1 Function Keys Editor
- did -a $dname 1 ID3 Tag Editor
- }
- ;faq close
- on *:dialog:faq:sclick:2: {
- dialog -x $dname
- }
- ;double click events
- on *:dialog:faq:dclick:1: {
- if ($did(1).sel == 1) {
- run MP3\Help\MP3.html
- }
- if ($did(1).sel == 2) {
- run MP3\Help\Options.html
- }
- if ($did(1).sel == 3) {
- run MP3\Help\Broadcasting.html
- }
- if ($did(1).sel == 4) {
- run MP3\HTML\Color.html
- }
- if ($did(1).sel == 5) {
- run MP3\Help\Font.html
- }
- if ($did(1).sel == 6) {
- run MP3\Help\Function Keys.html
- }
- if ($did(1).sel == 7) {
- run MP3\Help\ID3 Tag Editor.html
- }
- }
- ;dialog close
- on *:dialog:mp3:close:0: {
- .timerpos.update -p
- .timerscrolltitle off
- .timerpos.txt off
- set %dialog mp3
- }
- ;dialog buttons
- ;click in list
- on *:dialog:mp3:dclick:1: {
- set %songnum $did(1).sel
- mp3play $read(playlist.txt,%songnum)
- did -e $dname 6,22,18,53
- did -b $dname 44
- .timerpos.txt 1 1 calcnewpos
- }
- ;total played
- on *:dialog:mp3:sclick:1: {
- did -ra $dname 34 Played: $iif($readini(playcount.ini,plays,$replace($read(playlist.txt,$did(1).sel),$chr(32),_)),$v1,0)
- }
- ;search function
- on *:dialog:mp3:sclick:57: {
- var %did45 = $did(45).text
- $iif($didwm(mp3,1,* $+ %did45 $+ *), did -c $dname 1 $didwm(mp3,1,* $+ %did45 $+ *), did -ra $dname 45 No results found.)
- if ($did(45).text === No results found.) {
- halt
- }
- else {
- did -r $dname 45
- did -b $dname 57,58
- }
- }
- ;search + play function
- on *:dialog:mp3:sclick:58: {
- var %did45 = $did(45).text
- $iif($didwm(mp3,1,* $+ %did45 $+ *), did -c $dname 1 $didwm(mp3,1,* $+ %did45 $+ *), did -ra $dname 45 No results found.)
- if ($did(45).text === No results found.) {
- halt
- }
- else {
- set %songnum $did(1).sel
- mp3play $read(playlist.txt,%songnum)
- did -r $dname 45
- did -e $dname 6,22,18,53
- did -b $dname 44,57,58
- .timerpos.txt 1 1 calcnewpos
- }
- }
- ;mute
- on *:dialog:mp3:sclick:43: {
- $iif($did(43).state == 1,vol -pu1,vol -pu2)
- }
- ;back button
- on *:dialog:mp3:sclick:5: {
- if (%rplay) {
- did -c $dname 1 $rand(1,$did($dname,1).lines)
- .timerpos.txt 1 1 calcnewpos
- }
- elseif ($did($dname,1).sel == 1) {
- halt
- }
- did -c $dname 1 $calc($v1 - 1)
- set %songnum $did($dname,1).sel
- mp3play $read(playlist.txt,%songnum)
- did -e $dname 6,22,18,53
- did -b $dname 44
- .timerpos.txt 1 1 calcnewpos
- }
- ;stop button
- on *:dialog:mp3:sclick:22: {
- $mp3stop
- }
- ;forward button
- on *:dialog:mp3:sclick:8: {
- if (%rplay) {
- did -c $dname 1 $rand(1,$did($dname,1).lines)
- set %songnum $did($dname,1).sel
- mp3play $read(playlist.txt,%songnum)
- did -e $dname 6,22,18,53
- did -b $dname 44
- .timerpos.txt 1 1 calcnewpos
- }
- else {
- did -c $dname 1 $calc($did($dname,1).sel + 1)
- set %songnum $did($dname,1).sel
- mp3play $read(playlist.txt,%songnum)
- did -e $dname 6,22,18,53
- did -b $dname 44
- .timerpos.txt 1 1 calcnewpos
- }
- }
- ;pause button
- on *:dialog:mp3:sclick:6: {
- if ($insong) {
- set %pauseb on
- if (!$insong.pause) {
- splay pause
- .timerpos.txt -p
- }
- else {
- splay resume
- set %pauseb off
- .timerpos.txt -r
- }
- }
- }
- ;play button
- on *:dialog:mp3:sclick:7: {
- if ($insong.pause) {
- splay resume
- }
- else {
- set %songnum $did(1).sel
- mp3play $read(playlist.txt,%songnum)
- .timerpos.txt 1 1 calcnewpos
- }
- did -e $dname 6,22,18,53
- did -b $dname 44
- }
- ;directory button
- on *:dialog:mp3:sclick:9: {
- $mp3choosedir
- }
- ;remove all button
- on *:dialog:mp3:sclick:26: {
- $mp3remall
- }
- ;add file button
- on *:dialog:mp3:sclick:27: {
- $mp3addfile
- }
- ;delete file button
- on *:dialog:mp3:sclick:28: {
- $mp3remfile
- }
- ;close button
- on *:dialog:mp3:sclick:19: {
- .timerpos.update -p
- .timerscrolltitle off
- set %dialog mp3
- dialog -x $dname
- }
- ;menu item exit
- on *:dialog:mp3:menu:21: {
- .timerpos.update -p
- set %dialog mp3
- dialog -x $dname
- }
- ;mp3end
- on *:MP3END: {
- .timerscrolltitle off
- unset %mp3.scroll*
- if (%cplay) {
- if (%songnum < $lines(playlist.txt)) {
- inc %songnum
- mp3play $read(playlist.txt,%songnum)
- halt
- }
- if ($dialog(mp3)) {
- did -c mp3 1 %songnum
- }
- unset %songnum
- unset %cplay
- }
- elseif (%rplay) {
- if ($lines(playlist.txt) !> 1) {
- unset %rplay
- goto off
- }
- :picksong
- var %song = $read(playlist.txt)
- if ($readn == %songnum) {
- goto picksong
- }
- set %songnum $readn
- if ($dialog(mp3)) {
- did -c mp3 1 $readn
- }
- mp3play %song
- halt
- }
- elseif (%repeat) {
- mp3play $read(playlist.txt,%songnum)
- halt
- }
- if ($dialog(mp3)) {
- did -z mp3 13 0 0
- did -r mp3 2
- if ($did(mp3,1).sel == %songnum) {
- did -ra mp3 34 $calc($did(mp3,34)+1)
- }
- }
- :off
- timerpos off
- unset %songnum
- }
- ;enable buttons on edit
- on *:dialog:mp3:edit:*: {
- if ($did == 45) {
- if ($did(45).text) {
- did -e $dname 57,58
- }
- elseif (!$did(45).text) {
- did -b $dname 57,58
- }
- }
- }
- ;aliases
- ;directory alias
- alias -l mp3choosedir {
- if ($sdir(.,Choose mp3 directory)) {
- did -r mp3 1
- write -c playlist.txt
- var %x = 1, %d = $v1
- while ($findfile(%d,*.mp3,%x)) {
- write playlist.txt $v1
- did -a mp3 1 $left($nopath($v1),-4)
- inc %x
- }
- did -ra mp3 3 Total MP3's: $calc(%x - 1)
- }
- did -z mp3 1
- }
- ;add file alias
- alias -l mp3addfile {
- if ($sfile(*.mp3,Choose an mp3 file to add)) {
- write playlist.txt $v1
- did -a mp3 1 $left($nopath($v1),-4)
- did -ra mp3 3 Total MP3's: $did(mp3,1).lines
- }
- }
- ;remove file alias
- alias -l mp3remfile {
- if (!$did(1).sel) {
- noop $input(You did not select a file to delete.,uwo,Error!)
- }
- if ($input(Are you sure you want to remove this file from your playlist?,yuw,Attention!) == $true) {
- if ($exists(playlist.txt) && $did(mp3,1).sel) {
- var %l = $did(mp3,1).lines, %s = $v1
- if (%l == 1) .remove playlist.txt
- else write -dl playlist.txt %s
- did -d $dname 1 %s
- if (%l) {
- if (%s <= %l) {
- did -c $dname 1 %s
- }
- else {
- did -c $dname 1 %l
- did -ra mp3 3 Total MP3's: %l
- }
- }
- else {
- halt
- }
- }
- }
- }
- ;remove all alias
- alias -l mp3remall {
- if ($input(Are you sure you want to remove all files from the list?,yuw,Attention!) == $true) {
- .remove playlist.txt
- did -r mp3 1
- did -ra mp3 3 0
- if ( $insong ) mp3stop
- did -ra mp3 3 Total MP3's: $did(1).lines
- did -b $dname 36
- else { halt }
- }
- }
- ;play alias
- alias -l mp3play {
- splay $$1-
- .timerscrolltitle off
- unset %mp3.scroll*
- writeini playcount.ini plays $replace($1-,$chr(32),_) $calc($readini(playcount.ini,plays,$replace($1-,$chr(32),_))+1)
- if ( %broadcasting ) mp3broadcast
- if ( $dialog(mp3) ) {
- did -c mp3 13 0
- did -o mp3 2 1 $left($nopath($1-),-4)
- did -z mp3 13 0 10000
- did -ra mp3 34 Played: $readini(playcount.ini,plays,$replace($1-,$chr(32),_))
- timerpos on
- if ( %mp3.sm != none && $width($left($nopath($1-),-4),Arial,10) > 120 ) .timerscrolltitle 0 1 scrolltitle
- }
- }
- ;stop alias
- alias -l mp3stop {
- if ( $insong ) {
- splay stop
- did -r mp3 2
- timerpos off
- did -z mp3 13 0 0
- unset %songnum
- .timerscrolltitle off
- unset %mp3.scroll*
- did -ra $dname 2 Nothing is playing.
- did -u $dname 1
- }
- did -b $dname 6,22,18,53
- did -e $dname 44
- }
- ;timerpos alias
- alias -l timerpos {
- if ( $1 == on ) .timerpos.update 0 1 did -c mp3 13 $!calc(( $!insong.pos / $!insong.length )*10000)
- elseif ( $1 == off ) .timerpos.update off
- }
- ;backlength alias
- alias -l backlength {
- if ($insong) { return $+(-,$gmt($calc($calc($insong.length / 1000) - $calc($insong.pos / 1000)),nn:ss))
- }
- }
- ;scroll title alias
- alias -l scrolltitle {
- var %t = $did(mp3,1,%songnum) $iif(!%mp3.sm, $chr(160) $chr(160) $chr(160) $chr(160) $chr(160) $chr(160) $chr(160) $did(mp3,1,%songnum)), %l = $calc($len($did(mp3,1,%songnum))+7)
- if ( %mp3.scroll == $null ) {
- set %mp3.scroll.dir inc
- set %mp3.scroll 0
- set %mp3.scroll.len $len(%t)
- did -o mp3 2 1 $mid(%t,1,%mp3.scroll.len)
- }
- elseif ( %mp3.sm == two && %mp3.scroll !> 1 ) {
- set %mp3.scroll.dir inc
- set %mp3.scroll 2
- did -o mp3 2 1 $mid(%t,2,%mp3.scroll.len)
- }
- else {
- if ( !%mp3.sm ) && (%mp3.scroll > %l) set %mp3.scroll 1
- if ( !%mp3.sm ) did -o mp3 2 1 $mid(%t,%mp3.scroll,%mp3.scroll.len)
- %mp3.scroll.dir %mp3.scroll 2
- if ( %mp3.sm == two ) {
- if ( $width($mid(%t,%mp3.scroll,%mp3.scroll.len),Arial,10) > 120 ) did -o mp3 2 1 $mid(%t,%mp3.scroll,%mp3.scroll.len)
- else {
- set %mp3.scroll.dir dec
- dec %mp3.scroll 2
- did -o mp3 2 1 $mid(%t,$iif(%mp3.scroll,$v1,1),%mp3.scroll.len)
- }
- }
- }
- }
- ;broadcasting alias
- alias -l mp3broadcast {
- if ( !%broadcastformat || !%broadcastchannels ) { echo -a 0,0/11,0/0,11/12,11/11,12/2,12/12,2/1,2/2,1/1,1/0,1 MP3 Player Broadcast options not set up correctly. | return }
- if ( !$insong ) { echo -a 0,0/11,0/0,11/12,11/11,12/2,12/12,2/1,2/2,1/1,1/0,1 MP3 Player Broadcast: Cannot broadcast while no song is playing. | return }
- var %title = $iif($sound($read(playlist.txt,%songnum)).title,$v1,$regsubex($gettok($nopath($insong.fname),-1,45),/(\.mp3)$/,))
- var %artist = $iif($sound($read(playlist.txt,%songnum)).artist,$v1,$gettok($nopath($insong.fname),-2,45))
- var %len = $remove($duration($calc($insong.length /1000),3),00:)
- var %rem = $remove($duration($calc(($insong.length -$insong.pos) /1000),3),00:)
- var %bit = $sound($read(playlist.txt,%songnum)).bitrate
- var %genre = $iif($sound($insong.fname).genre, $sound($insong.fname).genre, Unknown genre)
- var %album = $iif($sound($insong.fname).album, $sound($insong.fname).album, Unknown album)
- var %size = $bytes($file($insong.fname).size).suf
- var %mode = $mp3($insong.fname).mode
- var %frequency = $+($round($calc($mp3($insong.fname).sample / 1000),0)),kHz)
- var %pos = $iif($int($calc(($insong.pos /1000)/60)) > 10,$int($calc(($insong.pos /1000)/60)), 0 $+ $int($calc(($insong.pos /1000)/60)) ) $+ : $+ $iif($round($calc(($insong.pos /1000) - $int($calc(($insong.pos /1000)/60))*60),0) > 10, $round($calc(($insong.pos /1000) - $int($calc(($insong.pos /1000)/60))*60),0), 0 $+ $round($calc(($insong.pos /1000) - $int($calc(($insong.pos /1000)/60))*60),0))
- var %year = $iif($sound($insong.fname).year, $sound($insong.fname).year, Unknown year)
- var %comment = $iif($sound($insong.fname).comment, $sound($insong.fname).comment, No comment)
- var %long = $longfn($insong.fname)
- var %short = $shortfn($insong.fname)
- var %sample = $left($sound($insong.fname).sample,-3) kHz
- var %copyright = $iif($sound($insong.fname).copyright, Yes, No)
- var %msg = $replace(%broadcastformat,&title,%title,&year,%year,&mode,%mode,&genre,%genre,&artist,%artist,&len,%len,&album,%album,&comment,%comment,&sample,%sample,&size,%size,&rem,%rem,&pos,%pos,&long,%long,&short,%short,©right,%copyright,&frequency,%frequency,&bitrate,%bit,&playcount,$readini(playcount.ini,plays,$replace($insong.fname,$chr(32),_)))
- if (%broadcastchannels == all) $iif(%bc.msg == describe,ame,amsg) %msg
- if (%broadcastchannels == active) $iif(%bc.msg,%bc.msg,msg) $active %msg
- else {
- tokenize 44 %broadcastchannels
- var %i = 1
- while $(,$ $+ %i) {
- msg $v1 %msg
- inc %i
- }
- var %c = $addtok(%c,$iif(#* !iswm $v1,$chr(35) $+ $v2,$v2),44)
- inc %i
- }
- }
- ;options dialog
- on *:dialog:mp3:menu:16: {
- dialog $iif($dialog(mp3.options),-v,-md) mp3.options mp3.options
- }
- dialog mp3.options {
- title "Configuration Options"
- size -1 -1 295 110
- option pixels
- box "Play options", 1, 5 0 290 35
- radio "Normal", 2, 15 15 60 17
- radio "Continuous", 3, 80 15 80 17
- radio "Random", 4, 160 15 60 17
- button "Close", 5, 5 80 285 25
- box "Scrolling Method", 10, 5 40 285 35
- radio "None", 11, 15 55 60 17
- radio "Two-way", 12, 80 55 80 17
- radio "Forwards only", 13, 160 55 85 17
- radio "Repeat", 6, 225 15 66 17
- }
- ;options initialization
- on *:dialog:mp3.options:init:0: {
- if (%cplay) {
- did -c $dname 3
- .timer 1 0 did -u $dname 2
- }
- elseif (%repeat) {
- did -c $dname 6
- }
- elseif (%rplay) {
- did -c $dname 4
- }
- else {
- did -c $dname 2
- }
- if (!%mp3.sm) {
- did -c $dname 13
- }
- elseif (%mp3.sm == two) {
- did -c $dname 12
- }
- else {
- did -c $dname 11
- }
- }
- ;options sclick events
- on *:dialog:mp3.options:sclick:*: {
- if ( $did == 2 ) {
- unset %rplay
- unset %repeat
- unset %cplay
- did -c $dname $iif(!%mp3.sm,13,$iif(%mp3.sm == two,12,11))
- }
- if ( $did == 3 ) {
- unset %rplay
- unset %repeat
- set %cplay on
- did -c $dname $iif(!%mp3.sm,13,$iif(%mp3.sm == two,12,11))
- }
- if ( $did == 6 ) {
- unset %rplay
- unset %cplay
- set %repeat 1
- did -c $dname $iif(!%mp3.sm,13,$iif(%mp3.sm == two,12,11))
- }
- if ( $did == 4 ) {
- unset %cplay
- unset %repeat
- set %rplay on
- did -c $dname $iif(!%mp3.sm,13,$iif(%mp3.sm == two,12,11))
- }
- if ( $did == 5 ) {
- dialog -x $dname
- }
- if ( $did == 11 ) {
- .timerscrolltitle off
- unset %mp3.scroll*
- set %mp3.sm none
- if ( $insong ) did -o mp3 2 1 $did(mp3,1,%songnum)
- did -c $dname $iif(%cplay,3,$iif(%rplay,4,$iif(%repeat,6,2)))
- }
- if ( $did == 12 ) {
- unset %mp3.scroll*
- set %mp3.sm two
- if ( $insong ) .timerscrolltitle 0 1 scrolltitle
- did -c $dname $iif(%cplay,3,$iif(%rplay,4,$iif(%repeat,6,2)))
- }
- if ( $did == 13 ) {
- unset %mp3.scroll*
- unset %mp3.sm
- if ( $insong ) .timerscrolltitle 0 1 scrolltitle
- did -c $dname $iif(%cplay,3,$iif(%rplay,4,$iif(%repeat,6,2)))
- }
- }
- ;open about dialog
- on *:dialog:mp3:menu:25: {
- dialog $iif($dialog(mp3.about),-v,-md) mp3.about mp3.about
- }
- ;about dialog
- dialog mp3.about {
- title "About"
- size -1 -1 220 165
- option pixels
- text "MP3 Player made by Neptune and Daveoh.", 1, 5 5 210 18
- text "You are free to use this MP3 Player script to help you build your own, but please don't take the script and just call it your own, as it isn't fair for the people who put hard work into making it.", 2, 5 65 210 70
- button "Close", 3, 5 140 210 20
- text "Neptune:", 4, 5 28 50 17
- link "irc.PurpleSurge.com", 5, 59 28 100 17
- text "Daveoh:", 6, 6 45 50 17
- link "irc.Quakenet.org", 7, 60 45 100 17
- }
- ;links
- on *:dialog:mp3.about:sclick:*: {
- if ($did == 3) {
- dialog -x $dname
- }
- if ($did == 5) {
- server -m irc.PurpleSurge.com
- }
- if ($did == 7) {
- server -m irc.Quakenet.org
- }
- }
- ;broadcasting dialog
- on *:dialog:mp3:menu:17: {
- dialog $iif($dialog(mp3.bc),-v,-md) mp3.bc mp3.bc
- }
- ;broadcasting dialog
- dialog mp3.bc {
- title "Broadcasting"
- size -1 -1 400 294
- option pixels
- box "Now Playing Message", 1, 5 5 390 145
- edit "", 2, 10 20 380 80, read autovs multi vsbar
- edit %broadcastformat, 3, 10 105 380 20, autohs
- box "Channels", 10, 7 150 390 70
- text "Enter the channels you would like to broadcast to, separated by a comma. For all channels, type 'all'. To display to active channel only, type 'active'.", 11, 12 165 380 40
- edit %broadcastchannels, 12, 12 195 380 20
- box "Automatic broadcasting status", 20, 7 225 166 40
- radio "Enabled", 21, 22 240 65 17, group
- radio "Disabled", 22, 92 240 65 17
- button "Broadcast now!", 23, 7 267 90 25
- button "Close", 40, 100 267 90 25
- radio "Message", 4, 192 240 65 15, group
- radio "Describe (/me)", 5, 262 240 100 15
- box "Method", 6, 177 225 190 40
- button "ASCII", 7, 10 126 75 20
- button "Preview", 8, 90 126 75 20
- text "Preview will not show dynamic tokens.", 9, 170 128 220 20
- }
- ;broadcasting initialization
- on *:dialog:mp3.bc:init:0:{
- if (!$did(3).text || !$did(12).text) {
- did -b $dname 23
- }
- if (!$did(3).text) {
- did -b $dname 8
- }
- var %cmd = did -a $dname 2 $crlf $chr(32)
- did -a $dname 2 This is the format your broadcasting will be displayed in. Available dynamic tokens are:
- %cmd &title - The title of the playing song
- %cmd &artist - The artist of the playing song
- %cmd &album - Album of the playing song
- %cmd &genre - Genre of the playing song
- %cmd &year - Year of the playing song
- %cmd &len - The length of the playing song
- %cmd &rem - The remaining length of song
- %cmd &playcount - No. of times the song has been played
- %cmd &pos - The position of the song
- %cmd &bitrate - The song's bitrate
- %cmd &mode - How the song is being played
- %cmd &frequency - Frequency of the song
- %cmd &sample - Returns the sample rate of the song
- %cmd &size - Size of the MP3 file
- %cmd &comment - Returns any comments on the song
- %cmd &long - Returns the long filepath of the song
- %cmd &short - Returns the short filepath of the song
- %cmd ©right - Returns Yes if song is copyrighted, otherwise returns No
- %cmd NOTE: &album and &genre will appear blank if it is not found
- if ( !%broadcasting ) did -c $dname 22
- else did -c $dname 21
- did -c $dname $iif(%bc.msg == describe,5,4)
- }
- ;broadcasting sclick events
- on *:dialog:mp3.bc:sclick:*: {
- if ($did == 8) {
- echo -a 0,0/11,0/0,11/12,11/11,12/2,12/12,2/1,2/2,1/1,1/0,1 Broadcast Preview: $+ $did(3).text
- }
- if ($did == 7) {
- dialog $iif($dialog(ASCII),-v,-md) ASCII ASCII
- }
- if ($did == 21) {
- set %broadcasting 1
- }
- elseif ($did == 22) {
- unset %broadcasting
- }
- elseif ($did == 23) {
- $mp3broadcast
- }
- elseif ($did == 4) {
- set %bc.msg msg
- }
- elseif ($did == 5) {
- set %bc.msg describe
- }
- elseif ($did == 40) {
- dialog -x $dname
- }
- }
- ;broadcasting edit events
- on *:dialog:mp3.bc:edit:*: {
- if ($did == 3) {
- set %broadcastformat $did(mp3.bc,3).text
- }
- if ($did == 12) {
- set %broadcastchannels $remove($did($v1).text,$chr(32))
- }
- if ($did(3).text) && ($did(12).text) {
- did -e $dname 23
- }
- else {
- did -b $dname 23
- }
- if ($did(3).text) {
- did -e $dname 8
- }
- else {
- did -b $dname 8
- }
- }
- ;Export
- on *:dialog:mp3:menu:36: {
- if ($input(Using this function will cause mIRC to freeze for about 15-30 seconds depending on how many MP3 files you have. If you click anything else during this time mIRC will crash. Do you wish to continue?,yuw,Attention!) == $true) {
- write -c mp3list.txt
- var %m = $lines(playlist.txt)
- while (%m) {
- var %l = $read(playlist.txt,%m)
- write mp3list.txt $iif($sound(%l).title,$v1,$regsubex($gettok($nopath(%l),-1,45),/(\.mp3)$/,)) - $&
- $iif($sound(%l).artist,$v1,$gettok($nopath(%l),-2,45)) - $&
- $remove($duration($calc($sound(%l).length /1000),3),00:)
- dec %m
- }
- echo -a 0,0/11,0/0,11/12,11/11,12/2,12/12,2/1,2/2,1/1,1/0,1 MP3 list updated!
- }
- }
- ;Open MP3List.txt
- on *:dialog:mp3:menu:35: {
- run mp3list.txt
- }
- ;ASCII dialog
- dialog ASCII {
- title "ASCII"
- size -1 -1 260 140
- option pixels
- list 1, 1 1 115 95, vsbar size
- button "Copy to Clipboard", 2, 2 97 115 20, flat
- button "Close", 3, 2 117 115 20, flat
- edit "", 4, 130 15 55 20
- button "Search", 5, 190 15 55 20
- box "Character Number", 7, 120 0 135 40
- edit "", 8, 130 55 55 20
- button "Search", 9, 190 55 55 20
- edit "", 10, 130 78 100 20, read
- box "Symbol Number", 11, 120 40 135 63
- edit "", 12, 120 105 135 33, read autovs multi
- }
- ;ascii mouse events
- on *:dialog:ascii:mouse:*: {
- if ($did == 1) {
- did -ra $dname 12 This is a list of $crlf $+ ASCII characters.
- }
- if ($did == 2) {
- did -ra $dname 12 Use this to copy what $crlf $+ you have selected.
- }
- if ($did == 3) {
- did -ra $dname 12 Use this to close the $crlf $+ dialog.
- }
- if ($did == 4) {
- did -ra $dname 12 Type in an ASCII $crlf $+ number here.
- }
- if ($did == 5) {
- did -ra $dname 12 Click this to search $crfl $+ for an ASCII character.
- }
- if ($did == 8) {
- did -ra $dname 12 Insert an ASCII symbol $ctrl $+ here.
- }
- if ($did == 9) {
- did -ra $dname 12 Use this to search $crfl $+ for an ASCII symbol.
- }
- if ($did == 10) {
- if (!$did(10).text) {
- did -ra $dname 12 Search for an ASCII symbol.
- }
- else {
- did -ra $dname 12 This is the ASCII symbol $crlf $+ you searched for.
- }
- }
- }
- ;ascii alias
- alias -l chars {
- did -a $dname 1 -----------------
- did -a $dname 1 NOT ALL ASCII
- did -a $dname 1 CHARACTERS
- did -a $dname 1 WORK IN mIRC,
- did -a $dname 1 SO EXPERIMENT!
- did -a $dname 1 -----------------
- var %x = 1, %y = 255
- while (%x <= %y) {
- did -a $dname 1 $chr(%x)
- inc %x
- }
- }
- ;ascii initialization
- on *:dialog:ascii:init:0: {
- did -b $dname 5,9
- $chars
- }
- ;ascii edit events
- on *:dialog:ascii:edit:*: {
- if ($did == 4) {
- if (!$did(4).text) {
- did -b $dname 5
- }
- else {
- did -e $dname 5
- }
- }
- if ($did == 8) {
- if (!$did(8).text) {
- did -b $dname 9
- }
- else {
- did -e $dname 9
- }
- }
- }
- ;ascii sclick events
- on *:dialog:ascii:sclick:*: {
- if ($did == 1) {
- if (!$did(1).sel) {
- did -b $dname 2
- }
- elseif ($did(1).sel) {
- did -e $dname 2
- }
- }
- if ($did == 3) {
- dialog -x $dname
- }
- if ($did == 2) {
- clipboard $did(1).seltext
- dialog -t ascii ASCII: Copied to clipboard
- .timercop 1 1 dialog -t ascii ASCII
- }
- if ($did == 5) {
- if ($did(4).text > 255) {
- noop
- $input(Please do not enter a number above 255.,uwo,Error!)
- }
- else {
- did -c $dname 1 $calc($did(4).text + 6)
- }
- }
- if ($did == 9) {
- did -ra $dname 10 $chr( $+ $did(8).text $+ )
- }
- }
- /*
- ID3 Tag Editor
- Author: PR|MuS
- Email: Shredplayer@email.com
- Script Environment: Remotes
- Comments: a mini ID3 editor for editing ID3 Tags
- */
- ;id3 dialog
- dialog ID3 {
- title "ID3 Tag Editor"
- size -1 -1 295 93
- option pixels
- edit "", 1, 3 2 200 20, read autohs
- button "Browse", 2, 208 2 85 20
- edit "", 3, 3 24 285 22, autohs
- combo 4, 123 47 110 120, size drop
- button "Update", 5, 3 70 150 20
- button "", 7, 0 0 0 0, hide ok
- combo 8, 3 47 120 180, size drop
- }
- ;dialog events
- on *:dialog:ID3:*:*:{
- if $devent == init {
- did -a $dname 1 No file selected.
- did -f $dname 2
- genre
- did -b $dname 8,5
- didtok -a $dname 4 32 Title Artist Album Year Comment Genre
- }
- if $devent == sclick {
- if $did == 2 {
- did -ra $dname 1 $file="Choose an .mp3" *.mp3
- if .mp3 !isin $did(1) { did -ra $dname 1 | did -b $dname 5 }
- else { did -e $dname 5 }
- }
- if $did == 4 {
- did -f $dname 3
- dialog -t $dname $+(ID3 Tag Editor:,$chr(32),$did(4).seltext)
- did -ra $dname 3 $mPR0P($did(1),$did(4).sel)
- if $did(4).sel == 6 { did -c $dname 8 $didwm(8,$did(3)) }
- }
- if $did == 5 && $did(4).sel {
- var %file = $shortfn($did(ID3,1))
- $EDIT(%file,$did(4).sel)
- }
- if $did(4).sel == 6 { did -e $dname 8 | did -m $dname 3 }
- else { did -b $dname 8 | did -n $dname 3 }
- if $did == 8 && $did(4).sel == 6 { did -ra $dname 3 $did(8).seltext }
- }
- }
- ;prop alias
- alias -l mPR0P {
- if $2 == 1 return $mp3($1).title
- elseif $2 == 2 return $mp3($1).artist
- elseif $2 == 3 return $mp3($1).album
- elseif $2 == 4 return $mp3($1).year
- elseif $2 == 5 return $mp3($1).comment
- elseif $2 == 6 return $mp3($1).genre
- }
- ;edit alias
- alias -l EDIT {
- bread $1 $B_CALC($1,128) 3 &tag
- if ($bvar(&tag,1-3).text != TAG) {
- bwrite $1 $B_CALC($1,128) 3 TAG
- bset &fill 125 0
- bwrite $1 $B_CALC($1,125) 124 &fill
- bunset &fill
- }
- if ($mp3($1).version == MPEG 1.0 Layer 3) {
- if ($did(ID3,3)) {
- bset &val $N_BYTE($2) $iif($2 == 6,$calc($did(ID3,8).sel - 1),$did(ID3,3))
- bwrite $1 $S_BYTE($1,$2) $N_BYTE($2) &val
- $iif($2 < 6,.bwrite $1 $S_BYTE($1,$2) $N_BYTE($2) $did(ID3,3))
- }
- else {
- bset &val 30 $asc($chr(32))
- bwrite $1 $S_BYTE($1,$2) $N_BYTE($2) &val
- }
- bunset &val
- dialog -t $dname $+(ID3 Tag Editor:,$chr(32),Updated!)
- }
- }
- ;B_CALC alias
- alias -l B_CALC {
- return $calc($file($1).size - $2)
- }
- ;N_BYTE alias
- alias -l N_BYTE {
- return $gettok(30 30 30 4 30 1,$1,32)
- }
- ;S_BYTE alias
- alias -l S_BYTE {
- return $calc($file($1).size - $gettok(125 95 65 35 31 1,$2,32))
- }
- ;genre alias
- alias -l genre {
- didtok ID3 8 44 Blues,Classic Rock,Country,Dance,Disco,Funk,Grunge,Hip-Hop,Jazz,Metal,New Age,Oldies,Other,Pop,R&B,Rap,Reggae,Rock,Techno,Industrial,Alternative,Ska,Death Metal,Pranks,SoundTrack,Euro-Techno,Ambient,Trip-Hop,Vocal,Jazz+Funk,Fusion,Trance,Classical,Instrumental,Acid,House,Game,Sound Clip,Gospel,Noise,Alternative Rock $&
- ,Bass,Soul,Punk,Space,Meditative,Instrumental Pop,Instrumental Rock,Ethnic,Gothic,Darkwave,Techno-Industrial,Electronic,Pop-Folk,Euro Dance,Dream,Southern Rock,Comedy,Cult,Gangsta Rap,Top 40,Christian Rap,Pop/Funk,Jungle,Native American,Cabaret,New Wave,Psychedelic,Rave,Showtunes,Trailer,Lo-Fi,Tribal,Acid Punk,Acid Jazz,Polka,Retro,Musical,Rock n' Roll
- didtok ID3 8 44 Hard Rock,Folk,Folk-Rock,National Folk,Swing,Fast Fusion,Bebop,Latin,Revival,Celtic,Bluegrass,Avantgarde,Gothic Rock,Progressive Rock,Psychedelic Rock,Symphonic Rock,Slow Rock,Big Band,Chorus,Easy Listening,Acoustic,Humour,Speech,Chanson,Opera,Chamber Music,Sonata,Symphony,Booty Bass,Primus,Porn Groove,Satire,Slow Jam,Club,Tango $&
- ,Samba,Folklore,Ballad,Power Ballad,Rhythmic Soul,Freestyle,Duet,Punk Rock,Drum Solo,Acapella,Euro-House,Dance Hall,
- }
- ;open filepath dialog
- on *:dialog:mp3:menu:53: {
- if (!$insong.fname) {
- noop $input(There is nothing playing.,uwo,Error!)
- }
- else {
- dialog $iif($dialog(filepath),-v,-md) filepath filepath
- }
- }
- ;filepath dialog
- dialog filepath {
- title "Filepath"
- size -1 -1 285 145
- option pixels
- edit "", 1, 7 15 270 20, read autohs
- box "Long Filepath", 2, 2 0 280 40
- edit "", 3, 7 55 270 20, read autohs
- box "Short Filepath", 4, 2 40 280 40
- button "Refresh", 5, 145 122 65 20
- button "Close", 6, 215 122 65 20
- edit "", 7, 8 95 270 20, read autohs
- box "File Name", 8, 3 80 280 40
- }
- ;filepath initialization
- on *:dialog:filepath:init:0: {
- did -a $dname 1 $longfn($insong.fname)
- did -a $dname 3 $shortfn($insong.fname)
- did -a $dname 7 $nopath($insong.fname)
- }
- ;filepath sclick events
- on *:dialog:filepath:sclick:*: {
- if ($did == 5) {
- if (!$insong.fname) {
- noop $input(There is no song playing.,uwo,Error!)
- }
- else {
- did -ra $dname 1 $longfn($insong.fname)
- did -ra $dname 3 $shortfn($insong.fname)
- }
- }
- if ($did == 6) {
- dialog -x $dname
- }
- }
- ;open function keys editor
- on *:dialog:mp3:menu:56: {
- dialog $iif($dialog(feditor),-v,-md) feditor feditor
- }
- ;function keys editor dialog
- dialog feditor {
- title "Function Keys Editor"
- size -1 -1 320 65
- option pixels
- combo 1, 10 15 90 55, drop
- box "Open MP3", 2, 5 0 100 40
- combo 3, 115 15 90 55, drop
- box "Pause / Resume", 4, 110 0 100 40
- combo 5, 220 15 90 55, drop
- box "Broadcast", 6, 215 0 100 40
- button "Apply", 7, 180 43 65 20
- button "Close", 8, 250 43 65 20
- }
- ;function keys editor initialization
- on *:dialog:feditor:init:0: {
- did -a $dname 1 F1
- did -a $dname 1 F2
- did -a $dname 1 F3
- did -a $dname 1 F4
- did -a $dname 1 F5
- did -a $dname 1 F6
- did -a $dname 1 F7
- did -a $dname 1 F8
- did -a $dname 1 F9
- did -a $dname 1 F10
- did -a $dname 1 F11
- did -a $dname 1 F12
- did -a $dname 3 F1
- did -a $dname 3 F2
- did -a $dname 3 F3
- did -a $dname 3 F4
- did -a $dname 3 F5
- did -a $dname 3 F6
- did -a $dname 3 F7
- did -a $dname 3 F8
- did -a $dname 3 F9
- did -a $dname 3 F10
- did -a $dname 3 F11
- did -a $dname 3 F12
- did -a $dname 5 F1
- did -a $dname 5 F2
- did -a $dname 5 F3
- did -a $dname 5 F4
- did -a $dname 5 F5
- did -a $dname 5 F6
- did -a $dname 5 F7
- did -a $dname 5 F8
- did -a $dname 5 F9
- did -a $dname 5 F10
- did -a $dname 5 F11
- did -a $dname 5 F12
- }
- ;function keys editor sclick events
- on *:dialog:feditor:sclick:*: {
- if ($did == 7) {
- /alias F1
- /alias F2
- /alias F3
- /alias F4
- /alias F5
- /alias F6
- /alias F7
- /alias F8
- /alias F9
- /alias F10
- /alias F11
- /alias F12
- set %f1 $did(1)
- /alias aliases.ini %f1 FF1
- set %f2 $did(3)
- /alias aliases.ini %f2 FF2
- set %f3 $did(5)
- /alias aliases.ini %f3 FF3
- dialog -t feditor Function Keys Editor: Updated
- }
- if ($did == 8) {
- dialog -x $dname
- }
- }
- ;open color changer
- on *:dialog:mp3:menu:60: {
- dialog $iif($dialog(color),-v,-md) color color
- }
- ;color dialog
- dialog color {
- title "Color Changer"
- size -1 -1 245 440
- option pixels
- scroll "", 1, 40 305 192 12, horizontal range 0 255 bottom
- text "Red", 2, 4 303 32 16
- text "Blue", 3, 4 337 32 16
- scroll "", 4, 40 339 192 12, horizontal range o 255 bottom
- scroll "", 6, 40 322 192 12, horizontal range 0 255 bottom
- text "Green", 7, 4 320 36 16
- button "Clipboard", 9, 174 410 62 20
- icon 10, 0 376 90 50
- box "RGB Info", 11, 95 370 144 38
- text "RGB ", 12, 102 386 50 16
- text "", 14, 164 386 66 16
- edit "", 5, 10 125 84 20, autohs
- box "MP3 BG", 8, 5 110 96 40
- edit "", 13, 10 170 84 20, autohs
- box "List BG", 15, 5 155 96 40
- edit "", 16, 114 170 86 20, autohs
- box "List Text", 17, 111 155 94 40
- edit "", 18, 10 210 84 20, autohs
- box "Marquee Text", 19, 5 195 96 40
- button "Apply", 20, 100 280 64 20
- list 21, 10 15 194 70, vsbar size
- button "Save Current", 22, 10 86 74 20
- button "Delete", 23, 90 86 64 20
- box "Presets", 24, 4 0 230 110
- button "Apply", 25, 160 86 64 20
- button "Share", 26, 170 280 64 20
- edit "", 27, 116 210 84 20, autohs
- box "Marquee BG", 28, 111 195 96 40
- edit "", 29, 12 250 84 20, autohs
- box "Box Text", 30, 5 235 96 40
- edit "", 31, 116 250 84 20, autohs
- box "Box Border", 32, 110 235 96 40
- edit "", 33, 115 125 84 20, autohs
- box "Scroll Color", 34, 110 110 96 40
- }
- ;color sclick events
- on *:dialog:color:sclick:*: {
- if ($did == 20) {
- if (!$did(5).text || !$did(13).text || !$did(16).text || !$did(18).text || !$did(27).text || !$did(29).text || !$did(31).text || !$did(33).text) {
- noop
- $input(Please fill in ALL boxes.,uwo,Error!)
- }
- else {
- set %dbg $did(5).text
- set %bgbg $did(13).text
- set %bgtxt $did(16).text
- set %mqtxt $did(18).text
- set %mqbg $did(27).text
- set %bxtxt $did(29).text
- set %bdr $did(31).text
- set %scrollc $did(33).text
- dialog -x $dname
- dialog -x mp3
- dialog -md mp3 mp3
- }
- }
- if ($did == 22) {
- var %co = $?="What would you like to name this color scheme?"
- write -c Color\ $+ %co $+ .txt $did(5).text
- write -a Color\ $+ %co $+ .txt $did(13).text
- write -a Color\ $+ %co $+ .txt $did(16).text
- write -a Color\ $+ %co $+ .txt $did(18).text
- write -a Color\ $+ %co $+ .txt $did(27).text
- write -a Color\ $+ %co $+ .txt $did(29).text
- write -a Color\ $+ %co $+ .txt $did(31).text
- write -a Color\ $+ %co $+ .txt $did(33).text
- did -a $dname 21 %co
- dialog $iif($dialog(color),-v,-md) color color
- }
- if ($did == 23) {
- remove Color\ $+ $did(21).seltext $+ .txt
- did -d $dname 21 $did(21).sel
- }
- if ($did == 25) {
- set %dbg $read(Color\ $+ $did(21).seltext $+ .txt, 1)
- set %bgbg $read(Color\ $+ $did(21).seltext $+ .txt, 2)
- set %bgtxt $read(Color\ $+ $did(21).seltext $+ .txt, 3)
- set %mqtxt $read(Color\ $+ $did(21).seltext $+ .txt, 4)
- set %mqbg $read(Color\ $+ $did(21).seltext $+ .txt, 5)
- set %bxtxt $read(Color\ $+ $did(21).seltext $+ .txt, 6)
- set %bdr $read(Color\ $+ $did(21).seltext $+ .txt, 7)
- set %scrollc $read(Color\ $+ $did(21).seltext $+ .txt, 8)
- dialog -x $dname
- dialog -x mp3
- dialog -md mp3 mp3
- }
- if ($did == 9) {
- clipboard $did(14).text
- }
- if ($did == 26) {
- msg $active MP3 BG: $did(5).text - List BG: $did(13).text - List Text: $did(16).text - Marquee Text: $did(18).text - Marquee BG: $did(27).text - Box Text: $did(29).text - Box Border: $did(31).text - Scroll Color: $did(33).text
- }
- }
- ;color initialization
- on *:dialog:color:init:0: {
- did -a $dname 5 %dbg
- did -a $dname 13 %bgbg
- did -a $dname 16 %bgtxt
- did -a $dname 18 %mqtxt
- did -a $dname 27 %mqbg
- did -a $dname 29 %bxtxt
- did -a $dname 31 %bdr
- did -a $dname 33 %scrollc
- noop $findfile(Color\,*.txt,0,did -a $dname 21 $left($nopath($1-),-4))
- did -g $dname 10 MP3\square.bmp
- did -a $dname 14 0,0,0
- }
- alias -l getrgb {
- window -phn +b @prev -1 -1 80 50
- drawfill -r @prev $rgb($1,$2,$3) 1 1 1
- drawsave @prev getrgb.bmp
- window -c @prev
- }
- on *:dialog:color:scroll:*: {
- var %z = $did($dname,1).sel $did($dname,6).sel $did($dname,4).sel
- getrgb %z
- did -g $dname 10 getrgb.bmp
- did -ra $dname 14 $+($did($dname,1).sel,$chr(44),$did($dname,6).sel,$chr(44),$did($dname,4).sel)
- }
- alias -l rgbview {
- if (!$dialog(color)) {
- dialog -md color color
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement