Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.8: New Notes App Service' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.8: New Notes App Service
Authored by: Lri on Apr 13, '13 02:33:35AM

If the script doesn't work with rich text input, why do you need to convert the text to HTML? It makes the body use Times 12 instead of the default font.

defaults -app doesn't work with Notes (or a few other applications) for me for some reason. And I didn't even have a DefaultAccount key. It would be easier to just specify the account and folder in the script.

This also selects new notes:

on run {input, parameters}
	tell application "Notes"
		tell account 1 to tell folder "Notes"
			make new note with properties {body:input}
		end tell
		activate
	end tell
	tell application "System Events" to tell process "Notes"
		set selected of row 1 of table 1 of scroll area 1 of group 1 of splitter group 1 of window 1 to true
		set focused of group 1 of UI element 1 of scroll area 1 of group 2 of splitter group 1 of window 1 to true
	end tell
end run
Edited on Apr 13, '13 02:36:10AM by Lri


[ Reply to This | # ]
10.8: New Notes App Service
Authored by: thawk9455 on Apr 13, '13 07:13:16PM

By converting to HTML you maintain line breaks, indentation, etc...

Edited on Apr 13, '13 07:51:38PM by thawk9455



[ Reply to This | # ]