PDA

View Full Version : activate Perspectives


ptone
2007-12-13, 08:40 PM
Looks like the only thing you can do with perspectives from AS is print them.

I'm hoping that some day you can "activate" them.

-P

Tim Wood
2007-12-13, 10:30 PM
Perspective scripting is pretty clunky right now; that there is even a 'perspective' scripting class is relatively new. We'd like to do more, but it won't make it into 1.0.

One of the bits of cruft that is useful is that you can create new windows with a given perspective:


tell application "OmniFocus"
tell default document
make new document window with properties {perspective name:"To Go"}
end tell
end tell


or change the perspective of an existing window:


tell application "OmniFocus"
tell default document
set perspective name of front document window to "To Do"
end tell
end tell


The whole 'perspective name' business is a holdover from when we thought we'd not have time to add the 'perspective' scripting object at all, but that leaked in for the printing support. Really this should have been something like a 'current perspective' property on the window -- hopefully sometime in 1.x =)

umop
2008-02-11, 01:01 PM
Is there any way to get a reference to the new window when using:


tell application "OmniFocus"
tell default document
make new document window with properties {perspective name:"To Go"}
end tell
end tell


Thanks,
Eric

umop
2008-02-11, 01:14 PM
Nevermind -- I got it:


set docTarget to make new ...