Random ramblings about Mac, Python, TeX, programming, and more  |     |          |     |  


MacOS automation with Python and AppleScript

February 21, 2020  |  programming, macos

I prefer to program in Python, but for automation on the Mac, AppleScript is still a great tool. Especially paired with a good AppleScript editor/debugger like Script Debugger. For many projects it would be nice to do most of the scripting in Python, and only do the interaction with the different programs (GUI) in AppleScript. The obvious solution is PyObjC and its ScriptingBridge framework (wrapp …

Last updated: January 27, 2021

Microsoft Outlook: download pictures

February 12, 2020  |  tools, programming, macos

I am currently on my Mac using the Microsoft Outlook application for email. For a lot of reasons, I have turned off automatically download pictures from the Internet (see Preferences→Reading→Security). But sometimes, I want to see the pictures included in the email message I am reading. I can push the button Download pictures to see them. However, I prefer to use the keyboard. I have not found a …

Last updated: February 12, 2020

How to create macOS Keyboard shortcuts to sub-menus

January 31, 2020  |  macos

In macOS, it is easy to create new keyboard shortcuts to a menu item. Just go to System Preferences → Keyboard → Shortcuts, select App Shortcuts, press the plus button, select application (or All Applications), type in the menu title of the menu item, and choose a keyboard shortcut:

macOs menu keyboard shortcuts

The menu title can be from a sub-menu item. However, if you have more than one sub-menu item with the same title, …

Last updated: January 31, 2020

Including source code in this blog

January 31, 2020  |  publ, programming, macos, web

I write these blog posts with MarsEdit. And, while I am writing, I preview the blog post with Marked 2 (start Marked 2 and choose Preview → MarsEdit Preview from the menu). And since my writing usually is about programming, the blog posts might contain source code. My approach is similar to how I include source code in papers, and I was writing about it back in 2015. So this is an update on how I …

Last updated: January 31, 2020