rendered paste bodyon *:load:{
echo -a ::: 2lateamp %2lateamp_version mIRCscript successfuly loaded... type /w2late to show playing track
echo -a ::: 7In the Menu '2lateamp Settings' you can change the Settings of this script
echo -a ::: 2late is proud to present you this release ::: 2http://www.newcoma-group.de :::
}
on *:START:{
set %2lateamp_version 1.54
if (%2lateamp_autoupd == ON) {
set %2lateamp_autoupdrun RUN
sockopen httpget www.newcoma-group.de 80
}
set %2lateamp_autoshow OFF
if (%2lateamp_autoshow == ON) {
%yMP3Song = $dll(2latemirc.dll,MP3Song,3)
timerstart
}
}
alias timerstart {
timer2late 0 5 showmp3song
}
alias showmp3song {
set %xMP3Song $dll(2latemirc.dll,MP3Song,3)
if (%xMP3Song != %yMP3Song) { w2late }
}
alias w2late {
if ($dll(2latemirc.dll,WinampStatus,3) == 1) || ($dll(2latemirc.dll,WinampStatus,3) == 3) {
if ($dll(2latemirc.dll,MP3Song,3) != $null) {
%MP3Song = $+ $dll(2latemirc.dll,MP3Song,3)
%yMP3Song = $dll(2latemirc.dll,MP3Song,3)
%MP3Song = %2lateamp_c4 $+ %2lateamp_enclose1 $+ $+ %2lateamp_c1 $+ %MP3Song $+ $iif($dll(2latemirc.dll,WinampStatus,3) == 3, (PAUSED)) $+ $+ %2lateamp_c4 $+ %2lateamp_enclose2 $+ $+
;%MP3ShowTitleChange = $dll(2latemirc.dll,MP3Song,3)
%MP3Pos = $dll(2latemirc.dll,MP3Position,3) | $iif(%MP3Pos == STREAM,set %MP3Pos $null,set %MP3Pos %MP3Pos)
%MP3Lenght = $dll(2latemirc.dll,MP3Lenght,3) | $iif(%MP3Lenght == STREAM,set %MP3Lenght STREAM,set %MP3Lenght %MP3Lenght)
%MP3Lenght = %2lateamp_c4 $+ %2lateamp_enclose1 $+ $+ %2lateamp_c2 $+ Time: $+ $iif(%2lateamp_position == ON,$+ %2lateamp_c8 $+ $+ %MP3Pos $+ /) $+ %2lateamp_c2 $+ $+ %MP3Lenght $+ $+ %2lateamp_c4 $+ %2lateamp_enclose2 $+ $+
%MP3BRate = $dll(2latemirc.dll,MP3Info,BRate)
%MP3BRate = %2lateamp_c4 $+ %2lateamp_enclose1 $+ $+ %2lateamp_c5 $+ $+ %MP3BRate $+ kbps $+ $+ %2lateamp_c4 $+ %2lateamp_enclose2 $+ $+
%MP3Samplerate = $dll(2latemirc.dll,MP3Info,SRate)
%MP3Samplerate = %2lateamp_c4 $+ %2lateamp_enclose1 $+ $+ $iif(%2lateamp_c6 != $null,%2lateamp_c6,) $+ %MP3Samplerate $+ kHz $+ $+ %2lateamp_c4 $+ %2lateamp_enclose2 $+ $+
%MP3Channels = $dll(2latemirc.dll,MP3Info,Chnl) | $iif(%MP3Channels == 2,set %MP3Channels STEREO,$iif(%MP3Channels == 1 || %MP3Channels == 0,set %MP3Channels MONO,set %MP3Channels %MP3Channels Chnl))
%MP3Channels = %2lateamp_c4 $+ %2lateamp_enclose1 $+ $+ %2lateamp_c3 $+ $+ %MP3Channels $+ $+ %2lateamp_c4 $+ %2lateamp_enclose2 $+ $+
if (%2lateamp_seperator != $null) { %Sepp = %2lateamp_c7 $+ %2lateamp_seperator }
else { unset %sepp }
%ListenString = %2lateamp_msgtxt %MP3Song $iif(%2lateamp_time == ON,%Sepp %MP3Lenght) $iif(%2lateamp_bitrate == ON,%Sepp %MP3BRate) $iif(%2lateamp_samplerate == ON,%Sepp %MP3Samplerate) $iif(%2lateamp_channels == ON,%Sepp %MP3Channels)
$iif(%2lateamp_actionmsg == ON,/me %ListenString,say %ListenString)
}
}
elseif ($dll(2latemirc.dll,WinampStatus,3) == 0) {
$iif(%2lateamp_errmsg == ON,$iif(%2lateamp_actionmsg == ON,/me Winamp is not playing,say Winamp is not playing),echo -a Winamp is not playing)
halt
}
else {
$iif(%2lateamp_errmsg == ON,$iif(%2lateamp_actionmsg == ON,/me Winamp is not running,say Winamp is not running),echo -a Winamp is not running)
halt
}
dll -u 2latemirc.dll
}
menu menubar,channel,query {
2lateamp Settings
.Settings Dialog:/dialog -m 2lateamp 2lateamp
.Wich Song is playing:/w2late
}
menu status {
2lateamp Settings
.Settings Dialog:/dialog -m 2lateamp 2lateamp
}
dialog 2lateamp {
title "2late[ncg] - 2lateamp v1.54 Configuration"
size -1 -1 258 137
option dbu
icon 2latemirc.dll, 0
box "Optional Settings", 1, 2 85 205 40
check "Show Tracklenght", 2, 6 95 54 10, flat
check "Show kbps", 3, 6 103 39 10, flat
check "Show Channels", 4, 62 95 50 10, flat
text "Message Text:", 5, 6 12 36 8
edit "", 6, 6 21 50 10, autohs
text "(e.g. Listen to:)", 7, 57 23 40 8
text "Seperator signs beetwen Informations:", 8, 6 35 94 8
edit "", 9, 6 44 50 10, autohs
text "(e.g. :::)", 10, 57 46 22 8
box "Colors", 11, 116 1 141 67
text "Song:", 12, 120 12 14 8
edit "", 13, 150 10 30 10
text "[Use Strg+K in the specified Textbox to choose a color]", 14, 120 57 133 8
edit "", 17, 150 21 30 10
text "Time:", 18, 120 23 13 8
edit "", 15, 223 10 30 10
text "Bitrate:", 16, 193 12 18 8
edit "", 19, 223 21 30 10
text "Samplerate:", 20, 193 23 29 8
edit "", 21, 150 32 30 10
text "Channels:", 22, 120 34 24 8
edit "", 23, 223 32 30 10
text "Seperators:", 24, 193 34 29 8
text "Enclosement Tags:", 25, 6 58 45 8
edit "", 26, 6 67 20 10, right
text "(e.g. [%])", 27, 57 69 25 8
edit "", 28, 35 67 20 10
text "%", 29, 28 68 6 8
text "EncloseTag:", 30, 120 45 29 8
edit "", 31, 150 43 30 10
box "Text options", 32, 2 1 113 83
check "Show Samplerate", 33, 62 103 52 10, flat
button ".save", 34, 209 88 47 10, flat ok
button ".cancel", 35, 209 99 47 10, flat cancel
link "script & DLL by newcoma group 2k4 [http://www.newcoma-group.de]", 36, 89 128 169 8
radio "show script as action", 37, 116 72 62 10, flat
radio "show script as message", 38, 190 72 67 10, flat
button "Updatecheck", 39, 209 114 47 11, flat
check "Display Message if Winamp isn't playing", 40, 6 112 105 10, flat
check "Search for Update on mIRC start", 41, 116 112 90 10, flat
text "Position:", 42, 193 45 29 8
edit "", 43, 223 43 30 10
check "Show Position from current track", 44, 116 95 89 10, flat
}
on *:dialog:2lateamp:init:0: {
;var %2lateamp_bitrate,%2lateamp_channels,%2lateamp_time,%2lateamp_samplerate
;var %2lateamp_msgtxt,%2lateamp_seperator,%2lateamp_enclose1,%2lateamp_enclose2
;var %2lateamp_c1,%2lateamp_c2,%2lateamp_c3,%2lateamp_c4,%2lateamp_c5,%2lateamp_c6,%2lateamp_c7
if (%2lateamp_bitrate == ON) { did -c 2lateamp 3 }
if (%2lateamp_samplerate == ON) { did -c 2lateamp 33 }
if (%2lateamp_channels == ON) { did -c 2lateamp 4 }
if (%2lateamp_time == ON) { did -c 2lateamp 2 }
$iif(%2lateamp_actionmsg == ON, did -c 2lateamp 37, did -c 2lateamp 38)
if (%2lateamp_errmsg == ON) { did -c 2lateamp 40 }
if (%2lateamp_autoupd == ON) { did -c 2lateamp 41 }
if (%2lateamp_position == ON) { did -c 2lateamp 44 }
if (%2lateamp_msgtxt != $null) { did -o 2lateamp 6 1 %2lateamp_msgtxt }
if (%2lateamp_seperator != $null) { did -o 2lateamp 9 1 %2lateamp_seperator }
if (%2lateamp_enclose1 != $null) { did -o 2lateamp 26 1 %2lateamp_enclose1 }
if (%2lateamp_enclose2 != $null) { did -o 2lateamp 28 1 %2lateamp_enclose2 }
if (%2lateamp_c1 != $null) { did -o 2lateamp 13 1 %2lateamp_c1 }
if (%2lateamp_c2 != $null) { did -o 2lateamp 17 1 %2lateamp_c2 }
if (%2lateamp_c3 != $null) { did -o 2lateamp 21 1 %2lateamp_c3 }
if (%2lateamp_c4 != $null) { did -o 2lateamp 31 1 %2lateamp_c4 }
if (%2lateamp_c5 != $null) { did -o 2lateamp 15 1 %2lateamp_c5 }
if (%2lateamp_c6 != $null) { did -o 2lateamp 19 1 %2lateamp_c6 }
if (%2lateamp_c7 != $null) { did -o 2lateamp 23 1 %2lateamp_c7 }
if (%2lateamp_c8 != $null) { did -o 2lateamp 43 1 %2lateamp_c8 }
}
on *:dialog:2lateamp:sclick:36:{
run http://www.newcoma-group.de
}
on *:dialog:2lateamp:sclick:39:{
sockopen httpget www.newcoma-group.de 80
}
on *:dialog:2lateamp:sclick:34:{
if ($did(2lateamp,3).state == 0) { set %2lateamp_bitrate OFF }
else { set %2lateamp_bitrate ON }
if ($did(2lateamp,33).state == 0) { set %2lateamp_samplerate OFF }
else { set %2lateamp_samplerate ON }
if ($did(2lateamp,4).state == 0) { set %2lateamp_channels OFF }
else { set %2lateamp_channels ON }
if ($did(2lateamp,44).state == 0) { set %2lateamp_position OFF }
else { set %2lateamp_position ON }
if ($did(2lateamp,2).state == 0) { set %2lateamp_time OFF }
else { set %2lateamp_time ON }
if ($did(2lateamp,37).state == 0) { set %2lateamp_actionmsg OFF }
else { set %2lateamp_actionmsg ON }
if ($did(2lateamp,40).state == 0) { set %2lateamp_errmsg OFF }
else { set %2lateamp_errmsg ON }
if ($did(2lateamp,41).state == 0) { set %2lateamp_autoupd OFF }
else { set %2lateamp_autoupd ON }
set %2lateamp_msgtxt $did(2lateamp,6)
set %2lateamp_seperator $did(2lateamp,9)
set %2lateamp_enclose1 $did(2lateamp,26)
set %2lateamp_enclose2 $did(2lateamp,28)
set %2lateamp_c1 $did(2lateamp,13)
set %2lateamp_c2 $did(2lateamp,17)
set %2lateamp_c3 $did(2lateamp,21)
set %2lateamp_c4 $did(2lateamp,31)
set %2lateamp_c5 $did(2lateamp,15)
set %2lateamp_c6 $did(2lateamp,19)
set %2lateamp_c7 $did(2lateamp,23)
set %2lateamp_c8 $did(2lateamp,43)
%zzz = 1
while (%zzz <= 8) {
if ($len(%2lateamp_c [ $+ [ %zzz ] ]) == 2) {
set %2lateamp_c [ $+ [ %zzz ] ] $left(%2lateamp_c [ $+ [ %zzz ] ],1) $+ 0 $+ $right(%2lateamp_c [ $+ [ %zzz ] ],1)
}
inc %zzz
}
}
}
dialog 2lateupdatechk_new {
title "2lateamp Updatecheck"
size -1 -1 111 29
option dbu
text "There's a newer version of your 2lateamp", 1, 2 3 107 8, center
button "Grab iT", 2, 2 14 49 12
button "No i suck", 3, 60 14 49 12, cancel
}
on *:dialog:2lateupdatechk_new:sclick:2:{
run http://www.newcoma-group.de
}
dialog 2lateupdatechk_old {
title "2lateamp Updatecheck"
size -1 -1 111 29
option dbu
text "There's no newer version of your 2lateamp", 1, 2 3 107 8, center
button "Kool", 2, 2 14 107 12, cancel
}
on *:SOCKOPEN:httpget:{
sockwrite -n httpget GET /newsticker/2lateampupdate.rdf HTTP/1.1
sockwrite -n httpget HOST: www.newcoma-group.de
sockwrite -n httpget $crlf
set %u_i 1
}
on *:SOCKREAD:httpget:{
sockread %temp
if ((<title> isin %temp) && (</title> isin %temp)) {
set %2lateupd_ [ $+ [ %u_i ] ] $remove(%temp,<title>,</title>)
inc %u_i
}
}
on *:SOCKCLOSE:httpget:{
set %2lateamp_Versionupd %2lateupd_1
$iif($calc(%2lateamp_Versionupd - %2lateamp_version) > 0,dialog -m 2lateupdatechk_new 2lateupdatechk_new,$iif(%2lateamp_autoupdrun != RUN,dialog -m 2lateupdatechk_old 2lateupdatechk_old))
unset %2lateamp_autoupdrun
}