{"id":688,"date":"2013-04-15T18:03:36","date_gmt":"2013-04-15T18:03:36","guid":{"rendered":"http:\/\/www.markosx.com\/thecocoaquest\/?p=688"},"modified":"2013-04-21T15:54:36","modified_gmt":"2013-04-21T15:54:36","slug":"make-a-new-note-in-note-app-from-selected-text","status":"publish","type":"post","link":"https:\/\/www.markosx.com\/thecocoaquest\/make-a-new-note-in-note-app-from-selected-text\/","title":{"rendered":"Make a new note in note.app from selected text."},"content":{"rendered":"<p>I just noticed a post on <a href=\"http:\/\/www.cultofmac.com\/223409\/system-service-to-save-text-to-notes-app-in-mountain-lion\/\" target=\"_blank\"> cult of mac <\/a> \u00a0which showed how to make a new Automator \u00a0&#8221;\u00a0System Service To Save Text to Notes.app In Mountain Lion&#8221;<\/p>\n<p>It is a nice idea but I was surprised that the Author used a <strong> <em> copy to clipboard <\/em> <\/strong> \u00a0Automator Action along with a\u00a0 <strong> <em> Run Applescript <\/em> <\/strong> <em> action <\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-702\" alt=\"Screen Shot 2013-04-15 at 20.02.01\" src=\"https:\/\/www.markosx.com\/thecocoaquest\/wp-content\/uploads\/2013\/04\/Screen-Shot-2013-04-15-at-20.02.01.png\" width=\"829\" height=\"459\" srcset=\"https:\/\/www.markosx.com\/thecocoaquest\/wp-content\/uploads\/2013\/04\/Screen-Shot-2013-04-15-at-20.02.01.png 829w, https:\/\/www.markosx.com\/thecocoaquest\/wp-content\/uploads\/2013\/04\/Screen-Shot-2013-04-15-at-20.02.01-300x166.png 300w, https:\/\/www.markosx.com\/thecocoaquest\/wp-content\/uploads\/2013\/04\/Screen-Shot-2013-04-15-at-20.02.01-500x276.png 500w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>There is \u00a0some redundancy in this workflow as well as unnecessary GUI commands.<\/p>\n<p><!--more--><\/p>\n<p>From the start the Service will take what ever text is highlighted (selected) in <strong> <em> any application. <\/em> <\/strong><\/p>\n<p>Then it is passed onto the\u00a0 <strong> <em> copy to clipboard <\/em> <\/strong> <em> action. Which copies the text input to the clipboard. <\/em><\/p>\n<p>Next the\u00a0 <strong> <em> Run Applescript\u00a0 <\/em> <\/strong> <em> action\u00a0 <\/em> <em> goes <\/em> <strong> <em> \u00a0\u00a0 <\/em> <\/strong> <b> <i> the \u00a0through the process of clicking menu items to create a new note and keystrokes to paste into it. <\/i> <\/b><\/p>\n<hr size=\"2\" width=\"50%\" \/>\n<p>There is no need to use\u00a0\u00a0 <strong> <em> copy to clipboard\u00a0 <\/em> <\/strong> <em> when the service has already captured the\u00a0highlighted (selected) text as it&#8217;s <strong> input. <\/strong> <\/em><\/p>\n<p>The <strong> input\u00a0 <\/strong> will be passed onto the\u00a0 <strong> <em> Run Applescript\u00a0 <\/em> <\/strong> <em> action. Via the\u00a0 <strong> <em> Run Applescript\u00a0 <\/em> <\/strong> <\/em> action&#8217;s <em> input\u00a0 <\/em> variable. \u00a0Also Notes.app is scriptable \u00a0and you can create a new note with some know how. i.e I read the apps dictionary.<\/p>\n<p>So the is no need for all the keystroking or clicking menus.<\/p>\n<p>I want to add I am not knocking the original cult of mac post. But just want to post something that imho is how it should work.<\/p>\n<p>&nbsp;<\/p>\n<hr size=\"2\" width=\"50%\" \/>\n<p>So taking into account the above the service workflow is simplified as a single\u00a0 <strong> <em> Run Applescript\u00a0 <\/em> <\/strong> <em> action that contains <\/em><\/p>\n<p>[iframe \/blogR\/newnoteApp.html 700 300]<\/p>\n<p>The\u00a0 <strong> <em> Run Applescript\u00a0 <\/em> <\/strong> <em> action takes the <strong> input <\/strong> from the service, obtains a name for the note using the first\u00a0 <\/em> <i> paragraph of the input text, and makes a new note. <\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-701\" alt=\"Screen Shot 2013-04-15 at 18.28.20\" src=\"https:\/\/www.markosx.com\/thecocoaquest\/wp-content\/uploads\/2013\/04\/Screen-Shot-2013-04-15-at-18.28.201.png\" width=\"805\" height=\"454\" srcset=\"https:\/\/www.markosx.com\/thecocoaquest\/wp-content\/uploads\/2013\/04\/Screen-Shot-2013-04-15-at-18.28.201.png 805w, https:\/\/www.markosx.com\/thecocoaquest\/wp-content\/uploads\/2013\/04\/Screen-Shot-2013-04-15-at-18.28.201-300x169.png 300w, https:\/\/www.markosx.com\/thecocoaquest\/wp-content\/uploads\/2013\/04\/Screen-Shot-2013-04-15-at-18.28.201-500x281.png 500w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>There of course can be some refining of the applescript code. Which I may update here with. Or you can post a comment with yours.<br \/>\n<script><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just noticed a post on cult of mac \u00a0which showed how to make a new Automator \u00a0&#8221;\u00a0System Service To Save Text to Notes.app In Mountain Lion&#8221; It is a nice idea but I was surprised that the Author used a copy to clipboard \u00a0Automator Action along with a\u00a0 Run Applescript action There is \u00a0some &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.markosx.com\/thecocoaquest\/make-a-new-note-in-note-app-from-selected-text\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Make a new note in note.app from selected text.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[3,7,46,47,45],"class_list":["post-688","post","type-post","status-publish","format-standard","hentry","category-blogpost","tag-applescript","tag-automator","tag-automator-service","tag-macos-x","tag-note-app"],"_links":{"self":[{"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/posts\/688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/comments?post=688"}],"version-history":[{"count":18,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/posts\/688\/revisions"}],"predecessor-version":[{"id":695,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/posts\/688\/revisions\/695"}],"wp:attachment":[{"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/media?parent=688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/categories?post=688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.markosx.com\/thecocoaquest\/wp-json\/wp\/v2\/tags?post=688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}