Could use help with a script that I can't find or build (Solved)

Hello all. I have done extensive searches for this but I’m unable to find a script to do what I need and I will be honest I don’t have the first clue on how to write it.

What I would like to do is this -

I have a perspective named “Today!” I would like to incorporate a script that changes both the project and context of any action to become “Today!” when it becomes due that same day or I should say due today.

I hope that makes sense and I appreciate any and all help.

OK I have been looking into this more and I think I might be asking a bit much LOL

I will start with something simple like a per selected task basis. My beginning attempts at a simple version of this do not work and my limited knowledge is not helping. Here is what I have so far, any ideas!?!

Cheers

on main()
tell application “OmniFocus”
tell content of first document window of front document
–Get selection
set theDueDate to “current date”
set theContextName to “Today!”
set theProjectName to “Today!”
end tell
set autosave to true
end tell
end main

Anyone interested I found the solution. The blog from Colter Reed is great. Tons of useful information, insight to productivity and willing to help the uninformed such as myself. It is a very worth while read.

http://colterreed.com/how-to-automatically-flag-starting-tasks-in-omnifocus/

I did a small tweak to it so it works off due date rather than defer and all is good.