{"id":287,"date":"2024-01-22T17:51:26","date_gmt":"2024-01-23T01:51:26","guid":{"rendered":"https:\/\/dejal.com\/blog\/?p=287"},"modified":"2024-01-22T17:51:26","modified_gmt":"2024-01-23T01:51:26","slug":"how-can-i-send-an-email-or-text-message-when-a-break-is-due-or-done","status":"publish","type":"post","link":"https:\/\/dejal.com\/blog\/how-can-i-send-an-email-or-text-message-when-a-break-is-due-or-done\/","title":{"rendered":"How can I send an email or text message when a break is due or done?"},"content":{"rendered":"<body><p><\/p>\n<p>I recently had an interesting customer request. They wanted to send an email or text message when a break was due, in case they were away from their Mac.<\/p>\n<p>So I added a couple of new scripts to the <a href=\"https:\/\/dejal.com\/timeout\/extras\/\">Time Out Extras page<\/a>.<\/p>\n<p>The first one is called <strong>Send Email<\/strong>, which as you might imagine, sends an email message. <a href=\"https:\/\/dejal.com\/timeout\/extras\/scripts\/ds-send-email.zip\">Download it here<\/a>.<\/p>\n<p>Here\u2019s the script; after downloading it, you\u2019ll need to edit it to replace the two instances of <code>example@example.com<\/code> with your email address; you can customize the subject and content of the message as desired:<code><\/code><\/p>\n<pre><code>tell application \"Mail\"\n\tset my_message to make new outgoing message\n\tset subject of my_message to \"Time Out break\"\n\tset content of my_message to \"Time for a break....\"\n\tset sender of my_message to \"example@example.com\"\n\t--\n\ttell my_message\n\t\tmake new to recipient at end of to recipients with properties {name:\"example@example.com\"}\n\tend tell\n\t--\n\tsend my_message\nend tell\n<\/code><\/pre>\n<p>The second script is called <strong>Send Message<\/strong>, which you may be amazed to learn sends a text message (via iMessage, Apple\u2019s \u201cblue bubble\u201d messaging protocol). <a href=\"https:\/\/dejal.com\/timeout\/extras\/scripts\/ds-send-message.zip\">Download it here<\/a>.<\/p>\n<p>Here\u2019s the script; after downloading it, you\u2019ll need to edit it to replace the <code>example@example.com<\/code> with your iCloud email address or phone number; you can customize the message as desired:<code><\/code><\/p>\n<pre><code>tell application \"Messages\"\n\tset targetBuddy to \"example@example.com\"\n\tset targetService to id of 1st account whose service type = iMessage\n\tset textMessage to \"Time for a break!\"\n\tset theBuddy to participant targetBuddy of account id targetService\n\tsend textMessage to theBuddy\nend tell\n<\/code><\/pre>\n<p>To install the scripts, open the Time Out settings window, select a break, and go to the <strong>Break Actions<\/strong> page, then click the <strong>+<\/strong> button and choose the <strong>Reveal Scripts<\/strong> menu command:<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" title=\"Break Actions menu\" src=\"https:\/\/i0.wp.com\/dejal.com\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-at-20.17.47.png?resize=560%2C501&#038;ssl=1\" alt=\"Break Actions menu\" width=\"560\" height=\"501\" border=\"0\" loading=\"lazy\"><\/p>\n<p>Then drag the script files into that revealed folder. Then they will appear in that menu so you can choose one of them.<\/p>\n<p>As always, you can choose to use these scripts before the break is due, when it starts, or when it is done, amongst other options. If you have a long break that you spend away from your Mac, a message when it is done could be very useful:<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" title=\"Send Email after done\" src=\"https:\/\/i0.wp.com\/dejal.com\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-at-20.28.58.png?resize=583%2C147&#038;ssl=1\" alt=\"Send Email after done\" width=\"583\" height=\"147\" border=\"0\" loading=\"lazy\"><\/p>\n<p>If you want to send a message when a break is due, note that if you\u2019re away from your Mac, by default the breaks are skipped, so it won\u2019t send the messages. You can avoid that by choosing to <strong>Continue Countdown<\/strong>\u00a0on the <strong>Break Schedule<\/strong> page:<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" title=\"Contine Countdown schedule option\" src=\"https:\/\/i0.wp.com\/dejal.com\/blog\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-at-20.22.51.png?resize=574%2C425&#038;ssl=1\" alt=\"Contine Countdown schedule option\" width=\"574\" height=\"425\" border=\"0\" loading=\"lazy\"><\/p>\n<p><a href=\"https:\/\/dejal.com\/blog\/dejalnews-84-thoughts-about-time-out-syncing-ios-app-subscription-options\/\">As previously mentioned<\/a>, I plan to write an iOS edition of Time Out, probably later this year. Once that\u2019s done, you\u2019ll be able to get notified of breaks on your iPhone, even when away from your Mac. But these scripts may be useful in the meantime. Enjoy!<\/p>\n<p><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>I recently had an interesting customer request. They wanted to send an email or text message when a break was due, in case they were away from their Mac. So I added a couple of new scripts to the Time Out Extras page. The first one is called Send Email, which as you might imagine, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[22,16,3],"tags":[],"class_list":["post-287","post","type-post","status-publish","format-standard","hentry","category-extras","category-faq","category-time-out"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts\/287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/comments?post=287"}],"version-history":[{"count":1,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts\/287\/revisions"}],"predecessor-version":[{"id":288,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts\/287\/revisions\/288"}],"wp:attachment":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/media?parent=287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/categories?post=287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/tags?post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}