Kod: Kodu kopyalamak için üzerine çift tıklayın!
;MAMP 1.0 for mIRC 6.1* (tested on 6.15 and 6.16)
;By: Mpdreamz / Mpdz
;type /mamp to get started the rest should speak for itself :)
;read the .html included with this zip for more detailed explanation.
;any questions,comments,idea's can be send to
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
;or leave a comment on the website you found this on (mIRC.net,mircscripts.org)
;Ill read them with great anticipation.
alias mampsearch { dialog -m mampsearch mampsearch }
alias mdx { dll $+(",$scriptdirdlls\mdx.dll,") $1- }
alias mpop { dll $+(",$scriptdirdlls\MPopup.dll,") $1- }
alias mamp { /dialog -m mamp mamp }
alias mampticker {
set %m.len $width($gettok($gettok($did(mamp,1,$did(mamp,1).sel),1,9),6-,32),tahoma 12,0,1)
if (%m.len > 200) {
if (%mamp.x.pos == $+(-,$calc(%m.len - 200))) { set %mamp.direct inc }
if (%mamp.x.pos == 1 ) { set %mamp.direct dec }
%mamp.direct %mamp.x.pos
}
return %mamp.x.pos
}
alias writeplaylist {
if (!$1) {
set %playlistfile $+($sfile(%lastdir,Save as..),.mpd)
set %playlistfile $shortfn($+(",%playlistfile,"))
}
if ($1) { set %playlistfile $shortfn($+(",C:\,$1-,")) }
if (*.mpd iswm %playlistfile) {
var %wpl 2
write -c %playlistfile
while (%wpl <= $did(mamp,1).lines) {
write %playlistfile $did(mamp,1,%wpl)
inc %wpl
}
write %playlistfile %totaltime
}
}
alias vis {
clear -n @mamp
.drawtext -norc @mamp $rgb(0,0,0) tahoma 12 $mampticker 1 10000 20 $gettok($gettok($did(mamp,1,%mamp.fip.id),1,9),6-,32)
.drawline -nr @mamp $rgb(110,110,110) 1 203 53 93 53 76 70
.drawline -nr @mamp $rgb(110,110,110) 1 153 53 136 70
.drawline -nr @mamp $rgb(110,110,110) 1 197 53 197 70 75 70
.drawfill -nr @mamp $rgb(239,241,241) $rgb(110,110,110) 105 60
.drawfill -nr @mamp $rgb(149,151,151) $rgb(110,110,110) 193 60
.drawtext -nor @mamp $rgb(255,255,255) tahoma 9 149 57 $gettok($gettok($did(mamp,1,%mamp.fip.id),2,9),5,32)
.drawtext -nor @mamp $rgb(0,0,0) tahoma 9 91 57 $iif($duration(%timeS,3),$duration(%timeS,3),0)
.drawdot @mamp
}
alias fmod {
if ($isid) { return $dll($+(",$scriptdirdlls\fmod_mIRC.dll,"),$1,$2-) }
else { .echo -q fmod: $dll($+(",$scriptdirdlls\fmod_mIRC.dll,"),$1,$2-) }
}
alias timeMp3 {
set %tracker.length2 $round($calc(%tracker.length / 1000),0)
inc %timeS 1
did -i mamp 7 1 params %timeS * %tracker.length2 * * * * *
if (%timeS == %tracker.length2) {
.timerMP3 off
unset %timeS
.timernextfile 1 1 nextfile
}
}
alias nextfile2 { nextfile }
set %mamp.fip $gettok($did(mamp,1,%mamp.fip.id),2,4)
alias nextfile {
set %mamp.fip.id $iif($calc(%mamp.fip.id + 1) > $did(mamp,1).lines,2,$calc(%mamp.fip.id + 1))
did -c mamp 1 %mamp.fip.id
set %mamp.fip $gettok($did(mamp,1,$did(mamp,1).sel),2,4)
if ( 0* !iswm $fmod(SOUND_Stream_Open,1 $+(",%mamp.fip,") 1 $file(%mamp.fip).size 0)) {
.echo -q $fmod(SOUND_Stream_Open,1 $+(",%mamp.fip,") 1 $file(%mamp.fip)).size 0)
.echo -q $fmod(SOUND_Stream_Play,1 1)
set %tracker.length $fmod(SOUND_Stream_GetLengthMs,1)
set %mamp.x.pos 1
}
else {
did -i mamp 1 %mamp.fip.id $replace($did(mamp,1,%mamp.fip.id),+,+c)
set %mamp.fip.id $calc(%mamp.fip.id + 1)
did -d mamp 1 %mamp.fip.id
did -c mamp 1 %mamp.fip.id
set %tracker.length $fmod(SOUND_Stream_GetLengthMs,1)
set %mamp.x.pos 1
nextfile2
}
.timerMP3 0 1 timeMp3
.timervisdelay 1 1 .timervis -h 0 20 vis
}
alias stopfile {
.echo -q $fmod(SOUND_Stream_Stop,1)
.echo -q $fmod(SOUND_Stream_Close,1)
.timerMP3 off
unset %timeS
unset %tracker.length2
}
alias addtolist {
set %totaltime $calc(%totaltime + $sound($1-).length)
if (!$sound($1-).artist) && (!$sound($1-).title) { set %mamp.title $nopath($longfn($1-)) }
else { set %mamp.title $sound($1-).artist - $sound($1-).title }
did -a mamp 1 0 1 %mamp.title $chr(9) $+ $duration($calc($sound($1-).length / 1000),3) $chr(4) $+ $1-
did -o mamp 3 2 0 2 $+(Playlist:",$calc($did(mamp,1).lines - 1),") $chr(9) $+ $duration($calc(%totaltime / 1000),3)
}
alias mampboxes {
did -f mamp 6
did -f mamp 10
did -f mamp 4
did -f mamp 1
}
alias mpdll {
if ($isid) { return $dll($+(",$scriptdirdlls\MPopup.dll,"),$1,$2-) }
else { dll $+(",$scriptdirdlls\MPopup.dll,") $1 $2- }
}
alias mpcolors {
var %m = $mpdll(MPMenuColor, $1- > RGB_TEXT > $rgb(0,0,0)))
var %m = $mpdll(MPMenuColor, $1- > RGB_BACK > $rgb(249,248,247))
var %m = $mpdll(MPMenuColor, $1- > RGB_GRAY > $rgb(166,166,166))
var %m = $mpdll(MPMenuColor, $1- > RGB_HIGH > $rgb(182,189,210))
var %m = $mpdll(MPMenuColor, $1- > RGB_HBOX > $rgb(10,36,106))
var %m = $mpdll(MPMenuColor, $1- > RGB_BAND > $rgb(219,216,209))
var %m = $mpdll(MPMenuColor, $1- > RGB_CBOX > $rgb(10,36,106))
var %m = $mpdll(MPMenuColor, $1- > RGB_BBOX > $rgb(212,213,216))
var %m = $mpdll(MPMenuColor, $1- > RGB_CSEP > $rgb(166,166,166))
}
alias popup1 {
var %m = $mpdll(MPCreateMenu,popup1)
var %h = $gettok(%m,2,32)
mpcolors popup1
var %m = $mpdll(MPAddItem, %h > 1 0 0 $chr(32) Dcc Send to .. > mampdcc )
var %m = $mpdll(MPAddItem, %h > 2 0 0 $chr(32) Clear Playlist > clearplaylist )
var %m = $mpdll(MPAddSubMenu, %h > 3 0 0 $chr(32) Sort )
var %h2 = $gettok(%m,2,32)
var %m = $mpdll(MPAddItem, %h2 > 4 0 0 $chr(32) Alphabeticly > sorta )
var %m = $mpdll(MPAddItem, %h2 > 5 0 0 $chr(32) Duration > sortd )
var %h2 = $gettok(%m,2,32)
var %m = $mpdll(MPopup, popup1 > $mouse.dx $mouse.dy left top right)
}
alias mampdcc {
/dcc send $$input(To whom would you like to send this file ?,eok,Dcc send to..,Nickname here) $gettok($did(mamp,1,$did(mamp,1).sel),2,4)
}
alias clearplaylist {
stopfile
.timervis off
unset %totaltime
did -r mamp 1
}
;Sxsort, a fantastic snippet by sprion!
alias sxsort {
; $1 column header no. saved to $hget(sxsort,n)
var %v $1 $2,%s sxsort,%a hadd %s,%d hdel %s
if (!$hget(%s)) hmake %s 1
%d r
if ($hget(%s,d) = $1-) %a r 1
%a d $1-
%a n $3
filter -acior 2- $+ $did($1,$2).lines %v %v sortAlpha
if ($hget(%s,r)) %d d
}
; sort logic used by filter command above
alias -l sortAlpha {
;if column to sort is 1, contents starts from 6th token onwards,else 5th, which %z reflects
;%1 & %2 are text in each cell of column $hget(sxsort,n)
var %s sxsort,%a >,%b <,%h $hget(%s,n),%z $iif(%h = 1,6-,5-),%1 = $gettok($gettok($1,%h,9),%z,32),%2 = $gettok($gettok($2,%h,9),%z,32)
if ($hget(%s,r)) { %a = < | %b = > }
return $iif(%1 %a %2,1,$iif(%1 %b %2,-1,0))
}
;END sxsort
alias sorta { sxsort mamp 1 1 }
alias sortd { sxsort mamp 1 2 | sxsort mamp 1 2 }
;MAMP PLAYER
dialog mamp {
size -1 -1 221 342
title "...:::Mp3 Player:::..."
playlist
list 1,2 172 217 136,extsel size
playlisttoolbar
list 2,2 313 217 30, size
nowplaying
list 3,2 144 216 28,extsel size
button "",11,0 0 0 0
box "", 4, 1 136 219 175
list 5,2 114 217 30, size
box "", 6, 1 106 219 36
list 7,2 80 217 30,size
button "",8,2 2 200 73
box "", 10, 1 305 219 36
icon 13,202 57 16 16,$scriptdirgfx\volume.jpg,0
icon 14,202 48 16 5,$scriptdirgfx\14.jpg,0 noborder
icon 15,202 43 16 5,$scriptdirgfx\15.jpg,0 noborder
icon 16,202 38 16 5,$scriptdirgfx\16.jpg,0 noborder
icon 17,202 33 16 5,$scriptdirgfx\17.jpg,0 noborder
icon 18,202 28 16 5,$scriptdirgfx\18.jpg,0 noborder
icon 19,202 23 16 5,$scriptdirgfx\19.jpg,0 noborder
icon 20,202 18 16 5,$scriptdirgfx\20.jpg,0 noborder
icon 21,202 13 16 5,$scriptdirgfx\21.jpg,0 noborder
icon 22,202 8 16 5,$scriptdirgfx\22.jpg,0 noborder
icon 23,202 3 16 5,$scriptdirgfx\23.jpg,0 noborder
box "", 12, 201 -4 19 59
}
on *:dialog:mamp:init:*:{
mdx SetMircVersion $version
mdx MarkDialog $dname
mdx SetControlMDX $dname 1 ListView report noheader nosortheader single showsel > $scriptdir\dlls\views.mdx
mdx SetControlMDX $dname 2 Toolbar flat list wrap nodivider arrows > $scriptdir\dlls\bars.mdx
mdx SetControlMDX $dname 3 ListView report noheader nosortheader single noscroll > $scriptdir\dlls\views.mdx
mdx SetControlMDX $dname 1000 MouseInput
mdx SetControlMDX $dname 5 Toolbar flat list nodivider arrows > $scriptdir\dlls\bars.mdx
mdx SetControlMDX $dname 7 TrackBar autoticks > $scriptdir\dlls\bars.mdx
mdx SetControlMDX $dname 8 Window > $scriptdir\dlls\dialog.mdx
mdx SetBorderStyle $dname 2
mdx SetBorderStyle $dname 7
mdx SetBorderStyle $dname 5
mdx SetBorderStyle $dname 3
mdx SetBorderStyle $dname 1
mdx SetBorderStyle $dname 9
did -i $dname 1 1 page event
did -i $dname 1 1 getdrop 1
mdx SetFont 3 12 700 tahoma
mdx SetFont 1 12 400 tahoma
mdx SetColor mamp 2 background $rgb(239,241,241)
mdx SetColor mamp 5 background $rgb(239,241,241)
did -i $dname 1 1 iconsize normal small
did -i $dname 1 1 seticon normal 0, $+ $scriptdirgfx\mp3.ico
did -i $dname 1 1 seticon normal 0, $+ $scriptdirgfx\volume.ico
did -i $dname 1 1 headerdims 145 55
did -i $dname 1 1 headertext Column $chr(9) $+ +r Column 2
did -i $dname 2 1 bmpsize 16 16
did -i $dname 2 1 setimage icon small $scriptdirgfx\wave_file.ico
did -i $dname 2 1 setimage icon small $scriptdirgfx\folder_music.ico
did -i $dname 2 1 setimage icon small $scriptdirgfx\folder_favorites.ico
did -i $dname 2 1 setimage icon small $scriptdirgfx\text_file.ico
did -i $dname 2 1 setimage icon small $scriptdirgfx\search.ico
did -i $dname 2 1 setimage icon small $scriptdirgfx\recyclebin.ico
did -i $dname 2 1 setimage icon small $scriptdirgfx\up.ico
did -i $dname 2 1 setimage icon small $scriptdirgfx\down.ico
did -a $dname 2 +a 1 $chr(32) $+ $chr(9) $+ Open file
did -a $dname 2 +a 2 $chr(32) $+ $chr(9) $+ Open folder
did -a $dname 2 +a 3 $chr(32) $+ $chr(9) $+ Open playlist
did -a $dname 2 +a 4 $chr(32) $+ $chr(9) $+ Save playlist
did -a $dname 2 +a 5 $chr(32) $+ $chr(9) $+ Search playlist
did -a $dname 2 +a 6 $chr(32) $+ $chr(9) $+ delete selected file from playlist
did -a $dname 2 +a 7 $chr(32) $+ $chr(9) $+ up
did -a $dname 2 +a 8 $chr(32) $+ $chr(9) $+ down
did -i $dname 3 1 headerdims 105 90
did -i $dname 3 1 headertext Column $chr(9) $+ +r Column 2
did -i $dname 3 1 iconsize normal small
did -i $dname 3 1 seticon normal 0, $+ $scriptdirgfx\mp3.ico
did -i $dname 3 1 seticon normal 0, $+ $scriptdirgfx\music.ico
did -i $dname 3 2 0 $calc($did(mamp,1).lines - 1)
did -i $dname 5 1 bmpsize 16 16
did -i $dname 5 1 setimage icon small $scriptdirgfx\prev.ico
did -i $dname 5 1 setimage icon small $scriptdirgfx\play.ico
did -i $dname 5 1 setimage icon small $scriptdirgfx\pause.ico
did -i $dname 5 1 setimage icon small $scriptdirgfx\stop.ico
did -i $dname 5 1 setimage icon small $scriptdirgfx\next.ico
did -i $dname 5 1 setimage icon small $scriptdirgfx\volume.ico
did -i $dname 5 1 setimage icon small $scriptdirgfx\mute.ico
did -i $dname 5 1 setimage icon small $scriptdirgfx\unexpand.ico
did -i $dname 5 1 setimage icon small $scriptdirgfx\expand.ico
did -i $dname 5 1 setbkg color $rgb(255,255,255)
did -a $dname 5 +a 1 $chr(32) $+ $chr(9) $+
did -a $dname 5 +a 2 $chr(32) $+ $chr(9) $+
did -a $dname 5 +a 3 $chr(32) $+ $chr(9) $+
did -a $dname 5 +a 4 $chr(32) $+ $chr(9) $+
did -a $dname 5 +a 5 $chr(32) $+ $chr(9) $+
did -a $dname 5 -
did -a $dname 5 +a 8 $chr(32) $+ $chr(9) $+ Hide playlist
mdx SetDialog $dname icon 0 $scriptdirgfx\speaker.ico
window -apdoC @mamp 0 0 115 53
did -a $dname 8 grab $window(@mamp).hwnd @mamp
.echo -q $fmod(FMOD_Connect,$scriptdirdlls\fmod.dll)
.echo -q $fmod(SOUND_Init,44100 64 0)
.echo -q (plugin)load: $fmod(Plugin_Load,2 " $+ $scriptdirdlls\fmm_vis_oscilloscope.dll $+ ")
.echo -q (plugin)send: Oscilloscope Set_Dim: $fmod(Plugin_Send,2 Set_Dim 0 20 200 30)
.echo -q (plugin)send: Oscilloscope Set_Bgcolor: $fmod(Plugin_Send,2 Set_Bgcolor 255/255/255)
.echo -q (plugin)send: Oscilloscope on: $fmod(Plugin_Send,2 Oscilloscope 1 1 @mamp 25)
.echo -q (plugin)send: Oscilloscope Set_NumFades: $fmod(Plugin_Send,2 Set_NumFades 10)
.echo -q (plugin)send: Oscilloscope Set_NumColors: $fmod(Plugin_Send,2 Set_NumColors 2)
.echo -q (plugin)send: Oscilloscope Set_YSpace_Every: $fmod(Plugin_Send,2 Set_YSpace_Every 0)
.echo -q (plugin)send: Oscilloscope Set_YSpace_Height: $fmod(Plugin_Send,2 Set_YSpace_Height 0)
.echo -q (plugin)send: Oscilloscope Set_BounceRate: $fmod(Plugin_Send,2 Set_BounceRate 1.0)
.echo -q (plugin)send: Oscilloscope color shifting on: $fmod(Plugin_Send,2 Set_CShift 1 2 1)
if ($exists(C:\temp.mpd)) {
set %playlistfile C:\temp.mpd
if (*.mpd iswm %playlistfile) {
var %wpl = 1
did -r $dname 1
while (%wpl <= $lines(%playlistfile)) {
did -a $dname 1 0 $+ $read(%playlistfile,%wpl)
if (%wpl == $lines(%playlistfile)) { set %totaltime $read(%playlistfile,%wpl) | did -i $dname 3 2 0 2 $+(Playlist:",$calc($did(mamp,1).lines - 1),") $chr(9) $+ $duration($calc(%totaltime / 1000),3) }
inc %wpl
}
}
}
var %dids = 14,15,16,17,18,19,20,21,22,23
did -g $dname $gettok(%dids,5-,44) $+(",$scriptdirgfx\blank.jpg,")
vol -v 30000
set %mamp.hide 8
}
on *:dialog:mamp:close:*:{
writeplaylist temp.mpd
.echo -q (plugin)send: Oscilloscope off: $fmod(Plugin_Send,2 Oscilloscope 0)
.echo -q (plugin)send: Oscilloscope color shifting off: $fmod(Plugin_Send,2 Set_CShift 0)
.echo -q (plugin)unload: Oscilloscope: $fmod(Plugin_UnLoad,2)
stopfile
.timervis off
unset %totaltime
}
on *:dialog:mamp:sclick:7:{
.timerMP3 -p
if ( track isin $did(7,1)) { set %timeS $gettok($did(7,1),1,32) }
if ( $gettok($did(7,1),9,32) == end ) {
set %cool $gettok($did(7,1),1,32)
set %timeS $gettok($did(7,1),1,32)
set %timeS2 $round($calc($calc(%timetotal2 / 100) * %cool),0)
.echo -q $fmod(SOUND_Stream_SetTime,1,$calc(%timeS * 1000))
did -i mamp 7 1 params %timeS * %tracker.lenght2 * * * * *
.timerMP3 -r
}
}
on *:dialog:mamp:sclick:5: {
if ($did(5).sel == 2 ) {
if (%mamp.fip.id <= 2 ) { return }
else {
stopfile
set %mamp.fip.id $calc(%mamp.fip.id - 1)
set %mamp.fip $gettok($did(mamp,1,%mamp.fip.id),2,4)
did -c mamp 1 %mamp.fip.id
if ( 0* !iswm $fmod(SOUND_Stream_Open,1 $+(",%mamp.fip,") 1 $file(%mamp.fip).size 0)) {
.echo -q $fmod(SOUND_Stream_Open,1 $+(",%mamp.fip,") 1 $file(%mamp.fip).size 0)
.echo -q $fmod(SOUND_Stream_Play,1 1)
set %mamp.x.pos 1
set %tracker.length $fmod(SOUND_Stream_GetLengthMs,1)
.timerMP3 0 1 timeMp3
.timervisdelay 1 1 .timervis -h 0 20 vis
}
else {
did -i $dname 1 %mamp.fip.id $replace($did(1,%mamp.fip.id - 1)),+,+c)
did -d $dname 1 %mamp.fip.id
did -c mamp 1 %mamp.fip.id
}
}
}
if ($did(5).sel == 3 ) {
if ($did(1).sel > 1 ) {
stopfile
if ( 0* !iswm $fmod(SOUND_Stream_Open,1 $+(",%mamp.fip,") 1 $file(%mamp.fip).size 0)) {
.echo -q $fmod(SOUND_Stream_Open,1 $+(",%mamp.fip,") 1 $file(%mamp.fip)).size 0)
.echo -q $fmod(SOUND_Stream_Play,1 1)
set %tracker.length $fmod(SOUND_Stream_GetLengthMs,1)
set %mamp.x.pos 1
.timerMP3 0 1 timeMp3
.timervisdelay 1 1 .timervis -h 0 20 vis
}
}
else {
did -i $dname 1 $did(1).sel $replace($did(1,%mamp.fip.id),+,+c)
did -d $dname 1 $calc($did(1).sel + 1)
did -c mamp 1 $calc($did(mamp,1).sel + 1 )
}
}
if ($did(5).sel == 4 ) {
if (!%mnamp.paused) {
set %mnamp.paused 1
.echo -q $fmod(SOUND_SetPaused,-3,1)
did -o $dname 5 4 +pa 3 Paused $chr(32) $chr(9) $+ Paused
.timerMP3 -p
mampboxes
halt
}
if (%mnamp.paused) {
unset %mnamp.paused 1
.echo -q $fmod(SOUND_SetPaused,-3,0)
did -o $dname 5 4 +a 3 $chr(32) $chr(9) $+ Paused
.timerMP3 -r
mampboxes
}
}
if ($did(5).sel == 5 ) { stopfile }
if ($did(5).sel == 6 ) {
stopfile
nextfile
}
if (%mnamp.paused) && ($did != 4) {
unset %mnamp.paused 1
did -o $dname 5 4 +a 3 $chr(32) $chr(9) $+ Pause
.timerMP3 -r
}
if ($did(5).sel == 8 ) {
set %mamp.hide $iif(%mamp.hide == 8,9,8)
did -o $dname 5 8 %mamp.hide $chr(32) $+ $chr(9) $+ $iif(%mamp.hide == 8,Hide playlist,Show playlist)
did $iif(%mamp.hide == 9,-h,-v) mamp 1,2,3,4,10
mdx SetDialog mamp coords * * 221 $iif(%mamp.hide == 9,144,342)
;dialog -ps mamp mamp -1 -1 221 $iif(%mamp.hide == 9,120,34)
mampboxes
}
}
on *:dialog:mamp:sclick:1: {
if (rclick* iswm $did(1,1)) { popup1 }
}
on *:dialog:mamp:dclick:1: {
if ($did(1).sel > 1 ) {
stopfile
if ( 0* !iswm $fmod(SOUND_Stream_Open,1 $+(",$gettok($did(1,$did(1).sel),2,4),") 1 $file($gettok($did(mamp,1,$did(1,$did(1).sel)),2,4)).size 0)) {
set %mamp.fip $gettok($did(mamp,1,$did(mamp,1).sel),2,4)
set %mamp.fip.id $did(1).sel
.echo -q $fmod(SOUND_Stream_Open,1 $+(",%mamp.fip,") 1 $file(%mamp.fip)).size 0)
.echo -q $fmod(SOUND_Stream_Play,1 1)
set %tracker.length $fmod(SOUND_Stream_GetLengthMs,1)
set %mamp.x.pos 1
.timerMP3 0 1 timeMp3
.timervisdelay 1 1 .timervis -h 0 20 vis
}
else {
did -i $dname 1 $did(1).sel $replace($did(1,$did(1).sel),+,+c)
did -d $dname 1 $calc($did(1).sel + 1)
did -c mamp 1 $calc($did(mamp,1).sel + 1 )
}
}
}
alias readdvol {
did -g mamp $1 $+(",$scriptdirgfx\,$1,.jpg,")
}
on *:dialog:mamp:sclick:14,15,16,17,18,19,20,21,22,23: {
var %dids 14,15,16,17,18,19,20,21,22,23
did -g $dname $gettok(%dids,$+($findtok(%dids,$did,1,44),-),44) $+(",$scriptdirgfx\blank.jpg,")
tokenize 44 $gettok(%dids,$+(1-,$findtok(%dids,$did,1,44)),44)
readdvol $*
vol -v $calc(5955 * $findtok(%dids,$did,1,44))
mampboxes
}
on *:dialog:mamp:sclick:13: {
set %mamp.mute $iif(%mamp.mute,0,1)
did -g $dname 13 $iif(%mamp.mute,$+(",$scriptdirgfx\mute.jpg,"),$+(",$scriptdirgfx\volume.jpg,"))
if (%mamp.mute == 1) { set %mamp.vol $vol(master) | vol -v 0 }
if (%mamp.mute == 0) { vol -v %mamp.vol | unset %mamp.vol }
mampboxes
}
on *:dialog:mamp:sclick:2: {
if ($did(2).sel == 2 ) {
set %filepath $shortfn($sfile(%lastdir,select an mp3,OK!))
set %lastdir $nofile(%filepath)
if (!%filepath) { set %filepath C:\ }
if (!%lastdir) { set %lastdir C:\ }
if ($gettok(%filepath,$numtok(%filepath,46),46) == mp3) {
addtolist %filepath
}
}
if ($did(2).sel == 3 ) {
if (!%folder) { set %folder C:\ }
set %folder $sdir(%folder,Select a folder NOTE: folders with over 1000 Mp3s is going to take a while before getting added mnIRC might be busy for a while just leave it be )
if ($findfile(%folder,*.mp3,0) == 0 ) && (!%folder) { return }
else {
.echo -q $findfile(%folder,*.mp3,0,addtolist $1-).shortfn
}
}
if ($did(2).sel == 5 ) {
writeplaylist
}
if ($did(2).sel == 4 ) {
set %playlistfile $sfile(%lastdir,open playlist <.mpd>)
if (*.mpd iswm %playlistfile) {
var %wpl 2
did -r $dname 1
while (%wpl <= $lines(%playlistfile)) {
did -a $dname 1 0 $+ $read(%playlistfile,%wpl)
inc %wpl
}
if (%wpl == $did(1).lines) { did -o $dname 3 2 $+ $read(%playlistfile,%wpl) }
}
}
if ($did(2).sel == 6 ) { mampsearch }
if ($did(2).sel == 7 ) {
set %id $did(1).sel
set %deletedfile $gettok($did(mamp,1,$did(mamp,1).sel),2,4))
set %totaltime $calc(%totaltime - $sound(%deletedfile).length)
did -d $dname 1 $did(1).sel
did -o $dname 3 2 0 2 $+(Playlist:",$calc($did(mamp,1).lines - 1),") $chr(9) $+ $duration($calc(%totaltime / 1000),3)
did -c $dname 1 $did(1).sel
stopfile
nextfile
}
if ($did(2).sel == 8 ) {
if ($did(1).sel != 1) {
if ( $calc($did(1).sel - 1) <= 1 ) { return }
else {
set %id $did(1).sel
if (%id != %mamp.fip.id) {
did -i $dname 1 $calc(%id - 1) $did(1,%id)
did -d $dname 1 $calc(%id + 1)
}
else {
set %mamp.fip.id $calc(%mamp.fip.id - 1 )
did -i $dname 1 $calc(%id - 1) $did(1,%id )
did -d $dname 1 $calc(%id + 1)
}
}
}
}
if ($did(2).sel == 9 ) {
if ($did(1).sel != 1) {
if ( $calc($did(1).sel + 1) > $did(1).lines ) { return }
else {
set %id $did(1).sel
set %id $did(1).sel
if (%id != %mamp.fip.id) {
did -i $dname 1 $calc(%id + 2) $did(1,%id)
did -d $dname 1 %id
}
else {
set %mamp.fip.id $calc(%mamp.fip.id + 1 )
did -i $dname 1 $calc(%id + 2) $did(1,%id)
did -d $dname 1 %id
}
}
}
}
mampboxes
}
;MAMPSEARCH
dialog mampsearch {
title "Search for Mp3's in list"
size 1 1 217 225
option pixels
edit "", 6, 2 7 126 23
list 1, 130 7 85 23, size
list 2, 4 34 209 187, size
box "", 7, 3 27 212 193
}
on *:dialog:mampsearch:sclick:1: {
if ($did(1).sel == 2 ) && ($did(6).text) {
if ($didwm(mamp,1,$+(*,$did(6),*),2) == 0 ) {
did -r $dname 2
did -a $dname 2 0 1 No Files found matching
did -a $dname 2 0 1 $did(6)
}
else {
set %msearch = 2
did -r $dname 2
while ($didwm(mamp,1,$+(*,$did(6),*),%msearch) != 0 ) {
did -a $dname 2 0 1 $remove($did(mamp,1,$didwm(mamp,1,$+(*,$did(6),*),%msearch)),+ 1 0 0, +fs 1 0 0)
set %msearch $didwm(mamp,1,$+(*,$did(6),*),%msearch)
set %msearch $calc(%msearch + 1)
}
}
}
}
on *:dialog:mampsearch:dclick:2: {
set %mamp.fip.id $didwm(mamp,1,$+(*,$gettok($did(2,$did(2).sel),2,4),*),1)
set %mamp.fip $gettok($did(2,$did(2).sel),2,4)
stopfile
if ( 0* !iswm $fmod(SOUND_Stream_Open,1 $+(",%mamp.fip,") 1 $file(%mamp.fip).size 0)) {
.echo -q $fmod(SOUND_Stream_Open,1 $+(",%mamp.fip,") 1 $file(%mamp.fip)).size 0)
.echo -q $fmod(SOUND_Stream_Play,1 1)
set %tracker.length $fmod(SOUND_Stream_GetLengthMs,1)
set %mamp.x.pos 1
.timerMP3 0 1 timeMp3
.timervisdelay 1 1 .timervis -h 0 20 vis
did -c mamp 1 %mamp.fip.id
}
else {
did -i $dname 1 %mamp.fip.id $replace($did(1,%mamp.fip.id),+,+c)
did -d $dname 1 $calc(%mamp.fip.id + 1)
did -c mamp 1 $calc(%mamp.fip.id + 1 )
nextfile
}
}
on *:dialog:mampsearch:init:*:{
mdx SetMircVersion $version
mdx MarkDialog $dname
mdx SetControlMDX $dname 2 ListView report noheader nosortheader single > $scriptdir\dlls\views.mdx
mdx SetControlMDX $dname 1 Toolbar flat list wrap nodivider arrows > $scriptdir\dlls\bars.mdx
mdx SetBorderStyle $dname 1
mdx SetBorderStyle $dname 4
mdx SetBorderStyle $dname 2
mdx SetColor $dname 4 background $rgb(239,241,241)
mdx SetFont 1 12 400 tahoma
mdx SetFont 4 12 400 tahoma
mdx SetFont 2 12 400 tahoma
mdx SetFont 6 12 400 tahoma
did -i $dname 2 1 iconsize normal small
did -i $dname 2 1 seticon normal 0, $+ $scriptdirgfx\mp3.ico
did -i $dname 2 1 seticon normal 0, $+ $scriptdirgfx\volume.ico
did -i $dname 2 1 headerdims 190
did -i $dname 2 1 headertext Column
did -i $dname 1 1 bmpsize 16 16
did -i $dname 1 1 setimage icon small $scriptdirgfx\search.ico
did -a $dname 1 +a 1 Search $+ $chr(9) $+
mdx SetDialog $dname icon 0 $scriptdirgfx\search.ico
}
menu channel,status,menubar {
- MP3 Player: /mamp
}
on 1:UNLOAD: /unset %mamp.hide %filepath %lastdir %mamp.title %mamp.fip %mamp.fip.id %tracker.length %mamp.x.pos %m.len %cool %timeS2 %mamp.mute %playlistfile
Selam Arkadaslar Ben Bu Codu Buldum Mp3 addonu olarak Yalnız Bu Kanala Yansıtmıyor Acaba Nasıl Yaparım yada Bilen Varsa Yardımcı Olur Mu Düzeltip Tesekkurler Simdiden...