Created
March 11, 2010 01:50
-
-
Save funkaoshi/328708 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property archiveFilePath : "/Users/ramanan/Desktop/Text Files/SimpleText/Archive.taskpaper" | |
property archiveFileName : "Archive.taskpaper" | |
tell application "Finder" | |
if exists (archiveFilePath) as POSIX file then | |
tell application "TaskPaper" | |
-- save what the front most file is | |
set currentFile to front document | |
-- open archive file | |
open archiveFilePath | |
set archiveFile to document named archiveFileName | |
-- move archived tasks from current file to the archive file, | |
-- and delete the archive project | |
tell currentFile | |
move entries of project named "Archive" to end of entries of archiveFile | |
delete project named "Archive" | |
end tell | |
-- save and close archive file | |
tell archiveFile | |
save | |
close | |
end tell | |
end tell | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment