Automation script for Mac 43 folders Desktop

I wrote an extremely simple AppleScript to create a 43 Folders setup on my Desktop, wherein I can put a file away for now and have it show up again automatically on a given day in the future. The script assumes there’s a folder named “43 Folders” on the Desktop, containing folders named with the following date convention: 20200704 for July 4th, 2020.

Picture of AppleScript

Then I used “Poor Man’s Cron” to automate this every morning: save the script as an application, store in ~/Applications, and launch it with a repeating event in my calendar every morning at 8 AM. Note: you’ll have to manually launch the app once the first time, in order to tell the Finder that it’s okay to run the app, and that the app has permissions to do the things it wants to do.

On the to-do list is to add a few lines of code to make the folders into the friendlier “2020-07-04” format, which I’ll post here when I get around to it.

Process 43

Jeff’s iPhone organizing strategy

I’ve just finished reading Tonya’s TidBITS article with tips on how to find iOS apps on an iPhone or iPod touch, and it inspired me to write up my own strategy.

Voila, my home screen. Or to put it more accurately, my display of secondmost important apps (with a few exceptions). The most important apps are in the Dock at the bottom, where I’ve put folders to make up for the fact that the Dock only has four spaces.

How to make a folder in the Dock: you can’t. But you can make a folder on any homescreen and drag it to the Dock.

Right now I have two folders there: Desk and Social. Desk roughly corresponds to “apps that do stuff I’d do on my Mac”: Mail, Safari, time logging, etc. Social is Twitter, Facebook, and a half-dozen others, and gets marquee treatment on the iPod because it’s my primary way of checking into such things. Music and Settings get their own places because I’m in and out of there all the time—and Apple, please please please give us a brightness slider shortcut in iOS 6? Kthx.

Above the fold: the apps I want quickest access to, and/or the apps where I want to see their badge icons at all times—and OmniFocus, I’m looking at you, kid. Apps get moved on and off the homescreen regularly based on how often I’m using them. For example, I’m giving Evernote another kick in the tires, so it’ll probably replace Voice Memos on the homescreen for a while.

You may have noted from the number of dots that I have quite a few pages in my Springboard. So let’s see what those look like….

Hmmm. Those aren’t organized at all! It’s almost as if Jeff has…

Yup. Alphabetical order. iOS makes this a pain in the butt; on my Android, there’s a one-click “alphabetical ordering” feature. But if it’s not on the homescreen, I don’t file it, folder it, or move it. Alphabetical by name so it’s easy to find. Every few months I take off the apps I’ve stopped using.

Let’s look at the last screen.We come to the end of the alphabetized list (and thank you, Zynga, for making that so easy to notice). Then there’s a blank placeholder app…

A what? How the hell did you do that?

…one sec, I’ll come back to that. After that are all of the apps I’m currently “testing”. I.e., these were downloaded for an article I’m writing, or are on my “check this out someday” list. If I decide to keep it, I alphabetize it. If it might be really useful, I’ll give it a shot on my homescreen.

As for the “blank” app, it’s a Safari bookmark. Open Safari, go to the URL about:blank (yes, Virginia, that is a URL), then tap the bookmark icon and save it to your homescreen. Give it a name of “.” or something else small and unobtrusive. Voila, blank app. Accidentally tap it, and you’ll just get a blank webpage, useful as a flashlight.

Blank apps are also very useful for an iOS annoyance. Move or delete an app on a full screen, and you’ll get 15 apps and a blank space like the puzzle on System 7. Worse: install a new app, and it might be randomly slotted here instead of on the last screen. Fill in the gap with another blank icon, and you’re good to go.

I sometimes have two homescreens (i.e.: 16 spaces on the primary homescreen, then swipe left for the next 16 apps and folders) before I go to the alphabetical list, but the folders layout I’m using now seems to work better.

Selectric sounds for Typewriter Keyboard

I’m giving Typewriter Keyboard another go on my Mac, and I decided that it just had to have a Selectric sound set. So here it is.

Oddly enough, I actually think I’m a little bit faster using the default sound set. But I think my typing is better with either sound set than it is without the auditory feedback. I’ll have to take some typing tests and see if I’m actually right, or if it’s all perception.

Download Selectric soundset (zipped mp3)

Playing with Snow Leopard and QuickTime X

New features on demo: new QuickTime Player interface, screen recording, new AppleScript Editor (tag completion and new formatting), integrated upload to YouTube, and overall spiffy speed. This is on a 3-year-old MacBook, but I did have to use an external drive to get this performance.

Note that QuickTime is both playing the videos and writing them to disk. Framerates and number of videos I can play both go up when I’m not bothering to record.

More Macintosh FUD

George Ou has an anonymously sourced scare article up, claiming that, “OMG, your Mac can be destroyed by evil gremlins living in your keyboard!”

Personally, I think this attack as described is ludicrous; here’s the reply I posted to Dave Farber’s IP list:

George Ou does not exactly have the sort of standing credibility on Mac issues which would allow him to get away with an anonymously-sourced attack. I can’t say that this attack is impossible, but here’s my initial take on the article referenced:

1) “The researcher explained that he goes by the name “K. Chen” because he feared harassment from staunch Apple fans who actually believe those Mac versus PC security commercials.” Ou’s implied ridicule of such people does not exactly support the contention that his views are unbiased — and I’d wager that 90% of said group gathered that impression long before the commercials were aired, mostly from first- and second-hand experience.

2) “I had Mr. Chen demonstrate his possessed keyboard on my computer.” This and other references in the article implies a firmware hack, which says nothing about the vector for getting the hacked firmware onto the keyboard. Yes, I’m willing to gather that there are many security flaws which can be exposed by someone who can arbitrarily connect hardware to your computer — but this would be considered a low-probability threat.

3) “To infect your keyboard, the attacker only needs to exploit one of the many weaknesses in Mac OS X and Apple applications.” I’m aware of no security flaws which would allow installing new keyboard firmware (that is, without already having root-level access to the Mac), and further, I’d love to see a list of the “many weaknesses” in OS X and Apple applications. (Does Apple publish many applications for OS 9? System 7?) There aren’t any issues I’m actively tracking for my clients that aren’t related to Flash and Java — and those have been patched.

4) “This type of attack which is resilient against a full hard drive wipe is considered the holy grail of computer hacking because the hardware has been infected.” The holy grail of computer hacking is a rootkit which the user is not aware of — infinite use of the targeted computer is better than one which the user is actively trying countermeasures.

5) “The cleaner solution Mr. Chen is proposing is that Apple should simply lock the Keyboard firmware from any future modifications since the keyboard doesn’t implement any digital signature protection.” Which would likely kill the aftermarket for 3rd-party keyboards (and perhaps other USB devices), and would expose Apple to a great deal of user blowback that they were implementing an iPhone closed ecosystem on the Mac. If Mr. Chen’s analysis is as good as his hacking, I’m even less worried about this threat. If I had any idea who Mr. Chen was, I’d be able to confirm this myself.

In short — Ou is a known yahoo, and this strikes me as more FUD. I’ll believe this when I see confirmation from a respectable source.

OS X 10.5.7 fixes programmatic keyboard issue

A note for anyone who is Googling to see if the OS X 10.5.7 update fixes keyboard mapping problems introduced with 10.5.6 and non-US QWERTY keyboards, including using the System Events keystroke command, or various weirdnesses involving Microsoft Office:

Yes, Virginia, 10.5.7 is once again safe for your Dvorak keyboard and AppleScript macros.

tell application "TextEdit" to activate

tell application "System Events"
	tell process "TextEdit"
		keystroke "testing"
	end tell
end tell

--10.5.6: y.oycbi
--10.5.7: testing

Fixing an Airport which won’t turn on

I discovered this morning that it is possible for a human being to have a kernel panic, when I realized that it was impossible to turn on the Airport in my MacBook. Both the icon in the menu bar, and the UI in the Network preference pane, showed “Airport off” regardless of how often I said, “turn on, dammit.” More disturbingly, this happened without the ghost of an error log in the Console.

Here’s documentation on how I fixed it, for those of you who are Googling the same problem (and presumably have borrowed another computer in a mild state of panic):

  1. Shut down your computer. Leave it off for a few minutes. If you want to be truly paranoid, remove the AC power and battery. Voltage weirdnesses can sometimes mess with the little minds of computer chips.
  2. Hold down Command-Option-P-R, and wait for four startup chimes before proceeding. Yes, you are resetting the parameter RAM, the ancient cure-all of all problems Macintological. This three-finger salute is not nearly as useful as it used to be under Systems 7 through 9, but it can still be a magic wand sometimes.
  3. Log in as a different user on your Mac. If this fixes the problem, then the problem is a corrupted setting somewhere in your primary user preferences.
  4. Finally — and this is what fixed it for me — go to /Library/Preferences/SystemConfiguration, and drag the entire SystemConfiguration folder to your Desktop. (The /Library is the one at the top of your hard drive, not the one in your user folder just before Movies.) This blows out your entire saved network preferences, and apparently was where I had a corrupted setting.

If you make it as far as the last step, you’ll need to re-enter all of your wireless passwords… which is probably better than a dead wifi card making all those stored passwords moot.

Use iTunes DJ with ratings-based smart playlists

Song ratings are one of the best ways to organize your music and podcast collection. In fact, they’re the only way to organize your collection if you want to use your iPod as a control device, because ratings are the only song data you can set on-the-fly.

The trick is not to think of 5 stars as necessarily “better” than 3 stars; more importantly, the number of stars can be used as a categorization. I have an extensive system I use, which I’ll document in another post. For now, a trick you can use with iTunes DJ (known until yesterday as Party Shuffle) to improve an iTunes bad behavior.

One of the ways I keep track of which songs I’ve recently added to iTunes is that they have no rating. So I have an “Inbox Sampler” playlist which, among other things, shows me unrated songs so I can decide what to do with them. The problem is that if you’re listening to this playlist and you decide to actually rate a song, it disappears from the playlist and the music stops playing. It’s a bit disruptive to the workflow when the music stops.

The winning alternative: set iTunes DJ or Party Shuffle to use the Smart Playlist as the source. You can then set ratings as you wish, with no interruption.

How to solve slowdowns

Solved an email problem tonight which has been driving me nuts, documenting it here so the Google spiders can get this solution to other sufferers.

Symptoms: Mac OS X takes a very long time to download new messages, and while a download is occurring, windows become temporarily unresponsive to clicks and keystrokes. (E.g., clicking another account takes a minute or longer before it appears in the window.) Download time is increased, apparently geometrically, when multiple accounts are checked or when a single account has many messages waiting. Activity window seems to spend a lot of time on “routing messages” and “processing mail rules” even when there are no rules to process.

Useless fixes: the usual cure-all for a slowdown, rebuilding the database through message import by deleting the Envelope Index, doesn’t do diddly. Likewise the more drastic solution of moving ~/Library/Mail and reimporting the entire kaboodle. Ditto deleting all of the mail rules. Ditto deleting all of the plug-ins from the Mail library Bundles folder.

Actual fix: removing GrowlMail.mailbundle and ProxiMail.mailbundle from /Library/Mail/Bundles. Yes, Virginia, you have a system-level Mail library, and plug-ins there will affect all users on your system, despite being off in a dusty corner of your Mac OS where angels fear to tread. (I’m very glad I didn’t bother trying a mail import from a new account.)

In fairness, both of these bundles will Attempt to Do Something upon the receipt of any incoming message, so I have no idea which of these is the culprit. The other is probably blameless. Or maybe they’ve been beating up on each other and that’s the problem. Someday I will attempt to determine what went wrong here; in the meantime I’ll rest on the laurels of a bug well stomped.

On recent Mac security issues

There are now two ways to crack a Mac login password that are in the wild, and before any of the usual suspects start to crow about how Macs are now as totally insecure as Windows has always been, I thought a quick note was in order. So, a few observations:

  1. Yes, these are serious attacks.
  2. However, both require physical access to your Mac. If you can prevent anyone from laying hands on your keyboard, you’re in no greater danger.
  3. Physical access to your Mac has always been a security hole. Anyone with a Mac system restore DVD can use it to change your passwords without knowing your existing password.
  4. Therefore, this makes not one iota of difference to your data security in the event of laptop or desktop theft. Savvy thieves or fences can get your data, and the DVD trick is far easier than the RAM extraction methods.
  5. You can thwart thieves in the event of theft by using FileVault. If you don’t want to use FileVault, you can create secure disk images using Disk Utility and store secure data there. (This is what I do.)
  6. The RAM extraction method listed above will thwart FileVault, however. If this is a concern, use Disk Utility images and a different password for encrypting them.
  7. There is a foolproof method that stops both of the above: shut down your computer, and leave it off for a few minutes before surrendering it to other people. Or before having it stolen, if you have such foresight. You can do this whenever you move your laptop if you want to be paranoid, or just before you encounter people you have no reason to trust, such as a TSA checkpoint.

I’m in agreement that Apple should fix the new issue asap, although I don’t see physical-access attacks to be nearly the concern that network attacks are.


Do you need to fix an out-of-warranty iBook logic board? Have you tried setting fire to it?

It’s a good thing I have promised to use my powers only for good, because this kernel panic hack is the most evil thing I’ve ever seen.

Fantastic spoof of the iPhone: the Microsoft oPhone.

I’m currently kicking the tires on the freeware, opensource Seashore image editor. Since many recent purchasers of Macs get Graphic Converter for free, I’m not yet convinced how useful this will be, but as a subset of the GIMP it has promise even before I unwrap the package.

Focusing the script menu for keyboard input

Here’s a small but very useful trick if you’ve populated your AppleScript menu with dozens of useful doodads. Many of my scripts are more in the character of macros—quick procedures that duplicate a few manual steps so I don’t have to point-and-click in several places. The problem I had is that it briefly interrupts my workflow to mouse up to the AppleScript menu and then find the script I want hierarchically.

Picture 11.pngWith Quicksilver or another launcher utility, of course, you can assign keystrokes to whatever you like, but that raises the problem of remembering which keystroke goes to what.

So I came up with this instead. I’ve assigned the following AppleScript to be a Quicksilver trigger (using Command-F12):

tell application “System Events”

tell process “SystemUIServer”

click at {1105, 11}

end tell

end tell


If you’re wondering, {1105, 11} are the X/Y coordinates of my AppleScript menu. I’d be happy to tell you yours, but that depends on both the size of your monitor and where you’ve stashed the menu icon. The 11 coordinate—vertical distance from the top—is going to be the same on your Mac, at least until Leopard comes along and gives us resizable menu bars. You can find your horizontal coordinate the same way I found mine–fiddling with the X number and seeing what gets clicked on when you run the script.

So I hit Command-F12, and down comes the menu. Then I can use the keyboard to navigate; type a few letters to highlight a category, right-arrow for the script list, boom. If I’ve stashed a script in the Applications submenu (at the bottom in the picture above; these scripts live in ~/Library/Scripts/Applications/exact_app_name instead of ~/Library/Scripts/Category_name/), then I can keyboard to them directly without a submenu.

Picture 21.png

Example: I want to run that Image scaling script, so I type Command-F12, “IM”, right-arrow. Or I want to Noguchi my Desktop (more on that in a later post), so that’s Command-F12, “NO”.

On my secondary G4, I only have about a half-dozen scripts total, so this is overkill there. But if you’ve more than that installed, then give this a shot.

Running Mac software on Macs

With all the hoohah about Boot Camp and Windows on Mac, I’m amused as heck by this discussion that shows how frickin’ difficult it is to run Mac software earlier than OS X on an Intel Mac.

‘Course, I haven’t had the need to run Mac OS 9 or earlier software since well before I upgraded to Tiger last April, so I doubt many people need to do this — and if you do, chances are good that you’ve got an old PowerPC Mac lying around for the purpose. But just in case you need it, have fun with your ROM files.

AppleScripting a team of monkeys to jump on your pillow

So let’s say it’s 3 AM, and you’ve got an important meeting in, oh, 6 hours, and you don’t quite trust yourself to wake up when the alarm goes off.

Voila. An AppleScript that will bide its time for a while, and then will tell you loudly, over and over, to get your ass out of bed. The voice changes randomly to prevent you from somnambulantly acclimating to it before the higher brain functions kick in.


team of