View Single Post
Quote:
Originally Posted by whpalmer4 View Post
The included Applescript will close all but the front window and apply the desired perspective to the front window. You can use it with the application running or not, as the application will be launched if it isn't running.

Code:
property DefaultPerspective : "All"

tell application "OmniFocus"
	set mainWindow to front window
	set frontID to id of mainWindow
	set background to (every window whose id is not frontID)
	repeat with thisWindow in background
		close thisWindow
	end repeat
	set perspective name of mainWindow to DefaultPerspective
end tell
OK, I have the script running, but I'm not quite there yet.
How does the script know which is the desired perspective ( ie. "All") as the perspective title isn't mentioned in the script?

peter