Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


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: 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 | # ]