Skip to content

Instantly share code, notes, and snippets.

@puttiz
Created May 26, 2012 10:38
Show Gist options
  • Save puttiz/2793308 to your computer and use it in GitHub Desktop.
Save puttiz/2793308 to your computer and use it in GitHub Desktop.
THL integrate with concentrate
tell application "System Events"
keystroke " " using {option down}
end tell
--property theSubject : "test"
tell application "The Hit List"
--tell inbox to make new task with properties {timing task:theSubject, start date:current date}
--set myTask to id of first task in inbox
--set mySubject to timing task of first task in inbox
activate inbox
tell application "System Events"
keystroke "2" using {command down, option down}
--keystroke "b"
--key code 125 using {option down}
end tell
--select myTask
end tell
set theDay to day of (current date) as string
set theMonth to month of (current date) as string
set theTime to time string of (current date)
set theDate to theMonth & " " & theDay & ", " & theTime
set theList to "♫ Surfing"
set theSubject to "♫ Surfing : " & theDate & " /surfing"
tell application "The Hit List"
tell folders group
repeat with lista in (every list whose class is list)
tell list theList
set theTasks to (every task whose timing task contains "/surfing" and completed is false)
if (theTasks = {}) then
make new task with properties {timing task:theSubject, start date:current date}
end if
set firstTask to (first task whose completed is false)
move firstTask to beginning of tasks
end tell
end repeat
end tell
tell application "System Events"
keystroke "1" using {command down, option down}
--keystroke "b"
--key code 125 using {option down}
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment