{"id":23222,"date":"2021-03-14T14:00:09","date_gmt":"2021-03-14T21:00:09","guid":{"rendered":"https:\/\/www.podfeet.com\/blog\/?p=23222"},"modified":"2021-03-14T14:14:15","modified_gmt":"2021-03-14T21:14:15","slug":"keyboard-maestro-showtime","status":"publish","type":"post","link":"https:\/\/www.podfeet.com\/blog\/2021\/03\/keyboard-maestro-showtime\/","title":{"rendered":"\u201cIt\u2019s Showtime!\u201d \u2013 Brought to You by Keyboard Maestro"},"content":{"rendered":"<p>Ever since <a href=\"https:\/\/www.podfeet.com\/blog\/2021\/01\/ccatp-667\/\">Mike Price started working on how to automate the creation of chapter marks into the podcast<\/a> using <a href=\"https:\/\/www.keyboardmaestro.com\/main\/\" target=\"_blank\" rel=\"noopener\">Keyboard Maestro<\/a>, I\u2019ve been taking baby steps to do things with this amazing macro tool myself.  I am definitely still on the bunny slope with the tool, but I feel like I&#8217;m starting to get how it can help me. I\u2019d like to tell you about a few of the automations I&#8217;ve been working on with this fully-accessible macro tool.<\/p>\n<p>Recently Jay Miller in our <a href=\"https:\/\/podfeet.com\/slack\" target=\"_blank\" rel=\"noopener\">Slack<\/a> posted a very fun invitation to the community.  He wrote:<\/p>\n<blockquote><p>\n  Wrote a couple blog posts around working with text in Keyboard Maestro &#8211; This seems like the kinda folks that may have Keyboard Maestro needs and I have a couple days off so if you have any requests on how to do things just DM me. (Background, I&#8217;m a Mac Automator and Developer)\n<\/p><\/blockquote>\n<p>I immediately wrote back, \u201cYou\u2019ve unleashed a monster. I\u2019ll get my list ready.\u201d  And I did.  The first thing I wanted help with was a tiny, minor annoyance but those paper cuts get to you if they go on too long.<\/p>\n<h2>Preview \u2013 Show Markup Toolbar<\/h2>\n<figure style=\"float: right; margin-left: 5px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/03\/Show-Markup-Toolbar-in-Preview.png\" alt=\"Show Markup Toolbar in Preview as described in the article\" title=\"#title#\" width=\"500 \" height=\"\"><figcaption style=\"text-align:center\">Show Markup Toolbar in Preview Macro<\/figcaption><\/figure>\n<p><a href=\"https:\/\/www.podfeet.com\/blog\/2021\/03\/tiny-tip-preview-draw-by-hand-and-more\" target=\"_blank\" rel=\"noopener\">Just last week I walked you through all of the cool markup tools in Preview<\/a>. I use these all day long. The paper cut problem is that by default, Preview opens up with the Markup Toolbar closed.  I asked Jay if he could help me make a macro to have it open automatically whenever a Preview was active.  He and I went back and forth a bunch in an open Slack conversation but after a while, we figured we were just annoying everyone so we kept at it one on one for a while. He gave me a big boost (pointing out that there\u2019s a keyboard shortcut of command-shift-A to open the Markup Toolbar &#x1f926;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;) and doing a lot of the early heavy lifting.<\/p>\n<p>The basis of his idea was to have Keyboard Maestro look to see the status of the button for showing the Markup Toolbar. If it was greyed out, that meant the toolbar wasn\u2019t visible, so it would trigger the keyboard shortcut.  After we got that working, I discovered another problem. If the window was too narrow, the Show Markup Toolbar icon wasn\u2019t visible at all so the macro wouldn\u2019t trigger.  All by my lonesome, I figured out how to get Keyboard Maestro to measure the width of the window and resize it to the minimum width for the icon to show.  I was very pleased with my little self.<\/p>\n<p>My blind side as a developer though is that I don\u2019t immediately think of all the ways something can go wrong, which is an essential part of making sure there are not unintended consequences.  After I enabled my snazzy new macro, I started having all sorts of bizarre behaviors on my Mac. The weirdest one was that I couldn\u2019t rename anything on my server when using the FTP client Transmit. As soon as I hit Enter on a file name, which should have turned it blue so I could type over the name, it would deselect the item and the window would kind of giggle.<\/p>\n<p>The good news is that I\u2019d just enabled the macro so I quickly guessed it might be the culprit. Disabling my macro allowed Transmit to operate normally.  I figured out how to get my Keyboard Maestro macro to only work when Preview is in front and now my precious Markup Toolbar is always visible.<\/p>\n<p>If you\u2019ve done any work at all in Keyboard Maestro, you know that this is a tiny little macro that\u2019s not very powerful, but I still felt like I made fire when I built it, with Jay as my fire starter!<\/p>\n<h2>Live Show<\/h2>\n<p>That spark is what leads me to my slightly more complex and super useful pair of macros that I wrote all by myself.  A long time ago I wrote an Automator script to launch all of my applications I need to run the live show.  I wrote a second one that closes the applications for the live show.  The script works, but there are things it doesn\u2019t do or doesn\u2019t do well. It\u2019s really scope creep from the original problem to be solved, but once you get something automated, you start thinking about refinements and improvements as you use the automation.<\/p>\n<p>I\u2019m also concerned that at any moment Apple is going to abandon Automator and instead give us Shortcuts on the Mac. In the meantime, Keyboard Maestro is independent of Apple\u2019s decisions in this space so I&#8217;m embracing it.<\/p>\n<p>Let\u2019s review the full set of requirements I have for my live show macros as they stand today:<\/p>\n<ul>\n<li>First quit all backup and syncing applications to minimize network traffic\n<ul>\n<li>Dropbox, Google Drive, and Carbon Copy Cloner all allow themselves to be disabled<\/li>\n<li>Sadly Backblaze, which I keep running constantly, does not allow itself to be disabled temporarily. The only option is to change the syncing to \u201cwhen I push the button\u201d, then reboot the Mac. To change it back, another reboot is required<\/li>\n<\/ul>\n<\/li>\n<li>Turn off WiFi\n<ul>\n<li>mimoLive, the application Steve and I use to broadcast the different video feeds of ourselves and my recording app Hindenburg, does not operate well with WiFi turned on.<\/li>\n<\/ul>\n<\/li>\n<li>Launch the 6 applications I use and open a Finder window so I can easily get to listener recordings<\/li>\n<li>Resize all of the windows and move them to the locations I have defined<\/li>\n<\/ul>\n<p>The Live Show\u2019s Over macro needs to do the opposite and a few more things<\/p>\n<ul>\n<li>Enable all my backup and sync services<\/li>\n<li>Turn WiFi back on<\/li>\n<li>Quit <em>some<\/em> of the live show-required apps\n<ul>\n<li>I don\u2019t kill them all, because while I want to stop broadcasting, I often still have work left to do in some apps, like Hindenburg and MarsEdit<\/li>\n<\/ul>\n<\/li>\n<li>Launch the Auphonic website so it\u2019s ready for me to upload the podcast for processing<\/li>\n<li>Launch Feeder so it\u2019s ready for me to update the podcast feed to deliver the show to you<\/li>\n<\/ul>\n<div class=\"group\">\n<figure style=\"float: left; margin-right: 5px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/03\/Live-Show-Macro.png\" alt=\"Live Show Macro\" title=\"#title#\" width=\"428 \" height=\"600\"><figcaption style=\"text-align:center\">Live Show Macro<\/figcaption><\/figure>\n<figure style=\"float: left; margin-right: 5px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/03\/Live-Shows-Over-Macro.png\" alt=\"Live Show's Over Macro\" title=\"#title#\" width=\"424 \" height=\"600\"><figcaption style=\"text-align:center\">Live Show&#8217;s Over Macro<\/figcaption><\/figure>\n<\/div>\n<p>I was really surprised at how easy it was to replicate these actions in Keyboard Maestro and to make a much more reliable process.  For some reason with my Automator script, toggling WiFi was a problem &#8211;  I could get it to turn off, but never to turn back on.  With Keyboard Maestro I used an AppleScript I found on GitHub (and credited of course) not to toggle it, but to specifically turn it off, and then later to turn it on.  This one may have worked in Automator but I\u2019ve moved on now.<\/p>\n<p>Mike Price taught me a valuable thing in Keyboard Maestro that I don\u2019t think I would have thought to go looking for on my own. You can group actions together, and they get an enclosing box. You can also change the color of the background of the group and give it a name.  This makes for very well-organized code where at a glance you can jump in and fix something.  For example, I have a group entitled \u201cLaunch Syncing and Backup Apps\u201d with a bright lime green background.<\/p>\n<p>Another touch I like to add to my automations is a completion sound. I know when I hear the sound \u201cHero\u201d, my Live Show\u2019s Over macro has completed successfully.<\/p>\n<p>And just because it\u2019s fun, I like to add an icon for my macro.  For the Live Show macro, I made it a flame, and for the Live Show\u2019s over, it\u2019s a fire extinguisher.  Seems logical, right?<\/p>\n<p>I created both of these macros with a hotkey trigger, which works well, but then I realized that I need to run the Live Show macro every single week at about the same time.  I figured out how to have it trigger at a time of day, but kept my hotkey trigger so I can enable it at any time as well.<\/p>\n<p>None of these three macros I\u2019ve worked on this week are groundbreakingly clever, but since Keyboard Maestro users are a happy sharing lot, I\u2019ve put links to download my macros so you can see how they look in Keyboard Maestro yourself.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/03\/KBM-showMarkupToolbarPreview.kmlibrary\" target=\"_blank\" rel=\"noopener\" download>Download Show Markup Toolbar in Preview<\/a><\/li>\n<li><a href=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/03\/KBM-liveShow.kmlibrary\" target=\"_blank\" rel=\"noopener\" download>Download Live Show Macro<\/a><\/li>\n<li><a href=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/03\/KBM-liveShowsOver.kmlibrary\" target=\"_blank\" rel=\"noopener\" download>Download Live Show&#8217;s Over<\/a><\/li>\n<\/ul>\n<p>Keyboard Maestro lets you import other people\u2019s macros with the File \u2192 Import Macros Safely\u2026 option. This means when they\u2019re imported, they are automatically disabled. You can safely peruse what they do, learn from them, modify them, and only when you\u2019re confident they aren\u2019t going to damage anything, enable them.<\/p>\n<h2>Next Up<\/h2>\n<p>My next target for automation is to fix what Apple most certainly thinks is a design choice but I would call a bug in Big Sur.  Every Finder window and every Save As and Open window starts with the left sidebar too narrow to show the text of the items I have in my sidebar.<\/p>\n<p>Every week I create a folder for the current week&#8217;s NosillaCast.  The name structure is  NC_YYYY_MM_DD.  I put the most current week&#8217;s folder in the left sidebar of the Finder, and I usually keep at least the previous week&#8217;s folder in the sidebar as well. It&#8217;s not uncommon for me to have content that I push out a week, so I need quick access to the folder from the previous week.<\/p>\n<p>With this delightful change to the sidebar in Big Sur, I see 2-3 folders that say &#8220;NC_2021_&#8230;&#8221; which is not at all helpful!<\/p>\n<p>I&#8217;ve gotten a start at an automation in Keyboard Maestro that already successfully widens the left sidebar to 220 pixels, but I&#8217;m still working on how to get this change to apply to both Open and Save As dialog boxes. I&#8217;m having fun and I&#8217;m sure I&#8217;ll conquer it between the great documentation on the Keyboard Maestro wiki, the community who supports it in their forums, and of course Jay and Mike!<\/p>\n<h2>Should you try Keyboard Maestro?<\/h2>\n<p>You might be wondering if you should try Keyboard Maestro.  I asked Bart if he had tried it yet.  His answer was very interesting.  He said that he\u2019s very tempted to dive in, and yet he&#8217;s equally hesitant to try it. His reason for hesitation is that he\u2019s worried he\u2019ll enjoy it too much, and spend a week automating a task that takes only 2 minutes to complete.  I think that\u2019s a fully legitimate concern, and I guess everyone has to learn to manage their own impulses.<\/p>\n<p>I\u2019m sure in a few cases I\u2019m spending more time than I\u2019m saving (like spending 2 hours writing a macro that essentially hits the keyboard shortcut command-shift-A in Preview), but I\u2019m definitely on the steep slope of learning how to automate with Keyboard Maestro.  Perhaps as I get better at it I\u2019ll spend even more time, or perhaps I\u2019ll become more efficient with my time.<\/p>\n<p>What I can say categorically is that my two Live Show macros do more than save me time.  They create a <em>predictable<\/em> environment for the show. If I forget to turn off WiFi, for example, my video will be choppy and broken up until I realize I forgot that step.  By default, my Logitech c920 doesn\u2019t have a way to store and launch with a good exposure and color profile. To overcome this limitation on the Mac, I use the menu bar app Webcam Settings. If I forget to launch it, again my video looks bad, but with my automation, I never forget.<\/p>\n<p>When you\u2019re thinking about learning Keyboard Maestro, think about things you do repeatedly that are not just time-wasting and annoying, but also which are error-prone.  Then let yourself get sucked into the madness!<\/p>\n<p><a href=\"https:\/\/www.keyboardmaestro.com\/main\/#Pricing\">https:\/\/www.keyboardmaestro.com\/main\/#Pricing<\/a><\/p>\n<p>I\u2019m sure I\u2019ll talk about Keyboard Maestro again as I continue on my coding and automation journey.  For $36, it\u2019s already given me some fun and opened up my mind to how I can automate my Mac to do things for me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever since Mike Price started working on how to automate the creation of chapter marks into the podcast using Keyboard Maestro, I\u2019ve been taking baby steps to do things with this amazing macro tool myself. I am definitely still on the bunny slope with the tool, but I feel like I&#8217;m starting to get how [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":18408,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[147],"tags":[1821,1830,727,247,4534,4535],"class_list":["post-23222","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-posts","tag-automation","tag-keyboard-maestro","tag-live-show","tag-macro","tag-macros","tag-showtime"],"jetpack_featured_media_url":"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2019\/05\/Keyboard-Maestro-Logo.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/23222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/comments?post=23222"}],"version-history":[{"count":10,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/23222\/revisions"}],"predecessor-version":[{"id":23232,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/23222\/revisions\/23232"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media\/18408"}],"wp:attachment":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media?parent=23222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/categories?post=23222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/tags?post=23222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}