The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Getting preference values with AS (http://forums.omnigroup.com/showthread.php?t=9748)

curt.clifton 2008-09-04 07:06 AM

Getting preference values with AS
 
All,

For my Populate Template Placeholders script, I'm trying to read the value of OF's OFMTaskDefaultDueTimeDateComponents preference. So far, no joy. The following works, but I'm not able to get at any of the properties of the preference.

[CODE]
tell application "OmniFocus"
set theDueTimePreference to (first preference whose id is "OFMTaskDefaultDueTimeDateComponents")
return theDueTimePreference
end tell
[/CODE]

I tried [B]return value of theDueTimePreference[/B], but get a handler error.

Any suggestions?

Thanks.

a11en 2008-09-04 10:10 AM

Hi Curt,

In the most recent sneaky peak the code you wrote above returns this for me:

[CODE]preference id "OFMTaskDefaultDueTimeDateComponents" of application "OmniFocus"[/CODE]

curt.clifton 2008-09-04 11:12 AM

Right. That's what it returns for me also. But I can't figure out how to do anything with the preference object that doesn't throw an error.

a11en 2008-09-04 12:00 PM

woops, sorry, I misread the first post, Curt. yeah, I can't get the text of, or value of, or "get" item of any of the ID. :( I see what you mean.

neilcowley 2008-09-04 04:48 PM

hope they help you out with this - would be a killer feature

curt.clifton 2008-09-04 05:57 PM

It turns out that I didn't need the preference value to fix the date bug. So my question is really just academic for now.


All times are GMT -8. The time now is 12:46 AM.

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