Sunday, October 12, 2008

Toggle grayscale display on OS X with this AppleScript

I was looking for something that would give my mother a few more months of computer use. The OS X grayscale accessibility option looked interesting, but there's no keyboard shortcut for this option.

I thought I could record an AppleScript shortcut, but the accessibility pane is not scriptable. (Apple had, I think, a reasonable accessibility record with Mac Classic, but they tossed that out with OS X. They've been notably half-hearted for years, but some recent threats from Massachusetts may inspire future improvements.).

Apple recommends using System Events, but that's way beyond my limited AppleScript skills. I've made several stabs at figuring out AppleScript, but the damned language just annoys me. I wish they'd deprecate the original and adopt Python's syntax, scoping, etc.

But I digress.

Baltwo, a generous Apple forum poster [1], has written a post with the AppleScript System Events script I was looking for. It works in 10.5.5 ...
Apple - Support - Discussions - Keyboard shortcut to switch between ...

tell application 'System Preferences' to activate
delay 1
tell application 'System Events'
tell process 'System Preferences'
click the menu item 'Universal Access' of the menu 'View' of menu bar 1
click the radio button 'Seeing' of the first tab group of window 'Universal Access'
click the checkbox 'Use grayscale' of tab group 1 of window 'Universal Access'
end tell
end tell
tell application 'System Preferences' to quit"
The script, of course, will break with significant UI changes to the Universal Access pain. It works for now, I'll test it out with 10.4.11 though I think some of the System Events scripting might require 10.5.

Apple has greatly improved their AppleScript support site by the way. I've thought for years that AppleScript would go the way of OS X Services, but it continues on.

[1] You can now "subscribe" to users, and I've "subscribed" to his posts. I wonder sometimes if these are real people, or pseudonyms for Apple employees. written a very large number of forum posts.

Reading in a dark room? A useful trick

My mother has macular degeneration, so I was experimenting with the OS X grayscale feature.

This is one of OS X's accessibility features. Grayscale is a secondary option for what's mislabeled as the "White on Black" display. In fact the option isn't "White on Black", it inverts pixels to produce a negative image. So, yes, text is white on a black background, but colors are inverted to.

The default normal setting is "Black on White". You switch to grayscale with a checkbox. The alternate setting is "White on Black", which can also be switched to grayscale.

It's a bit of weird UI, and there's no keyboard shortcut for the grayscale option. That's a shame, as I suspect being able to toggle the standard display to grayscale would be more useful than the color inversion option.

There's a keyboard option for the inversion though. The default is "Command-Option-Control-8", though like all OS kb options it's easy to change to another combination. I'm sure kids use this feature in the school computer lab all the time.

The tip for non-visually impaired persons is that either the grayscale or the Black on White option both grealy reduce screen light output, and probably reduce battery drain.

It also brings back memories of the pre-VGA days on the early PC, when grayscale displays were a big improvement on the Hercules Graphics Card output. I once worked ran Mac OS Classic 7 with a massive > 100 lb grayscale secondary display, running OS X this way puts me back in grad school ...

Saturday, October 11, 2008

Apple's Task Fiasco: iCal, Mail.app and the iPhone. It's got to be Jobs fault.

Back when I was patiently waiting for 10.5 to go from moderate disaster to worthwhile, I noted some curious behavior of Tasks in 10.5: What is a task and a note - OS X iCal/Mail/Gmail vs. Outlook vs. Claris Organizer.

From what I read then it semed 10.5 Mail.app was following an unusual Tasks/Notes behaviors last seen in Claris Organizer (later Palm Desktop), and that Mail.app was becoming a PIM without a Calendar.

Which is kind of weird, but I figured it would all make sense when I got 10.5.

Wrong.

First, a digression.

Millions of people use OS X. Lots of well regarded bloggers write about OS X. So how come I'm the only one to get worked up over Apple's astoundingly screwed up approach to Tasks? I mean, I Google to see if anyone else has noticed the problem and I come up with my own comments from before I had 10.5?!

Shades of the Truman Show.

Ok, back to the post.

I think there are still a few deluded people who think Apple is uniformly excellent.

I can cure them of that. Try this experiment with the very latest version of OS X 10.5.5.
  1. Create a task A in Mail.app. Notice that you cannot add a Note to it. Your "task" is a one liner.
  2. Create a note B in Mail.app. Notice that you can "promote" it to a Task ("C"). You will now have a Task C with a Note B [1]
  3. Switch to iCal.app. Look at Task C from Step 2. It doesn't have a Note in iCal. Add a note "D" in iCal to Task C.
  4. Switch back to Mail.app. You will see Task C with Note B, but you will not see Note D. If you hold your mouse over the task long enough you'll see a read-only view of the iCal Note.
  5. Paste plain text into a Mail.app Note. Observe the formatting -- particularly the multiple lines between paragraphs.
So both iCal and Mail.app have their own Task model, with some sort of synchronization of the titles but not the notes. iCal and Mail.app each have their own peculiar implementation of a Note associated with a Task.

I can't recall a comparable design screw-up in 20 years of lots of OSs and platforms.

So how did Apple botch this so badly, and how is this connected to the curious absence of tasks on the iPhone?

Here's my best guess. I don't usually pin Apple's glories or sins on Steve Jobs, but I'll make an exception this time. This has to be his fault.

This smells like a nasty collision between two powerful design teams, neither willing to compromise. When Jobs cares about something, he does seem to resolve these collisions. Obviously he didn't.

Jobs loves the iPhone. It has no tasks. That's another clue.

My guess is that Steve Jobs hates Task lists. He probably has some sort of trick memory and doesn't need them. Maybe it's his rebellion against the left brained world.

We aren't going to see Apple Tasks on the iPhone, or Tasks working on the desktop, until Jobs moves on from Apple.

In the meantime, I suggest
  1. Pretend Mail.app does not have tasks.
  2. Do not use the Mail.app feature that allows one to create a task linked to an email
  3. Do not create a task from a note in Mail.app
  4. Do feel free to use Notes in Mail.app if you can imagine any use to them.
If you've read this far, please submit feedback to Apple.
Maybe something like this:
Currently Mail and iCal both have a form of "Task" or "To Do" item, but they have different behaviors and Task notes are not shared. So a Task Note created in Mail cannot be read in iCal and vice-versa.

This is not what we expect from Apple. It is embarrassing.

Please integrate Tasks between iCal and Mail. Tasks should have identical attributes, features and Notes in both applications, and should sync with MobileMe and the iPhone.
PS. You can't delete Mail.app tasks, you can only complete them. Sigh.

Update: I found someone else who thinks Apple's implementation is cracked, but I don't think he got as far as sorting out the whacky Notes behavior.

OS X bug: Admin can't take ownership of a locked file

I just ran into a 10.4.11 bug. If I get a chance I'll see if it's fixed in 10.5.

If a regular user locks a file in a shared folder, an admin user cannot unlock it and they cannot change ownership or privileges. The file is inaccessible.

The useless error message is: "The operation could not completed. An unexpected error occurred (error code 120)."

You have to log in as the regular user, click get info on the file and uncheck the locked attribute. Then you can change permissions.

It's easy to see how this bug happened. The "Locked" attribute goes back to Mac Classic 6 -- if not earlier. So this is a collision between a very old access control mechanism and OS X privileges.

I wonder if even "root" can take control of this file.

The error message suggests Apple missed this one. I wonder if it was fixed in 10.5 ...

Friday, October 10, 2008

View Your Google Calendar in Outlook 2007

In theory one can subscribe to .ics (webcal in Microsoft's world) calendars using an obscure setting in Outlook 2007's mail data file options.

In practice, despite using Google's secret .ICS URL (no authentication required), and changing the URL from http to webcal, it didn't work. It seemed to work, but nothing happened and the next day the entry was gone.

This web page describes what didn't work, but the comment I'm quoting does work:
View Your Google Calendar in Outlook 2007 :: the How-To Geek

... I found the way to get around the 'cannot verify that the URL is a valid calendar' problem (for Google calendars, at least) was to:

1. paste the private URL for the ICS file into your browser (Firefox, in my case) location bar
2. change the http:// prefix to webcal://
3. hit enter
4. the browser should then offer to launch the external application (Outlook 2007) for you to handle this URL.
5. Follow the Outlook 2007 prompts and it should subscribe to the calendar ...
Comments are great. Thank you Daniel Pauly.

My guess is that some security fix broke the original function and Microsoft hasn't repaired it. I used IE 7 to do this (Daniel used Firefox), in my IE settings it assigns calendar handling to Outlook.

So now I can see my home calendar next to my work calendar. Not too bad, though not fabulous. Read only of course. If you sync your iPhone with Outlook 2007 this would be a good move towards work/home calendar integration.

BTW, you can't subscribe to a Microsoft Online Calendar from Google Calendar. It should work, but doesn't. Posts on this go back over a year in their Google Group. On the other hand, OS X iCal might be able to subscribe.

ICS is a lousy standard, or at least has been poorly implemented.

Reducing mobile phone spam

This PC World article was reprinted in the NYT: Put an end to cell-phone spam., by which they mean text message (SMS) spam.

It's solid. Links to AT&T services that can eliminate email to SMS, abilities to change your SMS identifiers, using spam filtering services, etc.

SMS is a real hack, a billion dollar industry built atop a phone service never intended for human use. Interesting business lesson there.

As a hack it has no defenses at all, and incoming spam costs money.

I think that's why the iPhone team isn't keen to support MMS or SMS -- it's aesthetically revolting and an endless font of costly spam.

So, good advice, but the real solution is to dump SMS.

Thursday, October 09, 2008

Toodledo iPhone vs. Appigo Todo.app

I have really appreciated Appigo's Todo.app combined with Toodledo's web service, despite some sync issues [1].

Now, however, there's a serious alternative. Toodledo has launched their own iPhone and iPod Touch client.

The Toodledo app should have a big advantage. The data model should be an exact match for the web site. Same fields, same allowed values (same data dictionary), etc. No funny mappings for priorities, no missing context fields, etc. One vendor to own the synchronization problem.

On the other hand, Appigo has an integrated Notebook app. Their app is mature and reliable, and I've worked around the data model issues. Their aesthetics are much better than Toodledo, and they're not tied to a single web service. If, heaven forfend, Google should ever add tasks to their calendar app, we know Appigo would be on it like flies on ... well .. .quickly anyway.

I think a newcomer could go either way. They're both pay apps, so price might sway some people. (Toodledo is cheaper.)

I'll stay with Todo.app for now -- it works and I like their Notebook.

Competition is good though.

[1] I think these are on Toodledo's side; I've found that transactions don't always complete as expected when I use their web GUI).