I’m trying to create a shortcut that opens any resources attached to a task. That may be a folder on my Mac, a Visual Studio Code project or a website. For the folder and Visual Studio code project.
What I found the easiest is to add any such resource to to a task or project’s LinkedFileURL array and my script simply uses the .open() function on the first of entry.
task.linkedFileURLs[0].open()
So, I also need to then be able to easily add such resources. I’m having trouble doing so with URL to websites.
I have the following four ways to add a URL to a project:
- Have the URL in a note
- Create a Web Internet Location file and link to it
- Create a Web Internet Location and embed it
- Add the url as an attachment
With method 2, I can easily view it in safari using the same .open() method, but I now have to keep a file on my Mac.
Any suggestion for how I could add a URL to a tasks and make easily available to open via a script? (I am trying to avoid having to parse the note to find available links…)