Skip to content

Instantly share code, notes, and snippets.

@n8henrie
Last active November 14, 2016 16:47
Show Gist options
  • Save n8henrie/cb7272d00e352d0632fa35d6c71b9702 to your computer and use it in GitHub Desktop.
Save n8henrie/cb7272d00e352d0632fa35d6c71b9702 to your computer and use it in GitHub Desktop.
Quicksilver Action to add Quicksilver contents to my "scratchpad" with a timestamp
property test_str : "This is a test note."
on process_text(str)
set time_str to current date
try
tell application "Notes"
-- log (get properties of first note)
set scratchpad to first note whose name is "#scratchpad #scratchpad"
set notebody to body of scratchpad
set body of scratchpad to notebody & "<br />" & time_str & "<br />" & str
end tell
on error a number b
activate
display dialog a with title "error " & b & " with your QS action script"
end try
tell application "Quicksilver" to set selection to "Sent to #Scratchpad"
end process_text
using terms from application "Quicksilver"
on get direct types
return {"NSStringPboardType"}
end get direct types
on process text str
process_text(str)
end process text
-- Only using first pane
on get argument count
return 1
end get argument count
end using terms from
on run
process_text(test_str)
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment