Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is there a way to tell if iTunes is in mini player mode from applescript?

Using Mac OS X 10.8.4 Mountain lion.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You can do something like that :

tell application "System Events"
    tell process "iTunes"
        if title of window 1 is "MiniPlayer" then
            -- If mini player
        else if title of window 1 is not "MiniPlayer" then
            -- if big player 
        end if
    end tell
end tell
share|improve this answer
    
Works nicely, thanks –  Bilal Sep 7 '13 at 13:37
    
This works the way expected if either the MiniPlayer or the main window are visible. That is, if one or the other, but not both, are visible. However, if both windows are visible, it always acts as though MiniPlayer is window 1. Maybe it is, but it would be nice to know which window is active (has focus). –  L S Jun 19 at 19:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.