alias ValStart {
/timerVal1 0 30 /CHECK
/echo Valhalla Tunes 1.0 Started. Type /ValEnd to Deactivate.
}
alias ValEnd {
/timerVal1 off
/echo Valhalla Tunes 1.0 Deactivated
}
alias CHECK {
if ($com(it) == $null) {
.comopen it iTunes.Application
}
if ($com(ct)) {
.comclose ct
}
.echo -q $com(it,CurrentTrack,3,dispatch* ct)
.echo -q $com(ct,Name,3)
set %verif1 $com(ct).result
.echo -q $com(ct,Artist,3)
set %verif2 $com(ct).result
.echo -q $com(ct,Album,3)
set %verif3 $com(ct).result
if (%verif1 == %song) { if (%verif2 == %artist) { if (%verif3 == %album) { /halt } } }
else { /ValTunes }
}
Alias ValTunes {
if ($com(it) == $null) {
.comopen it iTunes.Application
}
if ($com(ct)) {
.comclose ct
}
.echo -q $com(it,CurrentTrack,3,dispatch* ct)
.echo -q $com(ct,Artist,3)
set %artist $com(ct).result
.echo -q $com(ct,Album,3)
set %album $com(ct).result
.echo -q $com(ct,Year,3)
set %year $com(ct).result
.echo -q $com(ct,Name,3)
set %song $com(ct).result
.echo -q $com(ct,Genre,3)
set %Genre $com(ct).result
;edit below line to change the display. You copy and paste the line several times, but be sure to have a different channel name for all of them.
;You can use the identifiers: %song | %artist | %album | %genre | %year
/msg #Viper 12[iTunes] 1Current Song: %song By: %artist Album: %album Year: %year
/msg #A7X 12[iTunes] 1Current Song: %song By: %artist Album: %album Year: %year
/msg #raypec 12[iTunes] 1Current Song: %song By: %artist Album: %album Year: %year
}
Alias iTunes {
if ($com(it) == $null) {
.comopen it iTunes.Application
}
if ($com(ct)) {
.comclose ct
}
.echo -q $com(it,CurrentTrack,3,dispatch* ct)
.echo -q $com(ct,Artist,3)
set %artist $com(ct).result
.echo -q $com(ct,Album,3)
set %album $com(ct).result
.echo -q $com(ct,Year,3)
set %year $com(ct).result
.echo -q $com(ct,Name,3)
set %song $com(ct).result
.echo -q $com(ct,Genre,3)
set %Genre $com(ct).result
;edit below line to change the display. You copy and paste the line several times, but be sure to have a different channel name for all of them.
;You can use the identifiers: %song | %artist | %album | %genre | %year
/msg $chan 12[iTunes] 1Current Song: %song By: %artist Album: %album Year: %year
}
menu menubar {
-
ValTunes 1.0
.Information:/dialog -m ValTunes.dialog ValTunes.dialogtable
.-
.Start:/ValStart
.Stop:/ValEnd
.Instructions:/dialog -m InstructTunes.dialog InstructTunes.dialogtable
}
dialog ValTunes.dialogtable {
title "ValTunes Info"
size -1 -1 260 110
text "ValTunes 1.0", 25, 3 3 100 22
text "Scripted by Valhalla of SwiftIRC.net", 35, 3 17 10000 3000, nowrap
text "JevK39@hotmail.com (email only)", 40, 50 84 10000 3000, nowrap
text "Highlight Castellorizon in #Island", 68, 50 97 10000 3000, nowrap
}
dialog InstructTunes.dialogtable {
title "ValTunes 1.0 Instructions"
size -1 -1 400 280,
text "ValTunes 1.0 Instructions", 25, 5 5 125 20, nowrap
tab "Variables", 39, 5 47 390 230
tab "Editing", 40
}
on $*:TEXT:*!itunes*:#: {
if ($com(it) == $null) {
.comopen it iTunes.Application
}
if ($com(ct)) {
.comclose ct
}
.echo -q $com(it,CurrentTrack,3,dispatch* ct)
.echo -q $com(ct,Artist,3)
set %artist $com(ct).result
.echo -q $com(ct,Album,3)
set %album $com(ct).result
.echo -q $com(ct,Year,3)
set %year $com(ct).result
.echo -q $com(ct,Name,3)
set %song $com(ct).result
.echo -q $com(ct,Genre,3)
set %Genre $com(ct).result
;edit below line to change the display. You copy and paste the line several times, but be sure to have a different channel name for all of them.
;You can use the identifiers: %song | %artist | %album | %genre | %year
/notice $nick 12[iTunes] 5Current Song: %song By: %artist Album: %album Year: %year
}
on $*:TEXT:*@itunes*:#: {
if ($com(it) == $null) {
.comopen it iTunes.Application
}
if ($com(ct)) {
.comclose ct
}
.echo -q $com(it,CurrentTrack,3,dispatch* ct)
.echo -q $com(ct,Artist,3)
set %artist $com(ct).result
.echo -q $com(ct,Album,3)
set %album $com(ct).result
.echo -q $com(ct,Year,3)
set %year $com(ct).result
.echo -q $com(ct,Name,3)
set %song $com(ct).result
.echo -q $com(ct,Genre,3)
set %Genre $com(ct).result
;edit below line to change the display. You copy and paste the line several times, but be sure to have a different channel name for all of them.
;You can use the identifiers: %song | %artist | %album | %genre | %year
/msg $chan 12[iTunes] 3Current Song: %song By: %artist Album: %album Year: %year
}