I’ve used TaskPaper 2 for years and I love the app. When I got TaskPaper 2, I taught myself some basics of AppleScript and wrote a very useful script for my workflow. Becuase TaskPaper 2 doesn’t work with the newest Mac software, I upgraded to TaskPaper 3. I just spent the past few hours figuring out how to customize TaskPaper 3’s StyleSheet, but I’m completely lost when it comes to converting my old AppleScript into JavaScript. Can someone write the JavaScript for me? I would be extremely grateful and other people might also benefit from it. The script is useful when one has a large project (e.g. writing a dissertation) and has to repeat the same tasks (e.g. writing 500 words) on a regular basis in order to accomplish it. Then, when the repeating task is complete, one can add an additional @done tag to the task to delete it when the script is run.
Here’s the AppleScript:
tell application "TaskPaper"
tell front document
set selected_entries to get entries
repeat with each in selected_entries
if (exists tag named “repeat” of each) and (exists tag named “done” of each) then
delete (tag named “today” of each)
end if
end repeat
end tell
end tell
tell application "TaskPaper"
tell front document
set selected_entries to get entries
repeat with each in selected_entries
if (exists tag named “repeat” of each) and (exists tag named “done” of each) then
delete (tag named “done” of each)
end if
end repeat
end tell
end tell
tell application "TaskPaper"
tell front document
set selected_entries to get entries
repeat with each in selected_entries
if (exists tag named “done” of each) then
delete each
end if
end repeat
end tell
end tell