C-Command Software Forum

Scripts to minimize and maximize selected windows

I use these scripts to manage screen space when I have several libraries and browser windows open. I trigger the scripts with LaunchBar abbreviations, but setting keyboard shortcuts in FastScripts is another good approach. Suggestions are welcome. Thanks to Michael for working around a problem in the first script.

(* Minimize Selected EagleFiler Windows
*)

tell application "EagleFiler"
	set _list1 to (name of every browser window whose minimized is false and visible is true)
	set _go to {}
	set _go to (choose from list _list1 with prompt ("Windows to Hide ..") with multiple selections allowed)
	if _go is false then
		return
	else
		repeat with x in _go
			set minimized of browser window named x to true
		end repeat
	end if
end tell
(* Maximimize Selected EagleFiler Windows
*)

tell application "EagleFiler"
	set _list1 to (name of every browser window whose minimized is true)
	set _go to {}
	set _go to (choose from list _list1 with prompt ("Windows to Show ..") with multiple selections allowed)
	if _go is false then
		return
	else
		repeat with x in _go
			set minimized of browser window named x to false
		end repeat
	end if
end tell