Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,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 2.00 / 5
  You rated: 1 / 5 (8 votes cast)
 
[12,785 views]  

View maximized Cover Flow window via AppleScript | 12 comments | Create New Account
Click here to return to the 'View maximized Cover Flow window via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
View maximized Cover Flow window via AppleScript
Authored by: jonn8n on May 16, '08 08:29:21AM
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: WadeHM on May 16, '08 08:34:11AM

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 May 16, '08 08:48:50AM

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 May 16, '08 02:17:27PM

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 May 16, '08 09:12:45PM
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 May 17, '08 07:44:50AM
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 May 19, '08 03:27:03PM

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 May 17, '08 08:20:01PM

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 May 20, '08 12:03:38PM

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 May 20, '08 01:02:20PM

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 May 21, '08 08:21:54PM
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 | # ]

View maximized Cover Flow window via AppleScript
Authored by: MacUser06 on Jun 18, '12 04:19:10AM
I had some trouble making it work with Quick Silver, which works great now! I believe the lack of storing the script after running it in Quick Silver to be the culprit So I took and added a script object to John88's script. Now it works great. If only someone could come up with a solution for maximizing coverflow part of the window, so I don't have to drag it :)
global scriptpath

set scriptpath to (path to temporary items folder from user domain as text) &
"coverflowvals"

--  comment out this to make a new script object  
-- script maker
-- 	script coverflowVals
-- 		property original_bounds : missing value
-- 		property original_view : missing value
-- 	end script
-- 	
-- 	store script coverflowVals in scriptpath replacing yes
-- 	
-- end script
-- tell maker to run
-- return

set flow_window to load script alias scriptpath
-- tell application "GrowlHelperApp" to register as application "coverflow" all
notifications {"coverflow Running"} default notifications {"coverflow Running"}
icon of application "Finder"
if my flow_window's original_bounds = missing value then
	my expand_window()
else
	my revert_window()
end if
store script flow_window in scriptpath replacing yes
-- tell application "GrowlHelperApp" to notify with name "coverflow Running"
title "Growl works" description "I ran" application name "coverflow" with sticky

on expand_window()
	tell application "Finder"
		activate
		try
			if class of window 1 is not Finder window then return
			set desktop_bounds to {0, 44, 1680, 1050} -- (get bounds of window
of desktop)
			tell Finder window 1
				set my flow_window's original_bounds to (get bounds)
				set my flow_window's original_view to (get current view)
				
				set bounds to {0, 44, 1680, 1050}
				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 my flow_window's original_bounds
					set current view to my flow_window's original_view
				end tell
			end if
		end try
	end tell
	set my flow_window's original_bounds to missing value
	set my flow_window's original_view to missing value
end revert_window




[ Reply to This | # ]