See also: AppleOsx, AppleSoftware, AppleOsxIntegration

Table of Contents

Addressbook

Australian and New Zealand Map Plugins

New Zealand users of the Mac OS X Address Book may be familiar with the useless results that it's ‘Map Of’ command produces for New Zealand addresses. For example, all Christchurch addresses end up showing a map of Christchurch in it's entirety. More than useless. I've created two small Address Book plugins that use Wises Maps' excellent online maps to display both a detailed map of the location and directions from your home address, taken from your address book, to the location.

Installation of the scripts is simple: download them, extract them, then move them into ~/Library/Address Book Plug-Ins/. You may have to create this directory if it doesn't exist. The functionality should now be available by clicking on the title (eg. home or work) next to an address in the Address Book.

Update (12 December 2004): I've just run across Stephen Withers' “WhereIs (for Address Book)” which offers similar functionality for Australian addresses.

Source: http://bdash.net.nz/2004/12/11/a-better-nz-map-of-for-os-x-s-address-book/

Correctly Format International Addresses

Not sure when this was added to Address Book, but if you have contacts in different countries that use different address formats, Address Book is smart enough to support those formats. When editing an address, click on the address title (Home, Work) to pop up a menu. This is mostly used to define the type of address (home, work, etc.), but in this case, it also contains a sub-menu with country names. Select the country name, and voila, the address fields change (and if you already entered an address, it does a good job moving the bits to the right place). One thing it unfortunately does not do is auto-detect the country you typed in the Country field and change the format to match -- sounds like a job for Applescript.

Note also that if you are using "auto-formatted" phone numbers, it's a good idea to put "fully qualified" phone numbers in for your international contacts, ie +[country code] - [area code] - [phone number]. Otherwise, the auto-formatter will do strange things to the number. Again, it doesn't automaticaly recognize the country and fill in the correct country code.

Source: http://www.macosxhints.com/article.php?story=20040204174529670

Speed Up Searching

A friend of mine from Apple tipped me off to a cheap-and-easy way of improving the performance of Mail.app, the mailer built into OS X. I've found that every time I send a message, Mail freezes up and the statusbar says, "Adding recipients to Address Book." Turns out that you can really cut down on this delay by forcing your Address Book to compress itself:

  1. Open Address Book
  2. Create 10 or more entries
  3. Delete your new entries
  4. Quit Address Book

For extra speedy goodness, try deleting the ~/Library/Application Support/Address Book/ABPerson.index" file, then opening Address Book and searching for an entry. This will force a rebuild of the Address Book index, too.

I've tried it, and it worked beautifully for me. What's more, it seems to have improved the performance of iSync for synching with PalmOS and iPod.

Source: http://boingboing.net/#200443964

Disk Utility

Burn Bootable CD's from ISO Images

This is simple - but I haven't seen it described quite this way before. I made a couple of coasters before trying this particular approach. Now that Disk Copy is merged into Disk Utility, this seems to work reliably if you have an existing ISO image:

  1. Insert a blank CD into a supported burner
  2. When the Finder dialog appears, select "Open other application" for the desired action
  3. Navigate as you prefer and then select "Disk Utility" as the desired application to open
  4. After Disk Utility opens, drag the ISO image file to the lower portion (below the horizontal divider) of the left-hand pane where disks and volumes are displayed in the Disk Utility dialog
  5. Select the ISO image file,
  6. Click the "Burn" icon at the top-left of the Disk Utility dialog

Doesn't have to be an OSX bootable image, works for memtest86 and Linux CD's as well.

Source: http://www.macosxhints.com/article.php?story=20040215004629304

Finder

Automatically Mount Volumes at Boot

I was running into a problem where non-IDE drives would not mount at startup until a user logged in at the GUI. In an all-SCSI system, this meant that I couldn't ssh into the machine and access my volumes (outside of /), and startup scripts that required a separate volume (like moving swap to a different partition/disk) wouldn't run. A solution is to create a file at /Library -> Preferences -> SystemConfiguration -> autodiskmount.plist, with contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>AutomountDisksWithoutUserLogin</key><true/>
</dict>
</plist>

This tells autodiskmount to mount all local volumes at startup regardless of whether they are potentially removable (or whether the user has logged in yet). This was the issue, by the way. Apple decided to mount (potentially) removable volumes only while a user was logged in at the GUI. Users were assuming that removable volumes got unmounted when they logged out, and were causing file system corruption by disconnecting them while they were still live mounted file systems.

This works in Panther. I'm pretty sure that it also works for Jaguar, if this was even an issue. I don't remember anymore since I've been running Panther on my SCSI machine since the developer preview.

Source: http://www.macosxhints.com/article.php?story=20031103155828117

iCal

Schedule Meetings Via Addressbook

Based on a previous hint about adding the ability to schedule calls in iCal through the Address Book, I modified the script to let you schedule meetings the same way. This hint only works on Panther. First, highlight the script below, and click Safari -> Services -> Script Editor -> Make New AppleScript. Give the script a name, and save it in ~/Library -> Address Book Plug-Ins.

Relaunch the Address Book, and when you click on a contact's address, you should be able to schedule the meeting. Many other variations of the below script at the original URL.

using terms from application "Address Book"
  on action property
    return "address"
  end action property
   
  on action title for p with e
    set theName to (first name of p) & " " & (last name of p)
    return "Schedule meeting with " & theName
  end action title
      
  on should enable action for p with e
    return true
  end should enable action
      
  on perform action for p with e
    set theName to (first name of p) & " " & (last name of p)
    scheduleMeeting((id of p), theName)
  end perform action
    
end using terms from

on scheduleMeeting(id, name)
  tell application "iCal"
    set theItem to (make new todo at end of todo of calendar 1)
    set summary of theItem to "Meet with " & name
    set url of theItem to "addressbook://" & id
    activate
    show theItem
  end tell
end scheduleMeeting

Source: http://www.macosxhints.com/article.php?story=20040204213328956

iPhoto

Add Search to iPhoto4 with Smart Album

After upgrading to iphoto 4 I was stunned that there was no Find command. You could search your photo collection by keyword, but no other way. After a bit of cursing, I found a way to use a smart album as a makeshift search command.

Create a new smart album and call it something like "Find...". I set the conditions to "any text contains" and then several "Keyword contains", but you can set up anything you think you might search in regularly. Leave the fields blank for now and save your new album.

When you want to perform a search, click on your Find album, hit command-I and tab to the field you want to search by. Once you hit enter, your search results appear in the Find album. The nice thing about this is it will also remember your last search until you perform another one.

Source: http://www.macosxhints.com/article.php?story=20040126134941700

Clean out Thumbnails from Imported Images

For each photo index, I check the height and width of the photo. I figure the image is a thumbnail if either of those dimensions are less than 200 pixels, an arbitrary number I chose as the threshold. If either of those tests are true, I remove the image. I have to remove the image from the Photo Library album itself, because if I remove it from an album that I created, it is still in the Photo Library.

  tell application "iPhoto"
    set myAlbum to photo library album
    repeat with myIndex from (count of photos in photo library album) to 1 by -1
      set thisPhoto to photo myIndex of photo library album
      if width of thisPhoto < 200 or height of thisPhoto < 200 then
        remove thisPhoto from photo library album
      end if
    end repeat
  end tell

Or possibly refactored into:

tell application "iPhoto"
remove photos of photo library album whose width < 200 or height < 200
end tell

Source: http://www.macdevcenter.com/pub/a/mac/2004/02/27/cleaning_iphoto.html

Convert iPhoto Titles and Comments to IPTC Fields

Why Apple didn't choose to use IPTC for storing their photo MetaData completely baffles me but sadly it is the case. There is no good solution to this that I've seen so far but Caption Buddy goes some of the way. It allows you to click on an image, and import the iPhoto data and then optionally write it out in IPTC format. It could be scripted possibly but I haven't looked that far yet.

Download: http://a1680.g.akamai.net/7/1680/51/3ec5eb50bd0da1/www.apple.com/applescript/iphoto/Caption_Buddy.app.sit

Find Images Not in an Album

There is an script from Apple (for iPhoto2, have to see if it works with iPhoto 4) which will find all images which are not in an album and put them into a new album called "Unassigned Images".

Download: http://a1392.g.akamai.net/7/1392/51/43f8b9d4f33a94/www.apple.com/applescript/iphoto/archive.sit

iTunes

Remove the DRM from iTMS Songs

If you're having trouble playing your legally bought music, you might want to try this command:

find ~/Music -iname '*.m4[a,p]' -exec perl -pi -e 'BEGIN{$b=0}if(!$b){if(s/geID\x00\x00/DIeg\x00\x00/){$b=1}}' {} ";"

If iTunes plays your fixed files but won't transfer them to your iPod, delete the entries from your iTunes library and then readd the files.

Source: http://nanocrew.net/blog/2004/06/10/
See also: http://www.gizmodo.com/archives/how-to-undrm-your-undrmd-itunes-46-songs-016013.php

Mail.app

Change Special Folders (Drafts/Junk/Sent/Trash)

Panther: Open up the side drawer which holds your mail folders, select the folder you want to use and then go to "Mailbox - Use this mailbox for" and select the function you want.

Older: Right click on the folder and select the fuction you want (can't remember exact menus).

Source: http://slashdot.org/

Enable Debugging

If you run Mail from the command-line, there are some undocumented logging flags. Use the following command line (all on one line):

# /Applications/Mail.app/Contents/MacOS/Mail -LogActivityOnPort 25 -LogSocketErrors YES 

Port 25 is SMTP, ie outgoing mail. If you are receiving using IMAP then the port to log instead is 143 (port 993 for IMAP over SSL), and if you're using POP3 then log port 110 (or port 995 for POP3 over SSL).

Source: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&selm=BC31CF07.D14B3%25chrisridd%40mac.com

Force Plain Text

To force Mail.app to display your emails in plain text close all your Mail.app windows and then run this command in a Terminal window:

# defaults write com.apple.mail PreferPlainText -bool true

Note that this is equivelent to manually changing this value in ~/Library/Preferences/com.apple.mail.plist

  <key>PreferPlainText</key>
  <true/>

Source: http://www.macosxhints.com/article.php?story=20030711201917175

Speed Up Address Searching

See Addressbook: Speed Up Searching.

Subscribe to Some IMAP Folders

If you don't want to subscribe to all the folders on an IMAP server you can list the folders you want to subscribe to with a semicolon delimited list in the IMAP prefix setting of Mail.app.

If you want to 'subscribe' to multiple files in your IMAP folder, under IMAP path prefix separate the folders you wish to subscribe to with a semicolon. I.e.

/home/panther/dschwar1/.mail;/home/panther/dschwar1/mail/sent-mail

Oddly this worked for me and now I can subscribe to only 2 folders.

Source: http://www.macosxhints.com/comment.php?mode=display&sid=20040407062603804&title=%27Subscribe%27+to+IMAP+folders+in+Mail.app+with+a+proxy&type=article&order=&pid=40181

Safari

Display the Dimensions of an Image

I've never noticed this before, I think this is new to either Safari v1.1 or Safari v1.2. Anyway, if you've ever wanted to know the size of an image on a web page without downloading it and looking at it in Preview (something I do every now and then), there's a really easy way to do it.

If you open the image in a new window in Safari (which can be done through the contextual menu if it's on an open web page), the title of the window (or tab) now shows the image size in pixels.

Source: http://www.macosxhints.com/article.php?story=20040204151315934

System

Generate a Directory Service Debug Log from Boot

From Apple in regard to a bug I submitted:

Can the you reproduce the problem? If so we would like a debug log from boot-up. You can do this by:

  1. Tell DirectoryService to log from boot:

    # touch /Library/Preferences/DirectoryService/.DSLogAPIAtStart 
    
  2. Reboot, if problem occurs. Wait 5 minutes and turn off debug
    # killall -USR1 DirectoryService 
    
  3. You can get the log at
    # less /Library/Logs/DirectoryService/DirectoryService.debug.log 
    

Cleanup

  1. Stop the log from being created on your next boot:
    # rm /Library/Preferences/DirectoryService/.DSLogAPIAtStart 
    

Optimise Package Installation

Heres a Mac tip to eliminate the time spent optimising system performance after you perform a software update. It turns out the optimisation was a hack to get around a problem that had a much simpler and faster solution.

The trick is to disable prebinding which is now unnecessary. I did the following and updates are now super fast. You will need to rename 2 executables so that they can't be found. The exes are redo_prebinding and update_prebinding in the /usr/bin directory.

# cd /usr/bin
# mv update_prebinding update_prebinding.bak
mv redo_prebinding redo_prebinding.bak

Hardware

BookEndz
Third party docking station for Apple iBooks and Powerbooks.

http://www.bookendzdocks.com/bookendz/

iCurve
Great stand for Apple iBooks, combined with a wireless keyboard/mouse it's the ergonomically correct docking station that never was. Sweet.

http://www.griffintechnology.com/products/icurve/

Kamas Powerbook Stands
Similar to the iCurve only different ... read the Amazon iCurve reviews for one persons description of why they like it better.

http://www.macsonly.com/macimp/kamas2.html

VT Book
A PCMCIA card which allows you to connect an external monitor.

http://www.villagetronic.com/e_pr_vtbook.html


CategoryApple CategorySoftware

AppleTipsAndTricks (last edited 2004-12-23 02:36:26 by AdamShand)