The Omni Group

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
Printing perspective with AppleScript Thread Tools Search this Thread Display Modes
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?
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
... but nothing wants to work: "Some parameters are missing for print".

Any idea?
Stefan
  Reply With Quote
This works for me:

Code:
tell application "OmniFocus"
	
	set oPP to perspective "ThisMorning"
	
	print oPP
	
end tell
or just

Code:
print (perspective "ThisMorning")
(Doesn't work without the brackets)

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

Last edited by RobTrew; 2007-12-30 at 04:21 AM..
  Reply With Quote
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
gives:

Code:
perspective id "i8HFU0lXYzP" of application "OmniFocus"
But

Code:
tell application "OmniFocus"
	set p to perspective "Drucken"
	print p
end tell
fails. Running latest OmniFocus snapshot.

Stefam
  Reply With Quote
Seems to be fixed in last snapshot.

Stefan
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Applescript to sync OF perspective with todo.txt app in Android, windows, etc. kingsinger Applying OmniFocus 0 2013-02-13 08:50 PM
How I save a perspective with AppleScript? kroger OmniFocus Extras 2 2012-03-23 10:56 PM
Change the perspective from Applescript? Tiny Clanger OmniFocus Extras 5 2009-03-10 04:07 AM
applescript: print selected perspective steve OmniFocus Extras 1 2007-11-17 05:25 PM
Applescript Perspective Lutin OmniFocus Extras 0 2007-09-16 06:39 AM


All times are GMT -8. The time now is 08:27 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.