Nu e chiar de applescript prima intrebare, dar:
Incerc sa fac un script cool care sa-mi afiseze la status in Adium ce ascult eu pe deezer.com
Am si ceva cod inutil pe acolo dar merge. Ce nu stiu sa fac este cum sa-l integrez in Adium, acum trebuie sa tin ScriptEditor deschis ca sa isi faca loopul.
Idei?
repeat
set urlList to {}
set tabName to "Is not listening to Deezer"
tell application "Safari"
-- repeat with 'windows' works fine:
repeat with browserwindow in windows
try
-- accessing tabs chucks an error for spurious windows
tabs of browserwindow
set tabURLs to name of tabs of browserwindow
repeat with tabURL in tabURLs
set urlList to urlList & tabURL
set i to offset of "www.deezer.com" in tabURL
if i > 0 then
set tabName to "Is listening to: " & tabURL
end if
end repeat
end try
end repeat
end tell
tell application "Adium"
repeat with i from 1 to the count of accounts
set myAccount to item i of accounts
set status message of myAccount to tabName
end repeat
end tell
delay 20
end repeat