Archive for March, 2008

Fetch New Mail.app Messages from Your Phone

Thursday, March 13th, 2008

retrieve emailsThis post is intended for people with mobile phones that don’t have Internet access, but can receive emails in the form of text messages. You will also be interested in this post if you’ve had problems with Mail.app rules in Leopard.

Need to check for new messages in Mail.app from your stone-age mobile phone? No problem. Send yoursef an email with a preset subject like “MsgFetch” and your unread emails received that day will be forwarded to your phone. This way you don’t always forward to your phone, burning up all your text messages.

The script will append the sender name into the subject so it’s easy to glance at your phone and see who sent each message - since they’re all forwarded from your email address. The messages are marked as read in Mail.app so they won’t be resent if you issue another request later.

One more thing: This solution also gets around a problem with rules in Mail.app under Leopard. It seems that scripts called by a rule won’t generate a new mail message, which is something this script needs to do.

Instead of relying on the rules of Mail.app, the rule processing is baked into the Applescript. By setting the script to run on a periodic basis we can test for trigger emails in the inbox.

How do you get the script to run periodically? You can have iCal do it. Or you could use something like Lingon to configure launchd, which handles scheduled tasks in Leopard. This post has a screencast that covers Lingon.

You could also create a shell script that kicks off your Applescript, or a group of Applescripts for that matter. The shell script would look something like this:

osascript <path to script file>/ <script file>

or

osascript ~/Documents/scripts/mailforwarder.scpt

You can download the Applescript and read the in-line comments explaining how it works. But let’s take a quick look at two excerpts from the Applescript:

The first part of the script handles what a Mail.app rule would normally cover. Since rules aren’t working as expected the Applescript handles that duty by looking for an unread email with MsgFetch in the subject. If there is such a message the script calls a subroutine ( a chunk of script) called mail_forwarder.


The other part we’ll look at is located within the mail_forwarder subroutine. It finds the emails that arrived today. The next part, not shown here, checks to see if the message has been read.



The rest of the script has been covered in other Murphy Mac posts. It’s the part that creates and sends the mail message. Murphy’s posts on mailing files from Finder and retrieving files by email both create and send mail messages using Applescript. The Finder post has a screencast that goes with it.

Related posts:

Using Lingon

Creating a shell script

Other tricks with Mail: Pick a Playlist by Email - Retrieve a File by Email - Mail a File Dropped in a Finder Folder

Download Applescript

The Genius Bar

Sunday, March 9th, 2008

Genius Bar

For the Genius Bar and its resident experts criticism runs rampant. They’re abrubt, unhelpful. Rude. Or are they? Could it be they’re doing a nearly impossible job the only way it can be done?

A memorable nerd moment from Sex and the City: Carrie’s Mac needs repairs. She tells the technician her boyfriend tried Control+Alt+Del to fix the problem. “That’s PC only,” the blunt techie tells her, nodding dismissively at the boyfriend. “You’re not compatible.”

The Geniuses behind the Genius Bar deal with incompatible customers day after day. Customers new to Apple products. Customers who know little about computers or the software they can’t comprehend. The troubled customers know they need help, but like many computer users they don’t speak the language of the experts. The frustration begins.

A common complaint about Geniuses: They’re aloof. It might look that way. But take a step back and look at what the Genius is doing at that very moment. She might be troubleshooting an iMac that won’t boot. A pair of Macbooks on the counter behind her could be transferring data for someone getting a replacement. A customer she’s already assisted could be signing paperwork she’ll need to file.

I would find this job challenging. If my wife asked me where the car keys were while I was troubleshooting a wi-fi problem I might answer, “Just mustard please.” In other words, while you’re explaining your iPod’s illness to the Genius he may be nudging a Mac through some diagnostic procedures. The Bar is covered with Macs and iPods that all look the same - - but the Genius is keeping them straight. You might be offended that you don’t have the full attention of the Genius. Frankly, that’s probably the way it has to be.

When I first saw the scene with Carrie and the blunt technician I thought only in New York. There was an endless line of customers waiting for a mere minute of face time at a folding table with a merciless repairman. If he was rude they’d take it, they needed their computers fixed. Now.

Here, in Charlotte people might not be used to the coldly efficient blunt tactics. Truth be told, there’s really no time to do it any other way. Apple can’t afford to have a dozen Geniuses manning the Bar at all times, soothing customers and making small talk. Not at South Park Mall. A Genius needs to help quite a few people each hour to earn his keep. Let’s take a closer look at customers the Genius might be juggling.

Someone with Apple gear still under warranty is highly likely to visit the Genius Bar. Customers with products protected by Applecare too. For these customers satisfaction is mandatory. The Geniuses are delivering on an obligation, their necessity clearly visible for the Cupertino bean-counters to reconcile.

But the Genius Bar isn’t just for people under warranty and Applecare. Your four-year-old iPod won’t sync? The Genius might reset the iPod for you. She might update the firmware while you dine on food court Chinese. That’s not an obligation, it’s good will, good publicity - and good business.

Can you name a computer vendor with this kind of accessibility? Does HP offer tech support in your mall? I’ve sung the praises of IBM for shipping me a box so I can overnight my Thinkpad to Texas. Apple is providing something far more useful with their growing retail presence. Let’s look at another example.

If your laptop’s ac adapter went on the blink what would you do? In all likelihood you can’t get a replacement at your local Circuit City. You’ll have to order one on the Internet. A day or two later when the replacement arrives it doesn’t work. Turns out it’s something in your laptop, not the adapter at all. Now you have to get an RMA, return the adapter you bought, and you’re still at square one for getting your laptop working.

If you’re lucky enough to have a Mac and a nearby Genius Bar the process is considerably better. Bring your Mac to the store. They’ll plug an adapter in. If it works they’ll give it to you. If your warranty is up they still might give it to you- that actually happened to me. Worst case, you buy one and your Mac is up and running the same day.

A recent comment thread on a well-read Apple enthusiast site suggested the Geniuses don’t know much. That’s far from my experience. I’ve got certifications galore from Microsoft as a former MCSE. I’ve got years and years of consulting and corporate IT experience - I know when someone knows what they’re talking about.

Here’s the thing about the Geniuses: It’s not just Macs. It’s iPods. It’s OS X and iPhones. Apple is on a far more aggressive upgrade cycle than Microsoft. iPods are frequently refreshed. Every upgrade and refresh changes the rules, the Genius keeps track of these nuances in her giant brain, explaining what’s compatible with what, and how to deal with each revision.

When my first Mac, a G5, died three months into my Apple switch I had my initial experience with a Genius here in Charlotte. He ran diagnostics that quickly identified a faulty system board. Then he let me place a drive I’d brought along inside another G5 so I could copy some data before leaving my machine with him.

Despite my own extensive MS background I hadn’t had the Mac long enough to look into its troubleshooting procedures. When my brand new G5 was sick I didn’t want to learn either. And I didn’t have to. The Genius took care of everything. Also - what other store is going to let you pop open a floor model and stick a drive inside?

Recently, a young Genius told me he was going down to the Atlanta store to work while the Charlotte store was being updated. “We’re kind of the superstars right now,” he told me. No, I didn’t laugh at him. Well - I did laugh in the elevator. But the guy took pride in his job, and he helped me with a problem. That’s something. Your Genius has been trained in Cupertino - a sure sign Apple takes them seriously.

I’m not saying the Apple Store is free of misinformation. I’ve heard shoppers ask questions on the floor and I’ve been tempted to correct the sales people. But that happens far less with the staff behind the Genius Bar. And who knows, maybe I was wrong. Maybe you have a Genius Bar horror story. Apple is a big company, and sometimes big companies make mistakes.

Here’s what I consider my most important Genius Bar anecdote: I brought a Macbook Pro in because the mouse button didn’t feel right when I clicked it. It registered a click on the Mac, but it felt dull. The machine was under warranty from a repair I’d paid for, a repair that left the mouse button in this state. I half-expected the Genius to tell me the machine was working just fine, the button was operable, move on. It took a couple trips to get the button repaired to my satisfaction, and nobody ever implied that I was being unreasonable with my request. That’s dedication to a high standard of service. And it’s rare.

I looked at Macs for a long time before taking the plunge. When the Apple Store opened here in Charlotte my decision became much easier. The manufacturer had a presence fifteen minutes from my house. Free tech support. Repair facilities. Accessories. For the consumer market this can’t be beat. It’s a massive advantage you seldom hear Apple brag about. But it’s there.

I’ll wrap up with another sitcom reference: On Seinfeld Kramer goes to a vet instead of a doctor. “I’ll take a vet over an MD any day. They gotta be able to cure a lizard, a chicken, a pig, a frog - all on the same day.” For me that’s kind of like the Genius. From Nanos to iMacs - all on the same day.

You Can Be a Cartoonist with Bitstrip

Friday, March 7th, 2008

Murphy always thought he could be a cartoonist if he could only draw. Another dream shot down. The cartoon you see here was made with bitstrips. It’s still in beta, but you can request an invite on their site.

I think I’m going to develop these characters.

Dual Layer DVD+R = Fusion VM Backed Up

Monday, March 3rd, 2008

duplicate a dvdI picked up a stack of Sony DVD+R DL disks this morning in preparation for my first attempt at DL burning. The objective: Backing up my Fusion install of Windows XP onto two disks.

The XP vm is about 15 GB. I don’t back it up with Time Machine, but I have a separate volume on the Time Machine drive where a copy of the vm is kept. Now I can delete it if I feel the need. The way I use Windows doesn’t require updating the backup with something like SuperDuper. I’m just saving myself from ever enduring the install process by storing a copy.

Burning more than 8.5 GB ? Use Split.

First I dumped the vm folder into a .sparseimage file created with Disk Utility. Then I used the split command in Terminal to split the sparse image into two files. That was simple enough, apart from the annoying difference between GB and GiB.

The disks have 8.5 GB stamped on their tops. That’s the manufacturer’s way of making the capacity look bigger - using decimal notation instead of binary. OS X reported the blank disk as having 7.96GB free.

The disks burnt well, no coasters. If I ever need to restore the XP vm I can copy the files from my dvd+R dl disks and reconstitute them with the cat command. For two bucks I reclaimed 15 GB on my external drive. Not bad. That’s thirteen cents per GB compared with around twenty-five cents per GB on an external HDD.

Append .com to URLs in Safari Address Bar

Saturday, March 1st, 2008

add the com I always thought Safari was adding the .com to addresses I typed in the Address Bar. I think Firefox does. Or did. The other day Road Runner started showing me a search results page with ads if I entered something like “apple” without the .com.

Changing my DNS servers to 4.2.2.1 and 4.2.2.2 (Level3) seems to have me back to my lazy ways. I can enter krispykreme and hit enter and I’m all set.

Just go to System Preferences and click Network. Select your network interface on the left. Click Advanced and then DNS. Use the plus sign to add the two DNS servers to your list, just like the screenshot.