Can I make this work without using Internet Explorer...
Can I make this work without using Internet Explorer...
- Subject: Can I make this work without using Internet Explorer...
- From: Paulo Jorge Rodrigues Góis <email@hidden>
- Date: Wed, 27 Feb 2002 13:41:19 +0000
property required_version : "2.0.3"
try
tell application "iTunes"
-- VERSION CHECK
set this_version to the version as string
if this_version is not greater than or equal to the required_version
then
beep
display dialog "This script requires iTunes version: " &
required_version & ,
return & return & ,
"Current version of iTunes: " & this_version buttons
{"Update", "Cancel"} default button 2 with icon 2
if the button returned of the result is "Update" then
my access_website("
http://www.apple.com/itunes/download/")
return "incorrect version"
end if
end if
-- get the title of the IE window
tell application "Internet Explorer"
OpenURL "
http://apps.wolffm.com/playwindow2.php" toWindow 0
Flags 1
set theTitle to item 2 of (GetWindowInfo -1)
repeat
if theTitle does not contain the "WOLF-FM:" then
set theTitle to item 2 of (GetWindowInfo -1)
else
exit repeat
end if
end repeat
CloseWindow theTitle
set the song_info to (characters 10 thru end of the theTitle) as
string
set search_string to "-"
set string_location to the offset of search_string in song_info
set the song_artist to (characters 1 thru (string_location - 2)
of the song_info) as string
set the song_title to (characters from (string_location + 2) to
-1 of the song_info) as string
end tell
-- set the id3 of the Wolf-FM streming to IE window information
tell source "library"
tell playlist "My Radios"
try
set the name of (every track whose comment is "The
Hottest mix of the '70s, '80s and today") to "Wolf-fm now plaiyng: " &
song_title
set the artist of (every track whose comment is "The
Hottest mix of the '70s, '80s and today") to song_artist
on error
display dialog "The Wolf-FM radio station was not
found." buttons {"Cancel"} default button 1
end try
end tell
end tell
end tell
tell application "iTunes" to activate
on error error_message number error_number
if the error_number is not -128 then
tell application "iTunes"
activate
beep
display dialog error_message buttons {"Cancel"} default button 1
end tell
end if
end try
on access_website(this_URL)
ignoring application responses
tell application "Finder"
open location this_URL
end tell
end ignoring
end access_website
--
Paulo Jorge Rodrigues Gsis
R. Antsnio A. Machado n: 24, 5: Fte.
1600-013 Lisboa Portugal
e-mail: email@hidden
e-mail: email@hidden
e-mail: email@hidden
Telefone rede fixa: 351217263568
Telefone msvel: 351965450207
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.