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

 
Adjusting of AppleScript to add project, context and start date Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Hi there,

I fould a really helpful script on asianefficiency.com, which can be used with a hazel rule (http://www.asianefficiency.com/task-...focus-hotspot/).

The script automatically looks at a folder and creates a new task for new files in the folder (and moving the file away). This is quite nice, but it would be a lot more helpful for me if I could assign a project, a context and a start time (today+x).

Anyone able to help me? Didn't found a documentation of all the OmniFocus Parameters (and still if i'd found it i think i wouldn't have managed to get this done; kinda new to apple and not the biggest nerd).

Here is the script:
Code:
tell application "Finder" to set file_name to (name of theFile)
set theDate to current date
set theNote to "Scanned " & (theDate as string) & " 

"
set projectname to "Proceed Files"

set theTask to "Proceed: \"" & file_name & "\""

tell application "OmniFocus"
	set task_title to theTask
	tell default document
		set newTask to make new inbox task with properties {name:task_title}
		set theProject to projectname
		set note of newTask to theNote
		tell the note of newTask
			make new file attachment with properties {file name:theFile, embedded:false}
		end tell
	end tell
end tell
the variable "projectname" seems not to be working, I've set that to a project i have "Proceed Files" but... this is not added to the task.

Would be cool if you could help me :-)

Cheers,
Ben
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 09:38 AM.


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