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 Today's Posts

 
Applescript access to attachments ? Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
There is a table listing attached files in the cache.

You should be able to read it like this:

Code:
on run
	tell application "OmniFocus"
		tell front document window of default document
			set lstID to id of selected trees of content where class of value = task or class of value = inbox task
			if length of lstID < 1 then return
			set strTaskID to first item of lstID
		end tell
	end tell
	
	
	AttachmentList(strTaskID)
end run

on AttachmentList(strTaskID)
	set strCMD to "sqlite3 ~/Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2 'select name from Attachment where task=\"" & strTaskID & "\"'"
	paragraphs of (do shell script strCMD)
end AttachmentList
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Access "Wrap To Shape" property from Applescript? Sophie OmniGraffle General 12 2013-01-19 08:50 PM
AppleScript Access to Change Tracking bjmclaughlin OmniPlan Extras 0 2012-03-07 03:55 AM
Applescript access to tasks in inbox dmcg OmniFocus Extras 2 2009-01-09 08:44 AM
Applescript access to natural language date parsing? RobTrew OmniFocus Extras 3 2007-12-27 12:22 PM
Web Access chrjohns OmniFocus 1 for Mac 0 2007-02-19 09:41 AM


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


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