Skip to content
All gists
Back to GitHub
Sign in
Sign up
Sign in
Sign up
{{ message }}
Instantly share code, notes, and snippets.
jgallen23
/
CycleTags.applescript
Created
Mar 31, 2010
Star
0
Fork
0
Star
Code
Revisions
2
Embed
What would you like to do?
Embed
Embed this gist in your website.
Share
Copy sharable link for this gist.
Clone via HTTPS
Clone with Git or checkout with SVN using the repository’s web address.
Learn more about clone URLs
Download ZIP
TaskPaper Cycle Tag Script
Raw
CycleTags.applescript
property
cycleTags
: {
"
low
"
,
"
medium
"
,
"
high
"
}
tell
application
"
TaskPaper
"
tell
front
document
set
selected
to
selected entries
repeat
with
t
in
selected
if
entry type
of
t
is
task type
then
set
tagged
to
false
set
item_count
to
number
of
items
in
cycleTags
repeat
with
i
from
1
to
item_count
set
tagName
to
item
i
of
cycleTags
set
alreadyTagged
to
exists tag
named
tagName
of
t
if
alreadyTagged
then
set
tagged
to
true
delete tag
named
tagName
of
t
if
i
is not
item_count
then
set
newTagName
to
item
(i
+
1
)
of
cycleTags
tell
t
to
make tag
with
properties
{
name
:newTagName}
end if
exit repeat
end if
end repeat
if
not
tagged
then
set
newTagName
to
item
1
of
cycleTags
tell
t
to
make tag
with
properties
{
name
:newTagName}
end if
end if
end repeat
end tell
end tell
Sign up for free
to join this conversation on GitHub
. Already have an account?
Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.