Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tell application "iTunes"
- set current_track to the current track
- set track_artist to the artist of the current track
- set track_name to the name of the current track
- set track_album to the album of the current track
- end tell
- set searchTerm to track_artist & " " & track_name & " lyrics"
- #
- # The following code is needed if you want to substitute spaces with plus signs in the google search string
- #
- set thewords to words of searchTerm
- set oldtids to AppleScript's text item delimiters
- set AppleScript's text item delimiters to "+"
- set googString to thewords as text
- set AppleScript's text item delimiters to oldtids
- #
- #
- # If you wish to use plus signs, you can change searchTerm in the following string to the googString
- #
- set serURL to "http://www.google.com/search?client=safari&rls=en-us&q=" & searchTerm & "&ie=UTF-8&oe=UTF-8"
- tell application "Safari"
- open location serURL
- activate
- end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement