The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
document.settings Thread Tools Search this Thread Display Modes
Rooting around for the setting which stores the user's definition of "soon", as in OF > Preferences > "Due Soon" is in the next N days, I was kindly guided towards the document.settings collection, which you might broadly use as follows:

Code:
tell application id "com.omnigroup.omnifocus"
	tell default document
		set soon to (current date) + ((value of setting id "DueSoonInterval") as integer)
	end tell
end tell
Although the settings collection does not currently respond to a request for "every setting", I find that you can still list the available document.settings using System Events. The full list of settings turns out, at the time of writing, to be:
InboxIsActive
OFMProcessCompletedInboxItems
OFMTaskDefaultSequential
OFMDefaultSingletonProjectPersistentIdentifier
OFMAutomaticallyHideCompletedItems
OFMRequiredRelationshipToProcessInboxItem
PerspectiveOrder
ProjectInfoReviewRepetitionString
OFMNamedObjectHierarchicalNameSeparator
DefaultDueTime
OFMCompleteWhenLastItemComplete
ContextModeShowsParents
ReminderCalendarAlarmIndex
ReminderCalendarExportEnabled
DueSoonInterval
Code:
property pToClipBoard : "Place in Clipboard"

property pstrOFSettingsPList : "OmniFocus.app/Contents/Frameworks/OmniFocusModel.framework/Resources/Info.plist"

set strFullPath to (POSIX path of (path to applications folder) & pstrOFSettingsPList)

tell application "System Events"
	tell contents of property list file strFullPath
		tell property list item "OFRegistrations"
			tell property list item "OFMSetting"
				set lstName to name of property list items of property list item "defaultSettings"
			end tell
		end tell
	end tell
end tell

set text item delimiters to return
set strNames to lstName as string
set text item delimiters to space

set strButton to button returned of (display dialog strNames buttons {pToClipBoard, "OK"} 
	with title "Available OmniFocus document settings")

if strButton = pToClipBoard then tell application id "com.apple.finder" to set the clipboard to strNames

Last edited by RobTrew; 2010-11-15 at 12:14 PM..
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
no dates settings in settings screen iphone jedistars9 OmniFocus for iPhone 5 2010-09-16 01:19 AM
Feature Request: Move Settings to Settings application Grail OmniFocus for iPhone 3 2008-09-19 03:38 PM
"Unable to lock document. Another application had the OmniFocus document locked." drumshanbo OmniFocus 1 for Mac 7 2008-09-18 09:31 AM
[OG4] Document does not remember page setup/printer settings Christian Roth OmniGraffle General 1 2008-05-05 02:33 PM


All times are GMT -8. The time now is 03:50 PM.


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