Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A simple way to box some text in Pages Apps
If you use Pages, you may occasionally want to put a border and/or colored background around some text. There are a few ways to do this; you can insert a graphic object and put text in it, but this then requires positioning, and you can't easily edit it with your other text.

You can also use the More tab of the Text inspector to add borders and background colors; for borders only, this method works great (as long as you want a full-width box). But if you add background color (to the paragraph, not characters), you'll find it's not quite right–the color doesn't fill to the edges, and spills out slightly at the top and/or bottom.

So what's the solution, if you don't want a full-width border, or you want a background fill in your box? Select the text to be boxed, and choose Format > Table > Convert Text to Table.

You'll get a one-column-wide table, over which you have complete control of colors, borders, spacing, etc.
  Post a comment  •  Comments (2)  
  • Currently 3.86 / 5
  You rated: 2 / 5 (7 votes cast)
[18,387 views]  View Printable Version
Send SMS to Messages and run commands with AppleScript Apps
It is possible to send an SMS command to your Mac using an AppleScript. I've made one which takes a picture when I send the command /photo to iMessages on my Mac.

The script is very simple; it must be set up Messages' Alerts preferences. Choose Event > Message Received, then check Run an Apple Script. This will check each message you get for the command; in this case, /photo.

The script will turn the volume all the way down (and up again) before taking a picture with PhotoBooth so it does not make any noise.

Then you can make a symbolic link from the PhotoBooth folder to your Dropbox so you can check the photos from your mobile device.

Here's the script:
using terms from application "Messages"
	on message received theMessage from theBuddy for theChat
		if (theMessage begins with "/") then
			if theMessage begins with "Photo" then
				beep 3
				set volume 0
				tell application "Photo Booth"
				end tell
				tell application "System Events"
					tell process "Photo Booth"
						delay 3
						tell application "Finder"
							set visible of process "Photo Booth" to false
						end tell
						tell menu bar 1
							tell menu bar item "File"
								tell menu "File"
									click menu item "Take Photo"
								end tell
							end tell
						end tell
					end tell
				end tell
				delay 5
				tell application "Photo Booth"
				end tell
				set volume 3
			end if
		end if
	end message received
end using terms from

[kirkmc adds: Note that this only works with iMessages (I tried for a while to get it to work with regular chats, and it wouldn't). It's worth noting that the ability to send a text message and set off a script is something very useful, and I can imagine plenty of scripters figuring out other types of remote commands they can send to their Macs. Feel free to submit them as hints.]
  Post a comment  •  Comments (6)  
  • Currently 3.00 / 5
  You rated: 2 / 5 (6 votes cast)
[10,909 views]  View Printable Version
iTunes smart playlists with nested rules Apps
I was adding a Smart Playlist to iTunes (10.7) and could not find the option to add nested rules... until I held down the Option key and the plus icon became an ellipsis which then provided the ability to add a nested rule.

[kirkmc adds: This isn't new in iTunes 10.7, but rather iTunes 10. However, I see that it's not on the site, so it's worth mentioning. Apple has a technical note about smart playlists, and they call the ellipsis button the "Nest" button.]
  Post a comment  •  Comments (5)  
  • Currently 4.57 / 5
  You rated: 5 / 5 (7 votes cast)
[9,527 views]  View Printable Version
Spotlight keyboard shortcuts System 10.7
When viewing Spotlight search results, there are a number of shortcuts you can use to quickly perform actions or your search or its results. Simply move your cursor over an item, or use the arrow keys to navigate, to select items.
  • View the search term in Dictionary: Command-D
  • View the search term in a Quick Look "look up" dictionary window: Command-L
  • View the search term in Wikipedia: Command-W
  • Perform a web search for the search term: Command-B
  • View a selected result in a Quick Look window: hover cursor over an item
  • Reveal selected result in Finder: Command-R
  • Open the Top Result: Command-T
  • Open a selected result: Command-O, or Enter, or Return
  • Display a Finder Info window for a result: Command-I
[kirkmc adds: Any others? I listed this as 10.7, but I'm not sure they all work in Lion; I know some of them do.]
  Post a comment  •  Comments (13)  
  • Currently 3.69 / 5
  You rated: 5 / 5 (29 votes cast)
[52,977 views]  View Printable Version
Change default Calendar alert and time System 10.8
You can change the default calendar event sound and all day event time. These settings are stored as part of each individual calendar.

Locate and open in TextEdit:
~/Library/Calendars/UUID.calendar/LocalDefaultAlarms/EventAllDayAlarms.icsalarm ~/Library/Calendars/UUID.calendar/LocalDefaultAlarms/EventTimedAlarms.icsalarm

The default all day event time can be changed to 6 am, for example, instead of 9 am:

You can change the default event time to values not available in the preferences. This can be a positive or negative value, for instance 3 hours before:

The alert sound can be specified (without a file extension) using anything in your user or system sound folder:

  Post a comment  •  Comments (7)  
  • Currently 3.00 / 5
  You rated: 1 / 5 (8 votes cast)
[11,927 views]  View Printable Version
Resolve Mac App Store download issues by removing cache folder Apps
I've occasionally seen issues where Mac App Store downloads failed, with a message saying "The product distribution file could not be verified. It may be damaged or was not signed." Topher Kessler writing at CNET showed a way you can resolve this issue.

When this download problem occurs, it is generally the result of a corrupted file in a cache folder. If you run this command in Terminal:
open $TMPDIR../C/
a folder will open in the Finder showing a number of cache folders for different applications. Delete the folder, then quit and relaunch the App Store application and try the download again.
  Post a comment  •  Comments (3)  
  • Currently 3.60 / 5
  You rated: 2 / 5 (5 votes cast)
[38,122 views]  View Printable Version
Enable the adaptive firewall in OS X Server OS X Server
Apple recently published a technical note explaining how to enable the adaptive firewall in OS X Server. This is a type of firewall that automatically creates temporary rules according to certain events. For example, a number of failed login attempts will cause the adaptive firewall to create a temporary rule to block the IP address attempting to log in.

To do this, run the following commands as an administrative user:
sudo pfctl -f /etc/pf.conf
sudo /Applications/ enable
sudo /Applications/ -f
Then, edit /System/Library/LaunchDaemons/ using the following commands:
sudo defaults write /System/Library/LaunchDaemons/ ProgramArguments '(pfctl, -f, /etc/pf.conf, -e)'
sudo chmod 644 /System/Library/LaunchDaemons/
sudo plutil -convert xml1 /System/Library/LaunchDaemons/
Another technical note explains how to resolve an issue where packet rules do not load.

For more information, see man afctl and this post on the techorganic blog.
  Post a comment  •  Comments (4)  
  • Currently 2.13 / 5
  You rated: 5 / 5 (32 votes cast)
[16,071 views]  View Printable Version
Workaround problem saving photos from Mountain Lion Mail to iPhoto System 10.8
Apple recently published a technical note about a problem saving photos from Mail to iPhoto in Mountain Lion. I actually came across this problem recently, and there was no feedback suggesting that the photos were not saved. Fortunately, I had a Time Machine backup of the email containing photos in question.

The fix is simply this: launch iPhoto, then drag the photos - one by one - from the e-mail onto the iPhoto icon in the Dock.
  Post a comment  •  Comments (1)  
  • Currently 4.00 / 5
  You rated: 5 / 5 (8 votes cast)
[4,371 views]  View Printable Version
Use an SSD boot drive and keep Users on an encrypted data drive System 10.8
Recently I became so sick of the slowness of my MacBook Pro (late 2011 model), which has a 2.4 GHz Intel Core i5 with 16 GB RAM running Mountain Lion 10.8.2, that I decided to buy a 120 GB Kingston SVP 200 SSD drive for my boot drive and put my previous 500 GB Hitachi HD in place of the DVD drive.

I left my old system in place on the old drive and did a clean install of Mountain Lion 10.8.2 on the SSD. I then set up my main user account with the same name and password as before. In the Users & Groups preference pane, I right-clicked on my account name and selected Advanced Options, and set the location of my user account to be my old user account on the secondary drive now named Data HD. Obviously, for all permissions to work correctly you need to keep the new user names and passwords the same as the old ones. That all worked fine, and when I rebooted and logged in to my account, all my Users are on the Data HD. I then used Migration Assistant to pull over all my Apps to the SSD boot drive.

Encryption of Data HD

Control-click on a disk in the Finder to encrypt to encrypt it (in a Finder window, the Finder sidebar, or on the Desktop). Choose Encrypt "disk name" and enter a password. You’ll have to enter the password a second time, and you won’t be able to go any further unless you also enter a password hint. I tried this method and it didn’t appear to work properly so I used the Terminal approach.

Prepare a disk by converting

You encrypt disks with the diskutil command, but first, you have to convert them to a format called CoreStorage. Start by running the diskutil list command, which returns a list of all your disks, like this:

Vinces-MacBook-Pro:~ vince$ diskutil list



0: GUID_partition_scheme *120.0 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh SSD 119.2 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3



0: GUID_partition_scheme *500.1 GB disk1

1: EFI 209.7 MB disk1s1

2: Apple_HFS Data HD 499.8 GB disk1s2



0: GUID_partition_scheme *500.1 GB disk2

1: EFI 209.7 MB disk2s1

2: Apple_HFS CCC Backup 499.1 GB disk2s2
The disk I want to encrypt is Data HD and to the right of the name you can see the identifier which is disk1s2. With that information I could convert that disk the CoreStorage format with the following command:
sudo diskutil corestorage convert disk4s1
Terminal will request your administrator’s password, then will begin the conversion process.
Vinces-MacBook-Pro:~ vince$ sudo diskutil corestorage convert disk1s2
Started CoreStorage operation on disk1s2 Data HD
Resizing disk to fit Core Storage headers
Creating Core Storage Logical Volume Group
Attempting to unmount disk1s2
Switching disk1s2 to Core Storage
Couldn't unmount disk1s2; converted volume won't appear until it's unmounted
Core Storage LVG UUID: 5896188D-5D8C-4A8D-95BB-3D0DC892CBF4
Core Storage PV UUID: 9A70E1FB-5FEE-445B-8E92-04EC42C32D5E
Core Storage LV UUID: EB1BD441-D493-4C2B-B6E4-A646667D79C0
Finished CoreStorage operation on disk1s2 Data HD
Encrypt the disk

The important information above is the LV UUID, or logical volume universally unique identifier. Using that information, you can then run the command to encrypt the disk, as follows:
Vinces-MacBook-Pro:~ vince$ sudo diskutil corestorage encryptvolume EB1BD441-D493-4C2B-B6E4-A646667D79C0 -passphrase password
Started CoreStorage operation on disk2 Data HD
Scheduling encryption of Core Storage Logical Volume
Core Storage LV UUID: EB1BD441-D493-4C2B-B6E4-A646667D79C0
Finished CoreStorage operation on disk2 Data HD
Replace password with your password. The next step will ensure that the Data HD gets mounted during the boot process so that your accounts are available. For this you need the excellent program Unlock by Justin Ridgewell. Full instructions for installation are on his page.

His script runs as follows:
Vinces-MacBook-Pro:~ vince$ curl | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2853  100  2853    0     0   1277      0  0:00:02  0:00:02 --:--:--  1971
Attempting to re-run as root...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2853  100  2853    0     0   1486      0  0:00:01  0:00:01 --:--:--  1864

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   509  100   509    0     0    314      0  0:00:01  0:00:01 --:--:--   385
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   139  100   139    0     0     80      0  0:00:01  0:00:01 --:--:--    99
100 27900  100 27900    0     0   7686      0  0:00:03  0:00:03 --:--:-- 76438

Do you want to unlock Data HD at boot? (y/N)
What is the passphrase used to encrypt Data?
*Enter passphrase for Data HD*
Following conversations with Justin, it is probably worth checking that you have an entry for Unlock: Data HD in the System Keychain. Also the script will be installed at /Library/LaunchDaemons/name.ridgewell.unlock. He also advised setting up another Admin account on the SSD in case one ever needed to do an decrypt the Data HD in case anything goes wrong. The command for that, using the example of my Data HD above, is:
diskutil cs decryptvolume EB1BD441-D493-4C2B-B6E4-A646667D79C0 -passphrase password
Obviously a bit of clean-up is necessary. For instance, all the Application icons in the Dock will be referencing the Applications on the original hard drive, so you need to delete each one and replace them by dragging the Applications to the Dock that were moved to the new SSD. Finally, I used Carbon Copy Cloner to copy the user folder from Data HD to another drive, re-formatted the Data HD to remove all the Applications and System files, and then cloned the User folder back to the Data HD. Then I tested all my Applications to make sure everything was working. So far so good and the performance increase is well worth the effort. Boot time is down to 10 seconds and all Applications open instantly!

[kirkmc adds: I wrote a Macworld article about disk encryption a couple of months ago. This hint uses that process, but goes a bit further.]
  Post a comment  •  Comments (18)  
  • Currently 4.00 / 5
  You rated: 4 / 5 (6 votes cast)
[12,917 views]  View Printable Version
Add URLs to Reading List automatically from e-mails Internet
This is an update to this hint, Automatically add links from Emails, Twitter or Google Reader to Reading List . I found the solution posted there to be insufficient. The script only allows URLs to be on their own full line, whereas my solution scans the entire message for links everywhere. As long as they are separated by a space the script should find them. WebKit users can even set their own browser.

I hope this helps replace some "read later services" by Reading List.

Save the script below to ~/Library/Application Scripts/ and assign it to a new Mail rule.

An easier way to send yourself links is by adding +reading to your mail address. If your normal address is, it would become:

The beauty of this is that you can add this address to your Contacts and give it a nice name like “Add to Reading List”. The previous hint required editing e-mail subject lines in a predefined way. Apps like Reeder are able to send to a default mail address. With this, set the +reading address to be your default address, share via e-mail, tap Send, and it's done.

Set up a new rule with the following options:

  • Rule: “any recipient contains ‘+reading’”
  • Actions:
    • “mark as read”
    • “execute AppleScript” (this script)
    • “delete message"
    • “stop evaluating rules”

Here’s the script (you can also get it on GitHub):

Add to Reading List

Script for Apple Mail to find http and https links in emails and add them to Safari's Reading List automatically.

Best practice: setup with "any recipient contains '+reading'". 
Actions "mark as read", "execute AppleScript", "delete message", "stop evaluating rules"

Created by Andreas Zeitler on 2012-10-07

using terms from application "Mail"

    set theURLs to {}

    on perform mail action with messages theMessages

            set theMessageCount to count of theMessages
            repeat with theMessageIndex from 1 to theMessageCount
                set theMessageContent to content of (item theMessageIndex of theMessages)

                -- find URLs in messages
                set cmd to "echo \"" & theMessageContent & "\" | egrep -o -e 'http[s]?://\\S+' | sed 's/[<>]//'"
                set theURLs to do shell script cmd

                -- make URLs a list
                set theURLs to paragraphs of theURLs

                -- add URLs to reading list
                my addToReadingList(theURLs)

            end repeat
        end try

    end perform mail action with messages
end using terms from

on addToReadingList(theURLs)

    -- set your preferred browser. Use "Safari" or "WebKit"
    set myBrowser to “Safari”

    using terms from application "Safari"
        tell application myBrowser
            repeat with theUrl in theURLs
                add reading list item theUrl as string
            end repeat
        end tell
    end using terms from
end addToReadingList
  Post a comment  •  Comments (0)  
  • Currently 4.67 / 5
  You rated: 4 / 5 (6 votes cast)
[6,225 views]  View Printable Version