iTunes Minimize/Maximize Problem

Hey Kids–

OK, the following script works if there’s an iTunes window open on your desktop:


tell application "iTunes"
	tell browser window 1
		set collapsed to true
	end tell
end tell

iTunes dutifully sends a window to the dock.

But, at least on my machine, this script does not work:


tell application "iTunes"
	tell browser window 1
		set collapsed to false
	end tell
end tell

This script compiles, and it runs – but nothing happens to that browser window in the dock. (OK, it did work once in the dozens of times that I tried it.)

Details: iTunes 6.0.1, Mac OS X 10.4.3

Is it a syntax problem, or is it a bug?

Thanks in advance,
Tom

P.S. Kai – I know that the script can also be written as:

tell application "iTunes" to tell browser window 1 to set collapsed to false -- or true

:smiley:

Try this…

tell application “iTunes”
tell browser window 1
set collapsed to true – hide
set visible to true – show
end tell
end tell

Thanks – that did the trick.

So much for iTunes dictionary being logical…

–Tom

Any idea why this works for Safari but doesn’t work for the Finder?

tell application "Safari"
	tell every window
		set visible to true -- show
	end tell
end tell

This script doesn’t work to unminimize Finder windows from the doc

tell application "Finder"
	tell every window
		set visible to true -- show
	end tell
end tell

The strange thing is this script works to minimize every Finder window to the doc

tell application "Finder"
	tell every window
		set collapsed to true
	end tell
end tell

I am really just looking for a way to unminimize everything in the doc.

Browser: Safari 531.21.10
Operating System: Mac OS X (10.6)

Because the AppleScript dictionaries are different

Finder


tell application "Finder"
	tell every window
		set collapsed to true -- hide
		delay 3
		set collapsed to false -- show
	end tell
end tell

Safari


tell application "Safari"
	tell every window
		set miniaturized to true -- hide
		delay 3
		set miniaturized to false -- show
	end tell
end tell

Thanks StefanK, ever my hero! :smiley: