The iPhone X Notch – Catching on?

iPhone x

iPhone X  2017


Zune HD 2009



Will the iPhone X revive the Zune HD?





Maybe instead we’ll start to see notches in a few more places.




If you ever get tired of holding down a key or a combination of keys to make your Mac observe any of several modes or behaviors at startup, you might be interested in preparing a few keysinkers. For example, you could use a couple of keysinkers to boot into Recovery Mode while you go fetch a cup of coffee. You can readily construct keysinkers using cheap fishing tackle (line sinkers) and Sugru or Oogoo.

Just adapt the bottom of the sinker to give it a flat surface and make it lean enough to accommodate the angle of your particular keyboard’s surface. I’ve been able to compromise the angle so that my keysinkers can remain stable for different degrees of keyboard tilt.

Illustration of keysinkers on Mac keyboard keys



Droplet for How Long an App has been Running

The Robservatory blog featured a method for finding out how long an app has been running. Here’s the source for an AppleScript application that lets you drag and drop your running app’s icon to see that information. Put this script into an AppleScript Editor (currently known as “Script Editor“) document, then save it as an application. Don’t copy the line numbers. Be sure your app is running, then drag that app’s icon onto the new app you created.

Warning: If the running process of the app doesn’t have the same name as the app’s icon (excluding the “.app” extension, of course), the droplet won’t work.

Previously, I discovered a problem with some apps with longer names, and provided a revised version. Now I’ve added the ability to select an app icon in the Finder and launch this app from the Dock or the Script menu for those of you who might prefer not to drag your app icons.

on open the_item
	my build_answer(the_item)
end open

on run
	tell application "Finder"
		set the_item to get selection as string
	end tell
	set the_item to get the_item as alias
	my build_answer(the_item)
end run

on build_answer(the_item)
	--	tell me to activate
	set item_info to get info for the_item
	set _choice to characters 1 thru -5 of (displayed name of item_info) as string
		set _pids to paragraphs of (do shell script "/bin/ps -acxwwl")
		set ls to {}
		set ps to _choice
		repeat with _line in _pids
			if _line is "" or _line contains "TIME COMMAND" then
				set _pid to 2nd word of _line
				set s to last text item of _line
				set n to seventh word of _line
				if s is "t" then set s to "init"
				tid("     ")
				set _process to s
				set _ful to _pid & tab & n & tab & _process
				if _ful ends with ps then
					set end of ls to (_pid & tab & n & tab & _process) as string
				end if
			end if
		end repeat
		set _pit to item 1 of ls
		set _pid to word 1 of _pit
		set _uptime to (do shell script "ps -o etime= -p" & space & quoted form of _pid)
		set time_val to count words of _uptime
		set _secs to word time_val of _uptime
		set _mins to word (time_val - 1) of _uptime
		if (time_val - 2) > 0 then
			set _hours_string to ((time_val - 2) as string) & space & "hour(s)," & space
			set _hours_string to ""
		end if
		if (time_val - 3) > 0 then
			set _days_string to ((time_val - 3) as string) & space & "day(s)," & space
			set _days_string to ""
		end if
		display dialog "The" & space & _choice & space & "app has been running for" & space & _days_string & _hours_string & _mins & space & "minute(s)" & space & "and" & space & _secs & space & "second(s)." buttons {"OK"} default button 1
	on error
		display dialog "Something went wrong. Are you sure the app of the icon you dropped is really running?." buttons {"OK"} default button 1
	end try
end build_answer

on tid(s)
	set my text item delimiters to s
end tid

You can still remove annoying agreement prompts from Mac disk images (.dmg files)

I got tired of accepting agreement notices when opening distributed disk image (.dmg) files, so I created this script. It should work until certain people decide it shouldn’t. Create a MacOS Service using Automator with one Run AppleScript action, and make the service accept documents in Finder. Paste the following AppleScript into the Run AppleScript action and save. Here’s the shortest complete documentation I could find (written by Ben Waldie, an extremely proficient Mac automation enthusiast) that explains how to use Automator to quickly deploy AppleScripts as MacOS Services.

After you’ve added the MacOS Service, when you encounter a disk image that you’ve downloaded that wants you to agree to something before it opens, just click “disagree”, then launch the service from the contextual menu (right-click the disk image). After a few seconds (depending on the size of the image), you can double-click it and it will open with no further nagging.

property temppath : "/private/tmp/"

on run {input}

 (* Your script goes here *)
 repeat with the_item in input
 end repeat
end run

on build_archive(the_item)
 --repeat with the_item in the_items
 set the_item to the_item as alias
 tell application "Finder"
 set sost to ((container of file (the_item as string)) as alias) as string
 end tell
 set sost to POSIX path of sost
 on error therrr
 log therrr
 display dialog therrr
 set sost to "/Volumes/"
 end try
 set this_filepath to (the_item as string)

 if last character of this_filepath is ":" then
 tell me to set it_is_a_folder to true
 set it_is_a_folder to false
 end if
 if not it_is_a_folder then
 set thesourcename to (name of (info for the_item))
 set the_source_file to POSIX path of this_filepath
 set pos_filepath to sost
 --set thesourcename to replace_chars(thesourcename, " ", "_")
 set dest_file to (quoted form of (temppath & thesourcename))
 set tempname to ((characters 1 thru -5 of thesourcename) & "temp")
 set my_command to "hdiutil convert -format UDRW" & space & (quoted form of the_source_file) & space & "-o" & space & (quoted form of (temppath & tempname))
 do shell script my_command
 set my_2nd_command to "hdiutil convert" & space & (quoted form of (temppath & tempname & ".dmg")) & space & "-format UDZO -imagekey zlib-level=9 -o" & space & (quoted form of (temppath & thesourcename))
 do shell script my_2nd_command
 do shell script "rm" & space & (quoted form of (temppath & tempname & ".dmg"))
 on error onerr
 display dialog onerr
 end try

 if pos_filepath is "/Volumes/" then
 set pos_filepath to (POSIX path of (path to desktop folder))
 end if
 set targdetect to (pos_filepath & thesourcename)
 set name_target to alias (POSIX file targdetect)
 --use this instead of above to prevent overwriting your original disk image: set finishname to "_recomp"
 set finishname to ""
 set thesourcename to (((characters 1 thru -5 of thesourcename) & finishname) as Unicode text)
 tell me to do shell script "ditto -rsrcFork" & space & dest_file & space & "\"" & (pos_filepath & thesourcename) & ".dmg" & "\""
 end if
 do shell script "rm" & space & dest_file
 end try
 --end repeat
end build_archive

Fix Home Folder Permissions

Here’s an AppleScript to help you regain control of your user home folder if permissions have been corrupted by performing certain actions such as installing software that doesn’t respect proper home folder permissions or by drag copying items when the current context for maintaining proper permissions is incorrect. Symptoms of this problem can range from not being able to see on the desktop items that are known to exist in the Desktop folder or not being able to move icons for desktop items to being unable to copy or move items inside the home folder.

The current user account must be an admin account when the script is used. If the account needing repair is not currently an admin account, you can use the Users & Groups prefpane to make it an admin account temporarily to run the script (providing, of course, that you have access to an admin account).

set username to do shell script "id -un"

do shell script "chown -R" & space & username & space & "~;chmod -RN ~;chmod -R o-w ~;chmod +a \"everyone deny delete\" ~/ ~/Desktop ~/Documents ~/Downloads ~/Library ~/Movies ~/Music ~/Pictures ~/Public ~/Sites;chmod +a \"" & username & space & "allow list,add_file,search,delete,add_subdirectory," &  "delete_child,readattr,writeattr,readextattr," &  "writeextattr,readsecurity,writesecurity,chown,file_inherit," & "directory_inherit\" ~/Public/Drop\\ Box" with administrator privileges


Login Items List

This is an AppleScript to give you control over your Mac user login items. They are the items displayed when you open System Preferences>Users & Groups>Login items (your user must be selected at the left in the Users & Groups prefpane).

Copy and paste the text on the right side in the text block below into an empty document window of Script Editor or AppleScript Editor on your Mac system. This script has worked since Mac OS X 10.3 Panther and I still use it in MacOS 10.12.5 Sierra.

Run the script.

Select one or more login items from the list and click OK.

Choose whether to reveal the login item in the Finder or to remove it from the current login items. (Tip: try revealing one or more login items first and if you don’t really want them removed after you test removing, just open login items in the Users & Groups System prefpane and drag them back in there!)

tell application "System Events"
set loginItems to name of every login item
choose from list loginItems with multiple selections allowed
end tell
set theResult to result
if theResult is false then
tell me to quit
if (count of items of theResult) is not 0 then
if (count of items of theResult) is 1 then
display dialog "What do you want to do with" & ¬
space & every item of theResult & "?" buttons ¬
{"Cancel", "Reveal it", "Remove it"}
display dialog "What do you want to do with
the selected login items?" buttons ¬
{"Cancel", "Reveal them", "Remove them"}
end if
if button returned of result contains "Remove" then
repeat with i in theResult
tell application "System Events"
delete (every login item whose name is (i as text))
end tell
end repeat
set this_user to (do shell script "id -un")
do shell script "killall -u" & space & this_user & space & "cfprefsd"
do shell script "killall -u root cfprefsd" with administrator privileges
else if button returned of result contains "Reveal" then
repeat with i in theResult
tell application "System Events"
set loginitempaths to (get the path of every login item)
repeat with loginitempath in loginitempaths
if loginitempath contains (i as text) then
set g to (loginitempath as text)
end if
end repeat
end tell
set actual_Path to POSIX file g
tell application "Finder"
reveal (actual_Path as text)
end tell
end repeat
end if
end if
end if

Mallet Finger Injury – Two Years Later

When I sought medical attention for a mallet finger injury two years ago, what I learned was that I shouldn’t expect the affected finger ever to be exactly the same again. While that may be technically true, I was able to recover well enough that only very slight evidence of the injury remains, evidence that would only be detectable under very close examination. I’m convinced that the reason I recovered so well is that I took the initiative to build my treatment around my own design and method for making a custom splint.

The generic splint prescribed for me was too big and very difficult to keep fitted. It made the finger protrude enough past normal length that the finger was entirely unusable and the use of the entire hand was adversely affected.

To make a more effective, comfortable splint, I used a modeling material called InstaMorph, which can be heated to a temperature of 150° farenheit in water to allow it to become moldable. I then wrapped the warm pliable material around my finger and molded it to immobilize the affected joint only, and to support the fingertip while leaving it exposed, allowing me to use it for typing, etc. Of course it took a few tries, but once it felt right, I was able to wear it for the duration of the recommended splinted recovery time, both day and night, about 8 weeks. If my finger felt loose in the splint or I felt that it had accumulated too much dirt during the period, I simply discarded it and made another using more InstaMorph. I think I may have gone through 3 or 4 generations.

The goal of the design for the fingertip support point of the splint is that the joint be stretched slightly more backward than for a normal straight resting position for the joint. But it’s not necessary to bend the joint backwards far enough to make it uncomfortable. It’s possible to achieve this goal by realigning the fingertip support point while the InstaMorph is still somewhat pliable. That means removing the splint during the formation process and changing the shape slightly before it cools enough to become entirely rigid. Removing the splint before it becomes rigid during the formation process also ensures that the splint isn’t molded tightly enough to make it difficult to remove or to constrict the finger enough to adversely affect blood flow.

It’s important not to allow the affected joint to bend even once during the eight weeks, and wearing the splint, although removing it was easy, helped me achieve that goal. Along with exercises which consisted only of spreading and backward arching of all the fingers on the affected hand to the maximum possible position, the treatment has proved quite effective. After the eight weeks had passed, there was some residual feeling of weakness in the joint that lasted for a couple more months. However, during that time, I simply reapplied the splint temporarily whenever I became aware of the weak sensation in the joint, or when I considered that my activities might be increasing the likelihood of re-injury. The orthopedic surgeon who treated me was impressed enough to ask my permission to photograph the splint. The included photos that I took myself illustrate the overall design concept for the homemade splint.