The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   Printing perspective with AppleScript (http://forums.omnigroup.com/showthread.php?t=6502)

Schimmi 2007-12-30 01:42 AM

Printing perspective with AppleScript
 
Hi!

In the AppleScript documentation for the perspectives it is written that they "respond to print" with the following explanation:

[CODE]print v : Print a document.
print list of file or specifier : The file(s), document(s), or window(s) to be printed.
[with properties print settings] : The print settings to use.
[print dialog boolean] : Should the application show the print dialog?
[/CODE]

How is this supposed to work? Tried many variations

[CODE] tell perspective "Drucken" to print {first document}
tell perspective "Drucken" to print {}
print {perspective "Drucken"} with properties "" print dialog yes[/CODE]

... but nothing wants to work: "Some parameters are missing for print".

Any idea?
Stefan

RobTrew 2007-12-30 04:08 AM

This works for me:

[CODE]tell application "OmniFocus"

set oPP to perspective "ThisMorning"

print oPP

end tell[/CODE]

or just

[CODE]print (perspective "ThisMorning")[/CODE]

(Doesn't work without the brackets)

Note, incidentally, that the {curly brackets} which you were experimenting with are reserved for lists, including property lists.

Schimmi 2007-12-30 08:47 AM

Neither works for me. I still get the same error "... Some parameters are missing". Of course the perspective exists:

[CODE]tell application "OmniFocus"
set p to perspective "Drucken"
p
end tell[/CODE]

gives:

[CODE]perspective id "i8HFU0lXYzP" of application "OmniFocus"[/CODE]

But

[CODE]tell application "OmniFocus"
set p to perspective "Drucken"
print p
end tell[/CODE]

fails. Running latest OmniFocus snapshot.

Stefam

Schimmi 2007-12-31 01:01 PM

Seems to be fixed in last snapshot.

Stefan


All times are GMT -8. The time now is 08:07 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.