View Full Version : AppleScript Requests
kaebot
2007-07-27, 10:53 AM
We've had a few requests for some scripts over here that we'd like to do, but haven't had a chance. If anyone out there finds themselves with a spare moment and feel so inclined to help out their fellow user, we'd really appreciate it!
Here's the list so far (more to come):
A script to parse out TODOs from TextMate and send them to OF.
Integration with MailTags.
A script to create Mail messages from actions.
A Now Up-To-Date to OF and vice versa script.
Integration with Entourage
Export to Pages, Microsoft Word, and Evernote
I would love to be able to truly decide what I will be doing now from Omnifocus. An ideal way would be to select an action and run a script that launches Minuteur counting down from the estimated time necessary to complete the task.
Tim Wood
2007-09-06, 07:17 AM
I'm not sure this addresses the request, but you can create an AppleScript and put it in the OmniFocus scripts directory and finally configure OmniFocus's toolbar to have the script (alternatively you can use something like FastScripts or Quicksilver to activate it from the keyboard).
leehinde
2007-09-12, 10:20 AM
I'd like it if I had a list, (as might come from an email)
Like:
1. Please do this
2. Please do that
3. Oh, and this other thing.
I'd like to select the list, hit a button and have three new actions created.
ext555
2007-09-12, 10:32 AM
Omni has stated that email capture is on their list for 1.0 release ..
I think what you'll see is one action generated from each email .
leehinde
2007-09-17, 12:28 PM
Hi; thanks. I'm using a script now to get an email into OF. But I wanted to break them out when the client includes multiple requests in a single email.
A script was posted (http://forums.omnigroup.com/showthread.php?t=4883) that works just fine for my needs.
milkshake
2007-10-02, 07:25 AM
My phone (Nokia) exports notes (via Bluetooth) as individual text files, so I'd appreciate a way to import each text file as an action...
Adam Sneller
2007-10-11, 09:47 PM
I'll take on the Entourage integration. I worked up a set of scripts that glued Entourage with OOP a while back. But I'd love to hard-wire this into a cocoa plug-in for OmniFocus!
Do we know if there'll be an OF API available, or is it all AppleScript? If Sync Services is fully supported, this may be a relatively easy fix!
Craig
2007-10-15, 05:25 AM
I'm a happy user of Curt Clifton's "What am I doing?" script. I wonder if someone with some scripting skills could alter it so that it could be invoked when multiple actions are selected. I'd love to be able to go through a list adding to the selections, then with one invocation of the script launch separate sticky Growl windows for each of them.
(Original script appears here (http://forums.omnigroup.com/showthread.php?t=4947).)
mikesale@yahoo.com
2007-11-21, 04:27 AM
Already exists, but I would love to see it more formalized:
* Export/Import to/from OmniOutliner
Then add:
* Create mindmanager mindmap from OF
* Create folder for project
The "big" one that would really be cool!
* Create directory structure that mimics folder structure with projects for "Project Support Materials" that map to your project structure in OF! Then create an alias in each project notes section to map to the relevant folder.
Teall
2008-02-01, 06:56 PM
I would love a script that would export tasks to Address Book notes with the name the @List. Then i could sync with my iPhone, for example:
@Calls
Note: -Call Mom
-Call Boss
thr61
2008-03-20, 01:23 PM
I am a fairly new mac and OF user who came over from the dark side of XP and Outlook. One decent tool amid the bloat was the David Allen Outlook plugin which had the ability to create an "@waiting for" next action that contained the subject matter of the email being sent.
I know that I can go into my sent items in Entourage (still need it for Exchange) and use the Entourage to OF script to put the item in my inbox, but a script that could grab the addressee, date and subject line and dump a waiting for into the OF inbox would be amazing.
I have no coding or scripting skills myself, so I dare not try.
Thanks!
eco-geek
2008-03-27, 12:06 PM
I would love to have a script that would sync OmniFocus with SplashShopper (www.splashdata.com), and here's why. It occurred to me that SplashShopper is really just a list manager and GTD is really about managing lists. This makes them a perfect match. Also, SplashShopper has both an OS X desktop app and a Palm app and they supply their own sync conduit which works flawlessly.
In both apps, SplashShopper has the ability to filter items based on "Stores" (Projects) and "Categories" (Contexts). You can also mark an item as "Needed", which in my mind equates to "Next", thus I can keep all identified project actions in the main view with only the next action(s) marked as "Next" (which will show up in the "Needed" view).
I know a little about Applescript, but nowhere near enough to accomplish something like this. And I'm a grad student, so the amount of time I can devote to learning is terribly limited at this point. So can anyone cobble together a script that might do this? Alternatively, can you point me to something that might serve to get me started? Thanks!
sirvivian
2008-05-27, 03:01 AM
I second everything mikesale wrote - especially the "big" one!!!
henri
2008-06-29, 08:19 AM
I have an OO script which I used to use daily: it would take all dates less than today's and turn them into today. For example, if today's date is June 29, all dates up to June 28 would magically become June 29.
Why this would be useful in OF: one of my most useful perspectives is "group by start date, sort by due date". It would be convenient to not have a distinction between "started yesterday", "started in the last week", etc. and "start today", since the difference is moot.
So I would activate this script first thing in the morning, and have all tasks whether started in the past or starting today grouped together, because after running the script they would all be "start today".
Actually, such a script would need to ignore repeating tasks, as I wouldn't want to mess with their start dates.
I'm not that great with AppleScript, but I could try to do this myself if I had some sample OF scripts that address those sorts of issues. Where would those be?
I'm a happy user of Curt Clifton's "What am I doing?" script. I wonder if someone with some scripting skills could alter it so that it could be invoked when multiple actions are selected. I'd love to be able to go through a list adding to the selections, then with one invocation of the script launch separate sticky Growl windows for each of them.
(Original script appears here (http://forums.omnigroup.com/showthread.php?t=4947).)
I second Craigs request. I would love a feature so that i could select a single action, press a keyboard shortcut and send it to growl, which would make the task sticky on my screen. I would do the same with 2 or max. 3 other tasks and that would really improve my multitasking.
Right now, i'm doing it like this. I also have iGTD2 installed which has this feature and then i select the tasks i'm doing in OF, copy them over into iGTD2 inbox and then use the keyboard shortcut to send them to growl.
I believe Curt.Cliffton is the original author of the WhatAmIdoing script and Curt, if you have the knowledge (which i believe you have) and the time to code this, i'll buy you a beer if you ever come to Slovenia. Heck, i'll buy you a sixpack :) I just hope Curt is reading this thread.
JakeB
2008-09-24, 07:23 AM
I hope that adding another applescript request to this thread is appropriate.
I would love to be able to select a series of actions and to sum the estimated time across them. The StartTimer.scpt seems to do almost all of what I'd like, but rather than start Minuteur, I'd like just to get a dialog box with the sum that I could copy and past back into Omnifocus as the time estimated for the whole project (or, even better just have the time estimated for projects be defined as either (1) user supplied number or (2) the sum of the estimates of the actions.
I'll hack around on this a bit on my own. But, I am not an Applescript programmer and figured this might be faster for a more experienced person.
Thanks!
Jake
mattyork
2008-10-16, 09:24 AM
I'm sure someone has put this somewhere but I don't yet see it on here. Since the iPhone doesn't handle to-do items on sync, and OF handles them much more elegantly anyways is there a way to convert OF actions to iCal calendar entries (not to-do items) w/ a default alarm? MobileMe users can then sync their iPhones with their iCal which would then include the alarms for each task.
Frank M
2008-12-19, 01:05 PM
I'd like an Applescript that does the following:
I select a name in a task, or a task description or a project.
The script checks to see if that name is in my address book.
If it is, it attaches the contact (as if I had dragged it from the address book onto the task, so that when I 2click it that it opens the address)
If not such contact is found, it warns me that it can't find it, then [cancel] or [open address book]
In an ideal world, if there is more than one matching contact (should not happen, but it can) if there's more than one match, it presents a list with fundamental details (name, company, phone) to choose from, and 2clicking it attaches the contact.
In a super mega hyper ideal, OmniGroup would make this functionality part of a context menu-with a read-ahead list. <-- Dear OmniGroup: This is a feature request!
whpalmer4
2008-12-19, 01:32 PM
In a super mega hyper ideal, OmniGroup would make this functionality part of a context menu-with a read-ahead list. <-- Dear OmniGroup: This is a feature request!
If you want a feature request to be noticed, use Help->Send Feedback or send email to omnifocus@omnigroup.com so that it is logged into the tracking system.
Frank M
2008-12-19, 02:27 PM
If you want a feature request to be noticed, use Help->Send Feedback or send email to omnifocus@omnigroup.com so that it is logged into the tracking system.
Done. Thanks!
Pauly17
2009-01-12, 12:10 PM
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
Check it out here :
http://blog.nthmuse.net/?p=104
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
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
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
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
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
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 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:
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
and you can get a list of the other available fields, and their data types by running the query:
PRAGMA TABLE_INFO(Task);
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
I would probably use Sqlite to do this - designing an SQL query that fetches the list you want.
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 Ian McCracken (http://concisionandconcinnity.blogspot.com/2009/06/plaintext-task-list-from-omnifocus-with.html) 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
set perspective name to "Now"
with
set perspective name to "<your perspective here>"
If you want the brackets at the end to show project rather than context, change
set projContext to name of context of oTask
to
set projContext to name of containing project of oTask
Hope this helps people!
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
whpalmer4
2010-11-19, 09:49 PM
Here's a slightly improved version. It creates an invisible window to do the data extraction, so your existing windows aren't affected, and it handles the case of an action without a context.
property TargetPerspective : "Geek Tool" -- set this to the name of the perspective that shows desired actions
set taskList to ""
tell application "OmniFocus"
tell default document
set _window to make new document window with properties {visible:false} at front of document windows
tell _window
set perspective name to TargetPerspective
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
try
set projContext to name of context of oTask
on error
set projContext to "(No Context)"
end try
set taskList to taskList & " • " & taskTitle & " (" & projContext & ")
"
end repeat
end tell
close _window
end tell
end tell
return taskList
Lusule
2010-11-20, 01:42 AM
Here's a slightly improved version. It creates an invisible window to do the data extraction, so your existing windows aren't affected, and it handles the case of an action without a context.
That is just brilliant whplamer4! Thank you! I had actually only just encountered the 'no context' problem and here you've already solved it for me. Moving the Perspective name to the start is handy too.
I'm really happy with this script now :) Should cover most eventualities and means the fact that mobileme iCal no longer works with Omnifocus is not an issue.
RobTrew
2010-11-20, 01:04 PM
As a curiosity, here is an Sqlite version. Arguably less easy to maintain (the SQL queries are probably less transparent than applescript, and might need to be adjusted for later versions of OF).
On the other hand, it's rather short and simple, works even when OmniFocus is not running, and is quite fast.
property pstrDBPath : "~/Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2"
property pstrFieldDelimiter : tab
set strQuery to "
select \"• \", t.name, \"(No Context)\" from task t where context is null order by t.name;
select \"• \", t.name, c.name from task t join context c on t.context=c.persistentIdentifier
where effectiveActive=1 and dateCompleted is null order by c.name, t.name;
"
set taskList to runquery(strQuery)
on runquery(strQuery)
set strCmd to "sqlite3 -separator '" & pstrFieldDelimiter & "' " & pstrDBPath & space & quoted form of strQuery
do shell script strCmd
end runquery
RussBlaisdell
2011-01-05, 04:51 PM
Hi,
I have a script that works as a folder action that I could share that should get you close to what you are looking for. I am not sure if folder actions work with Delphic so it might need to be scheduled to run. If you are still looking just reply and I will post it
RussBlaisdell
2011-01-05, 04:55 PM
My previous port was in reply to
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?
fullcity
2011-03-22, 07:08 AM
Hi!
I bet my request is simple and I merely have been too lazy in searching the archives for an answer. :-)
I'd like to ge able to tag an outgoing email with a specific MailTags tag "@Waiting" and have a rule fire an AS to create a follow up to do in OF. The date for the follow up would pull from the Tickler date or a default # of days if not specified.
As a bonus, the OF Context for the task could be determined from the outgoing email address if it is one of the people on my team (5 people).
I'll hire someone to work on this with me if there isn't something here easily convertible.
Thanks,
Adam Aronson
FullCity Consulting Inc.
Certified FileMaker Developer (Ver. 7, 8, 9, 10 & 11)
Platinum FileMaker Business Alliance Members
2007 FileMaker Business Partner of The Year
http://fullcityconsulting.com
theurge
2011-12-31, 03:33 PM
Sorry, RussBlaisdell, its been a while, and this little project has just dropped of my radar. I would love to have a look at what you've got. I'm not sure how much time or intelligence I have to do anything with it, but you never know. Thanks.
Hi,
I have a script that works as a folder action that I could share that should get you close to what you are looking for. I am not sure if folder actions work with Delphic so it might need to be scheduled to run. If you are still looking just reply and I will post it
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.