The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   AppleScript Requests (http://forums.omnigroup.com/showthread.php?t=4327)

Frank M 2008-12-19 02:27 PM

[QUOTE=whpalmer4;52628]If you want a feature request to be noticed, use Help->Send Feedback or send email to [email]omnifocus@omnigroup.com[/email] so that it is logged into the tracking system.[/QUOTE]

Done. Thanks!

Pauly17 2009-01-12 12:10 PM

sync with Toodledo and OF
 
Could someone help me out here.. I have he app for syncing toodledo and OF and I have no clue as how to set up the script to run it. I have the button in the title bar but when I hit it it tells me "AppleScript reported the following error: List is empty." I click on Edit Script and this is in the script Editor

set pathToLib to (path to preferences as string) & "com.ptone.OFTD_lib.scpt"
set tdsync to load script alias pathToLib
tell tdsync to run

It said I in the directions I have to put in my account info

Toodledo account email:

Store Toodledo password: If you choose to store the password, it will be stored in clear text in a plist file in your preferences folder

Toodledo password: Your Toodledo password (If you chose not to store it,you will be asked for it later)
Also Sync Inbox:
Could someone help me out here...
This is my first mac and I only had it for a week... Love it so far but I have lots to learn.. Be easy on me fellas I'm a Virgin!!
Thanks in advance for your time..
Paul...

devarshi 2009-09-17 11:09 PM

Omnifocus - Entourage integration via Quicksilver
 
Omnifocus - Entourage integration via Quicksilver

Check it out here :

[url]http://blog.nthmuse.net/?p=104[/url]

DamonC 2009-10-21 09:54 PM

Could the first post be updated with the outstanding AppleScript requests? I'd be happy to chip in here if I know what is required.

Jody Severson 2010-01-22 03:28 PM

Request script for speeding up database
 
I've just had some excellent (!!!!!) tech support from Kris, a support ninja, about the process of exporting an Omnifocus document, then reverting to that exported version as a way of flattening the OF file so that it syncs faster with my iTouch. If someone out there would like to put that process into an apple script, we'd have a one-click way to slim down the file. Many thanks!

aslansmane 2010-03-15 10:32 PM

AppleScript for Printing Perspectives
 
Just curious if anyone has had any luck writing a script that would allow you to print a specific perspective? I'd like to have OmniFocus automatically open and print a perspective for work so that when I wake up I can grab my to-do list off the printer.

Is that possible? I know nothing about AppleScript.

theurge 2010-06-26 08:06 AM

request- .txt file list to separate inbox items script
 
My wife and I have a shared dropbox folder where she periodically drops a .txt file list of stuff she'd like me to do from her windows machine, which I open, copy the list and paste it in the inbox, using the method that splits each line into a separate task.

I would love to do something like: have hazel watch that shared folder for a new .txt file, grab it and run an applescript that will do the above automatically.

I'm a complete novice with applescript, but I've done a lot of reading and seen little snippets of script that look like parts of what I would need, but I've had no luck putting them together. Any ideas folks?

Lusule 2010-11-19 04:57 AM

Request for Geek tool script
 
I would like an apple script that takes all my available tasks from Omnifocus and outputs them to shell. I could then use this script in Geek tool to embed my active tasks list on my desktop where I can see it.

I did find a script called ListNext.scpt which does something similar, but I can't get it to work quite right - it only seems to display a small fraction of my tasks list, perhaps only those tasks which are actually next actions in a sequently project?

I need to display every task, even the little niggling random ones that get pooled together in a miscellaneous box. I make aggressive use of start dates to ensure that only tasks I could actually consider doing that day are available but if I don't have everything easily visible on my desktop, I always end up forgetting something important.

I used to just export to iCal with the iCal sync to achieve this - literally dragging all my contexts over to my calendar and then using iCalBuddy. However I recently had to upgrade my mobileme calendars so this doesn't work anymore :(

RobTrew 2010-11-19 09:11 AM

[QUOTE=Lusule;89135]I would like an apple script that takes all my available tasks from Omnifocus and outputs them to shell. I could then use this script in Geek tool to embed my active tasks list on my desktop where I can see it.
[/QUOTE]

I would probably use Sqlite to do this - designing an SQL query that fetches the list you want.

"Available" is used in quite a complex sense in the OF filter system - (tasks which are neither waiting their turn in a sequential project, nor already completed, nor deferred by a future start date (either of their own or inherited from a project or Single Action list), nor out of action because their project or context is on hold or dropped).

I notice, however, that you also use the word "active" to describe the list you want, so perhaps you simply want all tasks which are not completed ?

In any case, a prototype of what you need might look something like this:

[CODE]property pstrDBPath : "~/Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2"
property pstrFieldDelimiter : tab


-- set strQuery to "PRAGMA TABLE_INFO(Task);"

set strQuery to "
select name from task where dateCompleted is null;
"
runquery(strQuery)

on runquery(strQuery)
set strCmd to "sqlite3 -separator '" & pstrFieldDelimiter & "' " & pstrDBPath & space & quoted form of strQuery
strCmd
do shell script strCmd
end runquery[/CODE]

and you can get a list of the other available fields, and their data types by running the query:

[CODE] PRAGMA TABLE_INFO(Task);[/CODE]

Note that the SQL structure of the OmniFocus cache can change from version to version, so you might have to amend the code next time OF is updated.

Lusule 2010-11-19 11:52 AM

[QUOTE=RobTrew;89144]I would probably use Sqlite to do this - designing an SQL query that fetches the list you want.[/QUOTE]

Thanks RobTrew! However I realised when I went away and put my sensible head on that what I wanted was actually a lot simpler than I realised. I went away and created a 'Now' perspective in Omnifocus that did exactly what I want: View Contexts remaining, ungrouped and sorted by context where availability is Available Status is Any Status and Duration is Any Duration.

I then used a nice simple script (below) that I found by [URL="http://concisionandconcinnity.blogspot.com/2009/06/plaintext-task-list-from-omnifocus-with.html"]Ian McCracken[/URL] to export the tasks from that context to Geek Tool. I even managed to customise the script so the list organised neatly with bullets!

It's not perfect, since it does seem to change your Omnifocus view to that perspective whether you are doing something else in Omnifocus at the time or not. However for my purposes, that's an acceptable payoff for ease of use.

Anyone could use this script for any preferred perspective by replacing the line

[CODE]set perspective name to "Now"[/CODE]
with
[CODE]set perspective name to "<your perspective here>"[/CODE]

If you want the brackets at the end to show project rather than context, change

[CODE]set projContext to name of context of oTask[/CODE]
to
[CODE]set projContext to name of containing project of oTask[/CODE]

Hope this helps people!


[CODE] set taskList to ""
tell application "OmniFocus"
tell the default document to tell the front document window
set perspective name to "Now"
set oTrees to trees of content
set n to count of oTrees
repeat with i from 1 to n
set oTask to value of (item i of oTrees)
set taskTitle to name of oTask
set projContext to name of context of oTask
set taskList to taskList & " • " & taskTitle & " (" & projContext & ")
"
end repeat
end tell
end tell
return taskList [/CODE]


All times are GMT -8. The time now is 02:37 AM.

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