I've made the two suggested changes:
Code:
set theProject to project named theProjectName
Code:
display dialog name of theProject as string
I added the following line after "tell theProject"
Code:
set theProject to project named theProjectName
I get the following error:
OmniFocus got an error: Can’t get project "Waiting For..." of project id "f3xRiry3AmI" of document id "dmjA-CUMhkW".
It appears it can't find the project but the project "Waiting For.." exists in OmniFocus and is active and not nested.
Thanks