Applescript to periodically raise unsent Outlook replies to the foreground

I've had a particular problem starting replies in Outlook for Mac and then losing track of them or forgetting about them.

This script is a fairly naive attempt at having such replies raised to the foreground. It doesn't distinguish between a reply you're reading and one you're writing. It also won't notice email that you're composing that *doesn't* have a 'Re:' as the start of the title. I imagine there's a window property that I can look for to select those, I just didn't want to go there yet.

The script also unintelligently repeats every 60 seconds, which I figure is better than leaving an email unsent for 2 hours.

I'm publishing updates to my "applefritters" project on GitHub if you want to keep up with further improvements to this script.

repeat
	tell application "System Events"
		tell process "Microsoft Outlook"
			repeat with aWindow in (get every window)
				set aName to get the name of aWindow
				set initialName to ((characters 1 through 3 of aName) as string)
				if (initialName = "Re:") then
					tell application "Microsoft Outlook"
						activate
					end tell
					activate aWindow
					set frontmost to true
					perform action "AXRaise" of aWindow
					exit repeat -- only activate one window
				end if
			end repeat
		end tell
	end tell
	delay 60
end repeat

Dollar Shave Club (Executive) Review as a Gillette Mach 3 User

I decided to try the Dollar Shave Club Executive (6 blade) model for a month. The subscription for 4 blades per month is $9.

The initial shipment came with their own shave butter, which I tried for my first shave. The shave butter broke down too quickly for my skin and facial hair thickness, and didn't seem to do much for the shaving experience, but then again, I generally use a shave cream or hair conditioner while shaving.

The blade angles felt a bit too sparse--or maybe the space between them clogged too quickly, though I didn't notice that this was the case. My first shave attempt was on about 3 days growth, and felt spotty irritation in my skin and notices several patches that had clearly been shaved, but had not been shaved particularly closely.

On my second shave attempt on about 2 days growth, I used my Gillette Sensitive Skin to try and alleviate the irritation and possibly get a bit closer with the shave. After shaving, I had a lot of spots in my facial hair that were about a half day's worth of growth in length. Whether using the shave butter or my Gillette Sensitive Skin shaving cream, I experienced a small amount of irritation--not as much as a cheap disposable, but a little more than the Schick Quattro.

The closeness of the shave is ultimately as close as the Quattro, but with noticeably more irritation.

For comparison:

  • I use the base Gillette Mach 3 razor normally, usually with the Gillette Sensitive Skin shaving cream.
  • I generally shave twice a week, partly because my skin is too sensitive if I shave more frequently than that.
  • I have sparse and uneven facial hair.
  • Dollar store and disposable Bic razors break the skin for me.
  • The Schick Quattro razor didn't irritate the skin any more than my Mach 3, but the shave isn't that close for me.
  • Electric razors turn my skin red with irritation.

Hope this helps you decide if Dollar Shave is an option for you. Interestingly enough, the Executive blades are $2.25 per cartridge vs. the Gillette Mach3 Base Cartridges 15 Count(Amazon associates link) per-cartridge price of about $2.06 per cartridge.

Using a vimscript to run through a list of substitutions with dictionary pairs

I wanted to modify a test suite to call a method using ruby 2's keyword arguments. There were several calls to the same initialization function that followed a pattern that made it a good candidate for a series of `%s` calls using key-value pairs in a dictionary.

Interesting how vimscript uses a leading slash as line continuation instead of a trailing slash at the end of the continued line.

Also, it took me a while to figure out that interpolating a variable in an Ex command required "execute" and string concatenation with periods.

let fields = { 'public_key' : 'public_pem_key',
              \'private_key' : 'private_pem_key',
              \'username' : 'username',
              \'password' : 'password',
              \'url' : 'url',
              \'ssl_verify_host' : 'ssl_verify_host'
            \}
 
for key in keys(fields)
  execute '%s//\1' . key . ': \2/'
endfor