I currently have this script going to check and see if the iTunes left menu bar thing contains “Downloads” However, it only works is the window is set to “visible” and I was wondering if there was any way to do this with the window not having to be up.
tell application "iTunes"
set visible of window "iTunes" to true
end tell
tell application "System Events"
tell process "iTunes"
tell rows of outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window 1
set DPresent to ((name of static text 1) as Unicode text)
if DPresent contains "Downloads" then
set DownloadsTrue to true
else if DPresent contains "STORE" then
set DownloadsTrue to false
end if
end tell
end tell
end tell