View Single Post
thank you, your solution works. In my special case I just had to add "of front document".

How can I get a reference to an existing task using its name?

set myTaskName to name of task id "fGboNvQt1Pr" of front document
will get the name of my task correctly.

However, this code
set oTask to task id of front document whose name contains "Task name for attachments"
won't give me the task id.