How do I run/install a script?

Scripts are made of Javascript (and maybe AppleScript) code that you paste into the “Script Editor” application to run.

To try a script:

  1. Create a new test document in TaskPaper.

  2. Open the “Script Editor” app and paste the the script into a new “Script Editor” document. Depending on how the script was coded, most of the time you’ll need to change the editor window mode from “AppleScript” to “JavaScript” This can be done in a popup in the upper left of the document window.

    Here you can see that AppleScript/JavaScript popup:

  3. Then press the green “Run the Script” button to run the script.

If you decide to keep the script you should install it so that it’s easier to run.

To install a script:

  1. Open the “Script Editor” apps preferences and make sure that “Show Script menu in menu bar” is checked.

  2. Click on that item in your menu bar and choose “Open Scripts Folder > Open User Scripts Folder”.

  3. Save the script that you were testing into that folder. Make sure to save using the “Script” format, it’s faster and some scripts wont work properly unless they are saved in “Script” format.

Once you’ve done this the script will be listed in the Script menu in your menu bar. To run the script just select it from that menu. You can also use tools such as FastScripts and Keyboard Maestro to setup keyboard shortcuts to launch scripts.

Troubleshooting

If the script you are trying to run still isn’t working it might be referencing a version of TaskPaper that you don’t have. Try replacing specific references such as “com.hogbaysoftware.TaskPaper3” in the script with “TaskPaper”. For example replace:

var tp3 = Application("com.hogbaysoftware.TaskPaper3")

with:

var tp3 = Application("TaskPaper")
4 Likes

Note that it’s called “Script Editor” in recent OS X releases.

1 Like

Hi. Is it possible to auto-start a script on launch? The “Repeating tasks script” Repeating tasks script is something i would like to have as a standard setup.

I don’t know if you can do it directly, but I found this:

So looks like Keyboard Maestro can help, probably other ways to do it to, that’s just first web result that I found.