Nieuws door: MacOSX Hints

10.7: A warning about Finder's 'Replace' feature

22/02/2012 04:30pmIf you have a folder that contains a file with the same name, and drag the file into the same location as the folder, the Finder may try to delete both items.

To reproduce this:
  • Create a folder on your Desktop named 'test.'
  • Create a file in that folder also named 'test.'
  • Move the file from the folder onto your Desktop.
  • Click 'Replace.'
Result: Both the folder and the file are deleted.

Do the same sequence, except choose 'Keep Both Files.' Same result.

[crarko adds: Okay, this one half worked when I tried it in 10.7.3. With 'Replace,' both file and folder were indeed deleted. I also tried it with other items remaining inside the folder, and in that case everything inside the folder was also deleted. A potential disaster.

In the 'Keep Both Files' case, the folder was untouched and the file was renamed to 'test copy' when I moved it and 'test 2' when I copied it.

In any ev ...

Two editing keyboard shortcuts

22/02/2012 04:30pmBack to basics -- use keyboard shortcuts to open and close the fonts window and the color picker window in text editing applications.

Here are two quick and easy shortcuts to keep in mind for use in most text editing applications. Don't bother with these in Word, they don't apply. Try them in TextEdit instead.

The first you probably already know. It lets you open the font selection window. It's Command+T.

The second you may not know, but it usually works in applications where the first one works. It's Command+Shift+C and it opens the Mac Color Picker window. Two quick tips about this window:

1) If you click the magnifying glass icon, you can choose any color available on your Mac's screen, and

2) you can drag a color from any point inside the rectangle near the top of the window into one of the squares at the bottom to store it there for future reference. Try dragging the bottom right corner of the window (and/or the right edge, if you' ...

10.7: Find iMessage capable numbers and e-mail addresses

22/02/2012 04:30pmUsing Apple's new app Messages beta you can discover who you can send Messages to.

In Messages, press Cmd+N to open a blank message window. In the 'To:' field, which is highlighted by default, begin typing a name. A list will appear showing all the possible completions. Once you have typed one unique name, the list will show all the addresses known for that person, and will put a blue chat bubble next to any item that you can send a Message to. This works for both e-mail addresses and phone numbers.

[crarko adds: I don't have the beta handy so I haven't tested this one.]

Add to digg

A mouse shortcut for adding a link to the Reading List in Safari

22/02/2012 04:30pmIt is well known that one can add a link to the reading list using the link's contextual menu. However, I have found another mouse shortcut for three-button mice. It works at least in Mac OS X 10.7.3 in Safari 5.1.2 and 5.1.3.

Click the link with the middle mouse button while holding the shift key and watch the link jump to your reading list.

[crarko adds: I don't have a three-button mouse handy to test this, but if you have a programmable mouse, you should be able to make an application-specific macro to do this too. If you try this out in 10.6, please post the results in the comments.]

Add to digg

10.7: Messages.app (BETA) uses iChat syntax for AppleScript

22/02/2012 04:30pmWhen looking at the new Messages.app preferences I realised that you can get it to run applescripts on various events.

Under the Alerts Tab in the Messages.app preferences, you will find a list of Events under the drop down Menu 'Event.' Each event has its own set of independent options . All include a 'Run an AppleScript script' option. These scripts can just run on every instance of the chosen event.

But you can interact with the Messages.app with the script the same way you would in iChat.

So if I wanted to, for example, have my Mac send me a message, when an event occurs that matches certain criteria I can use the iChat syntax.

Example:
using terms from application "iChat"  on message received theMessage from theBuddy for theChat --display dialog (theBuddy ...

Use your laptop for a tracing backlight.

22/02/2012 04:30pmI needed a darkened version of a sketch I made, but I didn't want to go scan it and darken it. I decided to make a copy the old fashioned way -- trace it.

However, the lamp wasn't bright enough, and I didn't have access to a backlit desk. Then it hit me; my laptop has a backlight, a very bright backlight in fact.

How to use your screen as a light box:
  • Turn your laptop so that the screen is horizontal.
  • Prop up the body so the screen stays flat.
  • Set your desktop to solid white, or open a solid white window. If you set the desktop color, hide everything else.
  • Make sure the screen brightness is turned all the way up.
I used my 13.3" MacBook Pro, which was slightly small for a 8.5x11" paper. A larger screen would certainly be better.

[crarko adds: I've used an iPhone as a flashlight, but would not have thought of using a laptop as a light table. Clever idea.]


10.7: Move messages to favorite mailboxes

22/02/2012 04:30pmI discovered a keyboard shortcut for moving messages to favorite mailboxes: Command+Control+number.

OS X Lion added a Favorites Bar to Mail where the user can keep frequently accessed mailboxes. The Command+1, +2, etc., shortcuts that used to work in 10.6 for Inbox, Outbox, Drafts, etc., are now associated with these favorites in order from left to right. While reaching for a different shortcut, I just discovered an undocumented shortcut for moving selected messages to one of these favorite mailboxes.

Just add Control to the shortcut. For example, Drafts is in the third position on my Favorites Bar, so Command+Control+3 moves a selected message to Drafts. The only requirement is that the destination is a regular (not smart) mailbox.

[crarko adds: A very handy shortcut.]


And for some time, I've been looking for a way to correct spelling for cases when auto-correct doesn't work. I thought it should have been easy to do.

The only way I knew how to do it was right-clicking the misspelled word, which brings up a contextual menu the top of which shows suggestions followed by other options such as 'Ignore spelling,' 'Learn spelling,' and so on. But this is no shortcut and requires using the mouse.

After all this time with Lion, I've finally found an answer. Yes, Lion has auto-correct, but it can be switched off or you might click Escape before it can auto-correct and now the ...

iOS 5: Deleting music on the device

22/02/2012 04:30pmI've always wondered how to delete music off of an iOS device running 5.0.x, which can be a pain what with iCloud downloading music to your iOS device, and then adding the same song a second time when syncing with iTunes.

When in the Music app on the iOS device just swipe like you would for deleting basically anything on an iOS device and you'll get the option to delete the song. If you have a bunch of songs you want to delete this will take some time to to but at least now you wouldn't have duplicates thanks to the new features of iCloud downloading the song and then iTunes syncing another copy of the song on the same device.

[crarko adds: The standard method for deleting line items in iOS comes to music.]

Add to digg
The solution? Go into the iPhone's Settings » Mail, Contacts, Calendars » [Email Account] And turn 'Mail' Off. All of that account's email mailboxes disappear from my iPhone, never to alert me of what I have coming to me on Monday morning. But when I turn it back on, it's all right there - right where I left off. Very handy.

The same can be done for Calendars. I have not tested it with Contacts, but that may work, too.

[crarko adds: This works with any system where the primary data repository resides on the server; Exchange, IMAP, CalDAV. Just be patient while the app resynchronizes the data. I've use this as a troubleshooting technique, but this hint is also a clever idea.]

10.7: Adjust Mail's delay for marking items read in conversation view

22/02/2012 04:30pmBy default, Mail will mark a message in a conversation read after a short delay. To adjust the short delay (for example, to remove it), use the following command (replacing 0 with the desired time in seconds):

defaults write com.apple.Mail MarkAsReadDelay 0

To revert to the default:

defaults delete com.apple.Mail MarkAsReadDelay

As far as I can tell, there isn't a way to affect the delay for single messages.

[crarko adds: Nice.]

Add to digg
22/02/2012 04:30pmThis hint describes a way to change one of Safari's built-in search engines (Google/Yahoo/Bing) into a custom one, without the use of any plugins/add-ons/extensions. It involves carefully editing one of Safari's binary (much like the previous hint.)

Go to /System/Library/PrivateFrameworks/Safari.framework/Versions/A/ and save the file named 'Safari' somewhere safe. If something goes wrong while editing, it's just a matter of copying that back (tested myself).

Do the same for this file /Users/USER/Library/Safari/Configurations.plist.signed.

Open 'Configurations.plist.signed' with any text editor and erase everything in it, making it blank. Save it, and then right-click to 'Get Info,' and tick the 'Locked' box.

Now for the binary I recommend a hex editor, I used the free HexFiend ...

One fix for non-functioning SuperDrive

22/02/2012 04:30pmThe SuperDrive on my MacBook Pro (circa 2007, rev. D I think), experienced a long, slow decline in its performance, and finally it stopped working altogether.

When I say 'stopped working,' I mean that it wouldn't recognize a disc: I'd insert the disc, it would spin around a little, make some chugging noises, but then spit it back out. I think it starting doing this for CDs sooner than it did for DVDs (more powerful laser?), but I can't recall for certain. I don't do much with discs, and since it's a 4.5 year old laptop, I never got it serviced, which predictably landed me in a bind.

Anyway, that's when I stumbled across a solution:

You take a clean cloth (like a lens cloth for cleaning eyeglasses), drape it over something slim like a business card or a smooth plastic gift card, and plum the depths of your drive in an attempt to clean the lens. Supposedly it's just inside the left boundary, but I plunged my improvised cleaner in everywhere I could, as de ...

Mount and unmount external drives easily via AppleScript

22/02/2012 04:30pmI like to eject my external drives because they slow down my mac when they spin up, but I want to have an easy way to access them if I need to. I wrote a little AppleScript that will toggle the mount status of the drive (if it's mounted, it will eject, if it's unmounted, it will mount).

To run the script, use the script menu at the right of the menu bar, or bind it to a hot key using a Quicksilver-type app. Be sure to change 'YourDiskNameHere' to the name of the volume you're working with.

The script can be easily adapted to only eject, or only mount the drive. You can also tweak it to display a Mount/Unmount dialog if you wish.
set diskName to "YourDiskNameHere"tell application "Finder" if disk diskName exists then eject disk diskName else tell current application set deviceL ...

10.7:Quartz Debug 4.2 hidden prefs

22/02/2012 04:30pmApple has changed the 'magic open sesame' to all the cool hidden features of Quartz Debug in version 4.2.

Why make such a useful app and then hide almost every feature? I just can't understand the logic in this.

Anyway as an update of my old hint here are the new steps to take to gain access to the goodies.
  • Launch Terminal.
  • At the prompt, type the following command line followed by [Enter]:

    defaults write com.apple.QuartzDebug QuartzDebugPrivateInterface -boolean YES

  • Launch Quartz Debug and you should notice new options in the 'Tools' and 'Windows' menus.
  • Should you like to undo the changes and go back to the stock Quartz Debug just type the following in Terminal (followed by [Enter]):

    defaults delete com.apple.QuartzDebug QuartzDebugPrivateInterface

  • ...

10.6: Make a universal 10.6.7 Snow Leopard installer

22/02/2012 04:30pmWhy do we need this? Because Apple quit releasing full retail versions of Snow Leopard with 10.6.3. If you have an Apple computer made after the Core 2 Duos, the 10.6.3 retail disk may not boot, and the 10.6.0 version won't boot at all. Early 2011 MacBook Pros fall in this category. Version 10.6.7 was the last version released on DVD, but the DVDs were locked to specific machines. We are are going to unlock a 10.6.7 DVD and make it a universal Installer.

How to do it:
  • Use Disk Utility to make a read/write DMG of a 10.6.7 install disk for a MacBook Pro or iMac. Version 10.6.6 might work, but I haven't tried it.
  • Set the Finder to reveal hidden files:
  • open Terminal and type or copy and paste the following line:

    defaults write com.apple.finder AppleShowAllFiles TRUE

  • Press the Enter key.
  • Then type:

    killall Finder

  • Press the Enter key again.
  • ...

Fix a Finder sidebar resizing issue

22/02/2012 04:30pmI noticed a few days ago that I was no longer able to resize my Finder's sidebar. When the mouse's cursor was over the border it didn't change to the resizing one and I couldn't modify the sidebar's width either.

I found the solution in a corrupt Finder preferences file. The 'ShowSidebar' option was turned off even when I was able to see the sidebar. Changing that value to 'YES' and killing the Finder solved my problem:

defaults write com.apple.Finder ShowSidebar -bool YES

killall Finder

Anyway, some part of the problem is still present since the preferences file and Finder's behavior are not related yet; if I change the setting back to 'NO' the sidebar is still shown but becomes sticky again. It appeared once I was changing a lot the visibility of sidebar, path bar and status bar to see different configurations.

I'm running 10.7.3.

[crarko adds: I can't reproduce this. It sounds like the Finder prefs ar ...

Growl Notification from Mail.app with Sender Photos

22/02/2012 04:30pmYou can use an AppleScript to send a notification to Growl whenever new messages arrive in Mail.app. The script also includes the image of the sender from your Address Book as the icon of the Growl notification. Works in Snow Leopard and Lion.

I adapted a script written originally by Hunter Ford. I added the ability to include the image of the sender from the Address Book (if it exists). Britney F. helped me solve a couple of bugs -- Many thanks!

First you have to be using Mail.app and the latest version of Growl.

You can download the script from here and place in your /Library/Scripts folder or anywhere you wish.

To use this script, you have to add a rule in Mail.app to run the script for all new messages.

In Mail.app choose Preferences » Rules » Add New Rule. Then set the condition to 'Every Message' and the action to 'Run Appl ...