Post

Replies

Boosts

Views

Activity

Reply to Make a Finder window open when a disk image mounts
I think I've got it. The Finder info of an old disk image that auto-opens its root directory: 00000000 00000000 00000002 00000000 00000000 00000000 5A156DD7 DA8B129A The Finder info of a newly created read-write disk image: 00000000 00000000 00000000 00000000 00000000 00000000 28F57114 97D99395 In both cases, the frOpenChain field (the 4 bytes starting at offset 20) is zero, so that doesn't seem to be what's used for this purpose. One clear difference between the two is the frLocation.v field, the 2 bytes at offset 10. That appears to be the iNode number of the folder you want to open as a Finder window, represented as a bigendian 16-bit number. Setting that does seem to do what I want!
Jun ’24
Reply to Shutdown event in macOS
The documentation of NSWorkspaceWillPowerOffNotification says To receive this notification, use notificationCenter to register for it. If you use a different notification center to register, you won’t receive the notification. That is, when you add the observer, you need to use NSWorkspace.notificationCenter instead of NotificationCenter.default.
May ’24