Announcement

Collapse
No announcement yet.

bwild, need a script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    bwild, need a script

    I was also not able to post a reply to your thread so here it is...

    I have recently written a script that will allow me to play different playlists depending on time of day (daytime/nighttime) or time of year (Christmas/Birthdays, etc).

    It looks like this:

    <pre class="ip-ubbcode-code-pre">sub main()

    ' **************************MUSIC PLAY**************************
    ' * Plays music based on time of day or special date *
    ' * (c) 2003 B.Trew *
    ' * Version 1.4 *
    ' ************************************************************ **


    if Month(now) = 12 and Day(now) =&gt; 6 and Day(now) &lt;= 31 then 'Christmas
    hs.launch "F:\My Documents\My Music\My Playlists\christmas.m3u"
    exit sub
    end if

    if Month(Now) = 11 and Day(Now) = 6 then 'Birthday
    hs.launch "F:\My Documents\My Music\My Playlists\birthday.m3u"
    exit sub
    end if

    if Month(Now) = 7 and Day(Now) = 1 then 'Canada Day
    hs.launch "F:\My Documents\My Music\homeseer\Canada Day.mp3"
    exit sub
    end if

    if time &lt; TimeValue(hs.sunset) then 'Daytime
    hs.launch "F:\My Documents\My Music\My Playlists\arriving@day.m3u"
    exit sub
    end if

    if time &gt; TimeValue(hs.sunset) then 'Nighttime
    hs.launch "F:\My Documents\My Music\My Playlists\arriving@night.m3u"
    exit sub
    end if


    end sub

    </pre>

    By telling HomeSeer to launch the playlist, your computer will automatically load in WinAmp and play the songs in that playlist.

    - SPYguy
    ... You must be the change you wish to see in the world - Gandhi
Working...
X