I have two scripts for iTunes which I use to switch between the full window view and the miniplayer window. I’ve used them on a DragThing palette for years, but recently they have begun to cause iTunes to quit abruptly (but not every time).
I’m seeing this with iTunes 10.5 (141) and AppleScript Version 2.2.1 (100.1) while using OS 10.5.8.
Any suggestions as to what’s causing the problem and/or how to avoid the crashes would be greatly appreciated.
Here’s one of the scripts:
do_menu("iTunes", "View", "Switch to Mini Player")
on do_menu(iTunes, View, "Switch to Mini Player")
try
-- bring the target application to the front
tell application iTunes
activate
end tell
tell application "System Events"
tell process iTunes
tell menu bar 1
tell menu "View"
click menu item "Switch to Mini Player"
end tell
end tell
end tell
return true
end tell
end try
end do_menu