Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

View maximized Cover Flow window via AppleScript Desktop
The following script will take the frontmost finder window and maximize it for a 15" MacBookPro while changing the Finder's view mode to Cover Flow. I have found it helpful if I need to quickly use Cover Flow to find a file. Although it is set for a 15" screen, the parameters can be edited for any screen type. I invoke it using Quicksilver, and have named the script max.
tell application "Finder"
  activate
  select Finder window 1
  set window 1's position to {0, 44}
  set bounds of Finder window 1 to {0, 44, 1440, 900}
  set current view of Finder window 1 to flow view
end tell
I also use an AppleScript to minimize the size of the window once I have found my file. Again I use quicksilver to invoke it, and have named this one min:
tell application "Finder"
  activate
  set bounds of Finder window 1 to {143, 164, 1300, 825}
  set position of Finder window 1 to {143, 164}
  set current view of Finder window 1 to column view
end tell
[robg adds: The lines to edit if you'd like to modify this for your screen size are those that begin set bounds of....]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[8,242 views]  

View maximized Cover Flow window via AppleScript | 11 comments | Create New Account
Click here to return to the 'View maximized Cover Flow window via AppleScript' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
View maximized Cover Flow window via AppleScript
Authored by: jonn8n on Fri, May 16 2008 at 8:29AM PDT
You can get the bounds of the desktop from the Finder and use that for the maximum expanded size. Also, if you use one script for this, you can set it so that on subsequent runs it reverts the Finder window to its previous size and view without hard coding these values. I would use something like this:
property original_bounds : missing value
property original_view : missing value

if original_bounds = missing value then
	my expand_window()
else
	my revert_window()
end if

on expand_window()
	tell application "Finder"
		activate
		try
			if class of window 1 is not Finder window then return
			set desktop_bounds to (get bounds of window of desktop)
			tell Finder window 1
				set original_bounds to (get bounds)
				set original_view to (get current view)
				
				set bounds to desktop_bounds
				set current view to flow view
			end tell
		end try
	end tell
end expand_window

on revert_window()
	tell application "Finder"
		activate
		try
			if class of window 1 is Finder window then
				tell Finder window 1
					set bounds to original_bounds
					set current view to original_view
				end tell
			end if
		end try
	end tell
	set original_bounds to missing value
	set original_view to missing value
end revert_window
Save this as a script and call it to expand the front Finder window. Calling it a second time will revert the window.

Jon

[ Reply to This | # ]
View maximized Cover Flow window via AppleScript
Authored by: waderz on Fri, May 16 2008 at 8:34AM PDT
This is one of the most totally useful scripts I have seen in awhile. And since I use Quicksilver already this makes maximizing windows with Coverflow view a snap.

[ Reply to This | # ]
Jon's improvement needs to be the main hint
Authored by: jweaks on Fri, May 16 2008 at 8:48AM PDT
Not infrequently, the original hint prompts a better solution in the comments... this is one such case. If there's a way to replace the original script, or at least add a link to the comment "Find an improved version here" in the main article, that'd help.

[ Reply to This | # ]
View maximized Cover Flow window via AppleScript
Authored by: garee on Fri, May 16 2008 at 2:17PM PDT

I love jonn8n's script. I saved it as an application and put it in finders toolbar. I've made one small change:

in line 20 I changed
set bounds to desktop_bounds
to
set bounds to {0, 44, item 3 of desktop_bounds, item 4 of desktop_bounds}

this prevents the finder's status bar from disappearing at the bottom of the screen.



[ Reply to This | # ]
View maximized Cover Flow window via AppleScript
Authored by: mr. applescript on Fri, May 16 2008 at 9:12PM PDT
Apple posted a Finder toolbar script for sizing a window to full screen Flow many months ago. You can find it here:

<http://www.apple.com/applescript/toolbar/index.html>;

[ Reply to This | # ]
View maximized Cover Flow window via AppleScript
Authored by: ccjensen on Sat, May 17 2008 at 7:44AM PDT
thanks! apple's script worked even better (go figure...).
Link is actually:
http://www.apple.com/applescript/toolbar/index.html, u had an extra angle bracket

[ Reply to This | # ]
View maximized Cover Flow window via AppleScript
Authored by: shenry318 on Mon, May 19 2008 at 3:27PM PDT
This script that you can download from Apple doesn't seem to treat the "Dock Status" properly. I have my Dock set to "Hide" but after I use this script the Dock auto hide gets set to show and I have to go back and tell the dock to "Hide". I looked at the script and it tries to save and restore the preference but it doesn't seem to do it correctly! Other than that the script is great!

[ Reply to This | # ]
View maximized Cover Flow window via AppleScript
Authored by: Karl Ottenstein on Sat, May 17 2008 at 8:20PM PDT
The script on the Apple page, and the ones here, don't work with an even number of monitors, since the main coverflow image is then centered in the crack between monitors.

A quick and dirty, but not really satisfactory fix is to use:

set bounds to {0, 44, (item 3 of desktop_bounds) / 2, item 4 of desktop_bounds}

in Jon's script if you have two monitors. But, this doesn't work if the finder window is on the second monitor when you run the script - the maximized window will appear on the first and when you restore, you'll be back on the 2nd.

So, really need to determine monitor count, and the monitor on which the finder window resides and do the math accordingly. More than I have time for at the moment...

Thanks for the tip/script though!

Karl



[ Reply to This | # ]
View maximized Cover Flow window via AppleScript
Authored by: asmeurer on Tue, May 20 2008 at 12:03PM PDT
Actually, the 15" MacBook Pro has the same screen resolution as my 17" original iMac G5: 1440x900.

[ Reply to This | # ]
View maximized Cover Flow window via AppleScript
Authored by: asmeurer on Tue, May 20 2008 at 1:02PM PDT
Or you could just do a select all and activate Quicklook. That will give you full screen and a grid, which is easier to look through than Cover Flow, at least in my opinion.


[ Reply to This | # ]
View maximized Cover Flow window via AppleScript
Authored by: OldDogNewTricks on Wed, May 21 2008 at 8:21PM PDT
Or you could just do a select all and activate Quicklook. That will give you full screen and a grid, which is easier to look through than Cover Flow, at least in my opinion.

Duh. Didn't realize that multi-select gives so much flexibility. Great for documents, too. Thanks! I agree - makes more sense than Cover Flow.

[ Reply to This | # ]