|
|
A script to display the current iTunes song's lyrics
You may find this works a little better. It checks for missing data, and builds the query accordingly. If all the data is there, then it just tries to display the song. Also I changed the display url to use print.php instead of lyrics.php to avoid the "No referring page" error.
on openBrowser(nameOfArtist, nameOfAlbum, nameOfTrack) tell application "Safari" activate make new document at end of documents if nameOfArtist = "" and nameOfAlbum = "" then set URL of document 1 to ¬ "http://search.lyrics.astraweb.com/?word=" & nameOfTrack else if nameOfTrack = "" and nameOfAlbum = "" then set URL of document 1 to ¬ "http://search.lyrics.astraweb.com/?word=" & nameOfArtist else if nameOfTrack = "" and nameOfArtist = "" then set URL of document 1 to ¬ "http://search.lyrics.astraweb.com/?word=" & nameOfAlbum else if nameOfArtist = "" then set URL of document 1 to ¬ "http://search.lyrics.astraweb.com/?word=" & ¬ nameOfAlbum & "..." & nameOfTrack else if nameOfAlbum = "" then set URL of document 1 to ¬ "http://search.lyrics.astraweb.com/?word=" & ¬ nameOfArtist & "..." & nameOfTrack else if nameOfTrack = "" then set URL of document 1 to ¬ "http://search.lyrics.astraweb.com/?word=" & ¬ nameOfArtist & "..." & nameOfAlbum else set URL of document 1 to "http://www.getlyrics.com/print.php?Artist=" & ¬ nameOfArtist & "&Album=" & nameOfAlbum & "&Song=" & nameOfTrack end if end tell end openBrowser |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.07 seconds |
|