MoveSelectedEntriesToEndOfProject

As long as TaskPaper Mac (TPM) and TaskPaper Touch (TPT) do handle the move command exactly the opposite way - TPM moves entries to the beginning while TPT to the end of a project, the following script might be of help to have TPM behave as TPT.

Either copy, paste & save the following first release script to a file named "Move Selected Entries to End of Project.applescript" or download the Latest Version 120320-2 from the cloud.

To complete the addition to TaskPaper's behaviour regarding the command "Move to Project" I have assigned the shortcut CMD-SHIFT-\ to the script in FastScripts. The result is an enhanced and even more powerful application!

(*
 * Script: Move Selected Entries to End of Project
 *
 * Version: 120318-1
 *
 * This script does target TaskPaper for Mac (C) Hog Bay Software: www.hogbaysoftware.com/products/taskpaper.
 *
 * The following main features have been implemented and / or enhanced:
 *
 * - Moving the selected entries to the end of the containing project. A "project" can be any item having children, i.e. a project, a task or a note.
 *
 * Do the following to select:
 *
 * - a single entry : position the cursor anywhere on the item to move.
 * - multiple entries : double click anywhere on the first item and repeat for all others while keeping the CMD key pressed to move in one batch.
 *
 * Notice: Should the entry being processed not have a parent, i.e. it "lives" on lelvel 0, it will not be touched.
 *
 * History:
 *
 * - 18.03.2012: Initial release.
 *
 * Copyright (C) 2012 Stefano F. Rausch. All rights reserved.
 *)

-- Private Top Level Script Code

tell application "TaskPaper"
    tell front document

        -- Get selected entries.

        set selectedEntries to get selected entries

        -- Move selected entries.

        repeat with |entry| in selectedEntries
            tell |entry|

                try
                    set |container| to container
                    move to end of entries of |container|
                end try

            end tell
        end repeat

    end tell
end tell

-- End of Script

Happy Getting Things Done!

Stefano F. Rausch