Hello all. I'm new to Keyboard Maestro. The change to Mac OS Sierra Mail with not allowing the DELETE key to archive mail in Gmail IMAP prompted me to try this avenue. Otherwise the DELETE key sends my mail to trash, and I do not want that.
I included the macro that I created to workaround the issue, and it works...however the problem is that outside of the mail app there is oftentimes a significant delay (1-3 seconds) when I use the DELETE key normally. I inserted the sound notification just so I know when and how the macro functions.
Thanks in advance for any advice and suggestions.
Keyboard Maestro “Archive Message in Mail” Macro
Welcome to the forum, and to the small group of us who are or have been programmers. A lot of old-timers here. I just turned 60, and most of the others have seen their share of sunrises too.
I've found KM to be a programmer's best dream. Not only can you do great things with it out of the box, but it also supports AppleScript, Swift, and my preference, JavaScript for Automation (JXA). Talk about heaven!
My advice is to enjoy the ride, but don't get frustrated. It's nearly impossible to learn all the features and uses of KM. Read this forum regularly - even posts that don't sound interesting often contain golden nuggets.
And make sure you have a place to store notes, tips and tricks, so you can find them later.
@Tom and/or other gurus, the above correction I applied last night seemed fine on the surface, but it’s not working correctly. After 2+ hours of troubleshooting and trying to figure it out myself, I’m at a loss…again. The “archive” function of the macro works perfectly, the problem arises when I’m composing a new mail message or replying to a message. When hitting the DELETE key, the macro runs but delays sending the DELETE function for the ~1-5 seconds. It’s occasionally immediate but not often.
I again inserted an audible sound alert to go along with the DELETE function in the “otherwise execute the following actions” section. The audible ding rapidly repeats itself until the DELETE function is actually executed. It’s as if the macro is in some type of loop but I’m not sure why or how.
I tried multiple other settings both in and out of the macro, restarting from scratch…all with the same result.
Thanks in advance for any help–I can only assume that I am not the only one needing this function to work correctly with Gmail in OS Sierra Mail.
Since Delete is the hotkey for your macro, it’s not a good idea for the macro to “type” the delete key. Sometimes it works, but usually, you end up with strange things like what you’re seeing.
I recommend you either change the hotkey, or instead of typing the “delete” key, see if there’s a menu you can use.
If you really want to use the delete key like this, then try this:
Before you re-type the delete key, use a “Set Macro or Group Enable” action to disable the macro.
“Type” the delete key.
Pause for long enough for the key to get processed. How long? I dunno. Try values until it works.
Hi, to use not the DELETE key, I use shortcuts @CurtS, @JMichaelTX & @Tom At my age it is hard to remember this alee, so I use a context menu in each app with BetterTouch Tool
In the short video times my workflow to delete the trash with a swipe gesture and a macro
"Note: Some email services might override your selection; for example, iCloud doesn’t keep deleted emails longer than 30 days, even if you select Never."
I found this out the other day when I was wondering why a mail that I was looking for and that I was sure I'd deleted a few months ago was not in the Trash.
Well, the fact that I discovered this only recently can mean one or more of several things:
It wasn't always like this, it used to do what it says.
iCloud service changed its policy from Never to Max. One Month
It is a clever design decision, otherwise I would have stumbled over it more than once.
In any case, I am not happy with a setting that literally says "Never" but really means "Let the mail server decide"!
Using the Archive as a sort of safe pre-Trash seems like a good solution.
With the current KM, I do not experience the delays described here, nor do I get glitches when I press the Delete key while writing a mail (the Archive menu item is then disabled, and I tend to write longer mails outside the Mail application anyway).
The Archive menu item is also disabled when you have mails selected in the Archive, i.e. pressing Delete there will move them to the Trash.