All pastes #832501 Raw Edit

Untitled

public text v1 · immutable
#832501 ·published 2007-12-26 07:28 UTC
rendered paste body
;Valhalla Tunes 0.9.beta
;DO NOT REDISTRIBUTE
;Follow the instructions
;Script will check for new song every 30 seconds. DO NOT CHANGE THIS.
;All notes will be instructions on what to do
;Once you fill everything in, type /ValStart


alias ValStart {
  /timerVal1 0 30 /CHECK
  /echo Valhalla Tunes 0.9.beta Started. Type /ValEnd to Deactivate.
}
alias ValEnd {
  /timerVal1 off
  /echo Valhalla Tunes 0.9.beta 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
/amsg2 4[3vTunes4] 4Song:3 %song 4By:3 %artist 4Album:3 %album }


menu menubar {
  -
  ValTunes 0.9.beta
  .Information:/dialog -m ValTunes.dialog ValTunes.dialogtable
  .-
  .Start:/ValStart
  .Stop:/ValEnd
  .Info 0.9.beta:/dialog -m CreditTunes.dialog CreditTunes.dialogtable
}


dialog ValTunes.dialogtable {
  title "ValTunes Info"
  size -1 -1 260 110
  text "ValTunes 0.9.beta", 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 CreditTunes.dialogtable {
  title "ValTunes 0.9.beta Info"
  size -1 -1 300 100
  text "Version 0.9.beta Custom", 35, 3 3 10000 3000, nowrap
  text "In Progress, to be completed shortly", 40, 100 50 10000 3000,
  nowrap
  text "DO NOT DISTRIBUTE OR MODIFY", 68, 67 65 10000 3000, nowrap
}