Created
February 24, 2010 21:53
-
-
Save funkaoshi/313904 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/Dropbox/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