Should I ring Alfred or Keyboard Maestro?

If you want to do something that doesn’t involve a watched folder, you could create an AppleScript and invoke it with a keyboard shortcut from FastScripts, though I think you can call an AppleScript with any launcher-like utility, like LaunchBar, Alfred, Keyboard Maestro.

I haven’t played with it for a while, but I just verified I could invoke a script with a keyboard shortcut while I was writing this reply. The note is created in Tinderbox (the marmot, my blog file, in this case) in the background.

As written, this script will ask you for the $Name of the note and then create the note and use the contents of the clipboard for the $Text.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
set postTitle to display dialog "Post title?" default answer ""
copy the result to {button returned:buttonPressed, text returned:postTitle}
tell application "Tinderbox 10"
	set this_moment to (the current date)
	set nmMonth to (month of this_moment) as string
	set nmYear to (year of this_moment) as string
	set thePath to "Archives/" & nmYear & "/" & nmMonth & " " & nmYear
	tell document "Nice Marmot (Production).tbx" -- suffix .tbx required on my machine
		-- this is how to specify a note down in the hierarchy:
		set theContainer to find note in it with path thePath
		set newNote to make new note at theContainer
		tell newNote
			if postTitle is not missing value then set value of attribute "Name" to postTitle
			set value of attribute "Text" to the clipboard
		end tell
	end tell
end tell

Maybe this is kind of what you’re looking for?

3 Likes