{"id":7412,"date":"2021-10-16T00:24:59","date_gmt":"2021-10-16T00:24:59","guid":{"rendered":"https:\/\/max-drake.cc\/?p=7412"},"modified":"2021-10-16T01:39:22","modified_gmt":"2021-10-16T01:39:22","slug":"firefox-bookmarklet-to-thunderbird-email-with-highlight-and-autosend","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=7412","title":{"rendered":"Firefox bookmarklet to Thunderbird email with highlight and autosend"},"content":{"rendered":"\n<p>I find articles\/websites that I want to follow up on later and the method I&#8217;ve been using is to use the email button in the menu bar. This triggers my email Thunderbird and I then have to fill in To: Sender with my email address and then send the email. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"425\" height=\"167\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_27_50-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox.jpg\" alt=\"\" class=\"wp-image-7413 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_27_50-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox.jpg 425w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_27_50-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-300x118.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_27_50-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-50x20.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_27_50-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-127x50.jpg 127w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_27_50-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-100x39.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_27_50-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-254x100.jpg 254w\" data-sizes=\"(max-width: 425px) 100vw, 425px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 425px; --smush-placeholder-aspect-ratio: 425\/167;\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1. Using bookmarklet to send email of Link of page to myself<\/h2>\n\n\n\n<p>I then came across a bookmarklet that would send the email to your address, so that you didn&#8217;t need to add the To: information in the email, reducing the process by one step, and you still had to hit send the email. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>javascript:location.href='mailto:<span style=\"background-color:#f78da7\" class=\"background-color\">dungbeatle@gmail.com<\/span>?subject='+document.title+'&amp;body='+escape(location.href)<\/code><\/pre>\n\n\n\n<p>I have another bookmarklet that is like the Firefox Email a link to this page button so that I can send the link to other people. <\/p>\n\n\n\n<p>The reason I do it this way is so that it encourages me to use the bookmarklet rather than the Firefox button first, and I remove the Firefox button, that way I try and get used to using bookmarklets more frequently. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"> Step2 ?\ufe0f Highlighting Subject in email with AutoHotKey ?\ufe0f  and sending email<\/h2>\n\n\n\n<p>I wrote a simple AutoHotKey script that would highlight my emails by putting some emoji&#8217;s(?\ufe0f) at the end and front of  the Subject so that I could clearly see that those emails were self sent. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"869\" height=\"153\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_29_16-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird.jpg\" alt=\"\" class=\"wp-image-7414 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_29_16-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird.jpg 869w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_29_16-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-300x53.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_29_16-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-768x135.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_29_16-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-50x9.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_29_16-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-284x50.jpg 284w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_29_16-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-100x18.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_29_16-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-568x100.jpg 568w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_29_16-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-640x113.jpg 640w\" data-sizes=\"(max-width: 869px) 100vw, 869px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 869px; --smush-placeholder-aspect-ratio: 869\/153;\" \/><\/figure>\n\n\n\n<p>The script then sends the email off after writing a little note in the body. It basically tabs through the email fields in Thunderbird and then uses Ctrl+Enter to send the email at the end.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>send, ^{tab 3}\nSend, ?\ufe0f\nsend,{Ctrl down}{Left 50}\ufe0f\nsend,{Ctrl up}\nsend,?\ufe0f\nsend, {Tab}\n;MsgBox, ,,1,123,1000 \nsend, {Ctrl down}{Left 20}\nsend,{Ctrl up}\nsend, {Enter}\nsend, {Up}\nsend, Max info for you\nsend,{Ctrl down}{Enter}\nsend,{Ctrl up}\n\nReturn<\/code><\/pre>\n\n\n\n<p> In my Stream Deck Setup I had a key for putting the highlighting (step 2 above ) after I&#8217;d triggered the bookmarklet in Firefox and I needed to put the mouse cursor at the end of the Text in the Email Subject line before triggering the key. <\/p>\n\n\n\n<p>I&#8217;d previously not been able to figure out how to use bookmarklets on my  Stream Deck . <\/p>\n\n\n\n<p>So, I now want to combine these 2 events into one action button in either my  Stream Deck or using MaxLauncher. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Emoji&#8217;s where from?<\/h2>\n\n\n\n<p>I use <strong><a href=\"https:\/\/emojipedia.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Emojipedia<\/a><\/strong> to get mine<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Issues with Emoji display in new .ahk file- \u00f0\u0178\u008d\u0081\u00ef\u00b8\u008f instead of   ?\ufe0f <\/h2>\n\n\n\n<p>But there was another issue, and this relates to emoji&#8217;s displaying correctly.  I&#8217;d created a file in VS Code &amp; cut\/pasted the code, along with the emoji&#8217;s and tried to run  it, and it executed fine, apart from the emoji icons being corrupted and not displaying properly. <\/p>\n\n\n\n<p>Although they looked fine in the .ahk file , even after closing and reopening, they just did not send correctly. <\/p>\n\n\n\n<p>Apparently it&#8217;s the encoding of the file, so the .ahk is just a .txt file but it has a UTF-8  encoding, this displays  ?\ufe0f as  \u00f0\u0178\u008d\u0081\u00ef . <\/p>\n\n\n\n<p>You have to change the file encoding, I do this in Notepad++ and there is a Tab that allows you to change the encoding from UTF-8 to UTF-8-BOM and that works fine <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"530\" height=\"923\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-13_10_56-C__Users_drake_Downloads_AHK-Working_bookmarklets-2021-10-16-Main_emo.ahk-Note.jpg\" alt=\"\" class=\"wp-image-7415 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-13_10_56-C__Users_drake_Downloads_AHK-Working_bookmarklets-2021-10-16-Main_emo.ahk-Note.jpg 530w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-13_10_56-C__Users_drake_Downloads_AHK-Working_bookmarklets-2021-10-16-Main_emo.ahk-Note-172x300.jpg 172w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-13_10_56-C__Users_drake_Downloads_AHK-Working_bookmarklets-2021-10-16-Main_emo.ahk-Note-50x87.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-13_10_56-C__Users_drake_Downloads_AHK-Working_bookmarklets-2021-10-16-Main_emo.ahk-Note-29x50.jpg 29w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-13_10_56-C__Users_drake_Downloads_AHK-Working_bookmarklets-2021-10-16-Main_emo.ahk-Note-100x174.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-13_10_56-C__Users_drake_Downloads_AHK-Working_bookmarklets-2021-10-16-Main_emo.ahk-Note-57x100.jpg 57w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-13_10_56-C__Users_drake_Downloads_AHK-Working_bookmarklets-2021-10-16-Main_emo.ahk-Note-367x640.jpg 367w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-13_10_56-C__Users_drake_Downloads_AHK-Working_bookmarklets-2021-10-16-Main_emo.ahk-Note-441x768.jpg 441w\" data-sizes=\"(max-width: 530px) 100vw, 530px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 530px; --smush-placeholder-aspect-ratio: 530\/923;\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Combining the 2 actions into one script in Firefox <\/h2>\n\n\n\n<p>So to make this work you need to use Firefox as it allows you to add a keyword to trigger a bookmark or bookmarklet. I&#8217;ve discussed that in a different article <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/max-drake.cc\/?p=7404\" target=\"_blank\">Bookmarklets, Firefox, AutoHotKeys &amp; maybe MaxLauncher too<\/a><\/strong>. <\/p>\n\n\n\n<p>So once you have the bookmarklet setup with a keyword, in this instance its called  &#8220;eme&#8221; (Short for email me)<\/p>\n\n\n\n<p>I then send the appropriate keystrokes to activate the bookmarklet on a specific page and then pause, to allow for the email to be opened up, then the 2nd part of the script tabs until it gets to the subject line and puts in the emoji&#8217;s and adds the note in the body of the email and sends it. <\/p>\n\n\n\n<p>So final script is : <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>; I've the email bookmarklet with keyword  eme (emailme) in Firefox \n; works but emoji's don't come out right\nWinActivate, mozela firefox\nsend, ^l\n; send, {Right 2}\nsend, eme\nsend, {enter}\n\nsleep, 1000\n; InputBox, Query, What to Highlight, What is query?\n; send, {enter}\nsend, ^{tab 3}\nSend, ?\ufe0f\nsend,{Ctrl down}{Left 50}\ufe0f\nsend,{Ctrl up}\nsend,?\ufe0f\nsend, {Tab}\n;MsgBox, ,,1,123,1000 \nsend, {Ctrl down}{Left 20}\nsend,{Ctrl up}\nsend, {Enter}\nsend, {Up}\nsend, Max info for you\nsend,{Ctrl down}{Enter}\nsend,{Ctrl up}\n\nReturn<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">End comment<\/h2>\n\n\n\n<p>I&#8217;m just writing this, and I&#8217;ll do a short video on the topic so that I have it for reference. I do recall that it took me a while to figure out that I had to change the file encoding to get the emoji&#8217;s to work properly. <\/p>\n\n\n\n<p>So this is an Aide-m\u00e9moire for later reference and others may find it of interest. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Video<\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Firefox bookmarklet to Thunderbird email with highlight and autosend\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/669SGHW3yoQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I find articles\/websites that I want to follow up on later and the method I&#8217;ve been using is to use the email button in the menu bar. This triggers my email Thunderbird and I then have to fill in To: Sender with my email address and then send the email. Step 1. Using bookmarklet to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7413,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[466,204,42],"tags":[],"class_list":["post-7412","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-autohotkey","category-automation","category-productivity"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_27_50-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-600x400.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/10\/2021-10-16-12_27_50-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-600x600.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/7412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7412"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/7412\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/7413"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}