OSX Hints

Subscribe to OSX Hints feed
Macosxhints.com RSS feed
Updated: 1 day 27 min ago

10.8: AppleScript to close iCal Alerts

Tue, 04/15/2014 - 15:00
I'd just installed OS X 10.8, and booted to find the right side of my screen covered in Birthday and Calendar notifications! Since installing I've clicked 'Close' on way too many iCal notification alerts.

Here's a script to close them all for you in one fell swoop. Since I still want iCal to popup a Notification alert for event alarms I've set, I don't want to simply disable all the iCal notifications (or set them to temporary banner alerts).

However, it still occurs that sometimes a small pile of alerts have accrued while I was away from the computer, and I really hate hitting 'Close' a bunch of times.

So, followng is a script to simply close all the piled-up Notification Alerts. The script was put together using these two webpages for inspiration: http://macosxautomation.com/mavericks/notifications/01A.html (most of the nice code comes from here) and ...

Create very unique signatures in Preview

Thu, 04/10/2014 - 15:00
You can make signatures in Preview that are pen and ink style drawings.

I don't know if this has been posted yet, or if it is generally known, but I stumbled upon a neat feature of signatures in Preview.app. When you create a signature, if you you don't hold up a piece of paper with a signature on it, and simply smile for a mug shot, Preview will create a signature that is a neat pen and ink style image of yourself, or whatever is in front of the camera. I've created several, that for the right client, can be used as a humorous alternative to an actual signature. I also used a screen capture of the signature on a document and made the image into a Facebook Profile picture.

[crarko adds: Well I didn't know about it. Most folks use Photo Booth to do things like this, I'd guess, but I always appreciate a creative use of a program.]

Custom margins in TextEdit

Tue, 04/08/2014 - 15:00
There is already an old hint about this topic, but it doesn't really explain it very clearly, only in the comments.

Here's how you can change the margins in TextEdit to your favourite size, so that you can use, for example, the whole space on a sheet of paper when printing.

First, save your document first as a Rich Text file (.rtf), if you have not already done this. To see the effect directly in your document, open it and enable under the Format menu the setting Wrap to Page for your document.

Next open up the TextEdit preferences, switch to the tab Open and Save and check on the option Display RTF files as RTF code instead of formatted text.

Open the document again and you will see the raw code that defines how the document look like. You want to look in the 4th row, where it says:

margl1440margr1440

This define ...

Low-power mode for Maps.app

Fri, 04/04/2014 - 15:00
It's possible to save power when using Maps to navigate in a car. It's an obvious trick once you know about it, and easy too.

When you're navigating with the Maps app, you're probably used to it chewing through battery life. Even on a full charge my iPhone 5 doesn't last more than 2-3 hours when navigating.

To eke out extra life, just press the Sleep button (top of the phone), once you're on your way and are on a long stretch before the next turn/navigation point (i.e. on a freeway for 50 miles). The screen will blank, but the navigation will continue. The phone will briefly wake 10 miles from your next turn/navigation point, to tell you about it, and will wake 2 miles from it and stay awake until you get past it.

To switch back to non-power-saving mode, just swipe as usual to wake the phone.

To be honest this doesn't save a huge amount of battery life in my tests, but it's better than nothing. For long journeys,you really need a USB power sour ...

Hiding Software Updates

Wed, 04/02/2014 - 15:00
Since the introduction of Lion the system's Software Opdate mechanism has been integrated into App Store.app and the Software Update Preference Pane has been removed and substituted with "App Store".

If you constantly are being reminded to install software updates you don't really want to install, you can right-click (Control+click) the name of the update and hide it, eliminating the reminder.

[crarko adds: I think this is probably known already to many of you, but if it's not it can be a handy trick. I find the whole App Store method for Software Update a lot less pleasant than the old Snow Leopard mechanism where it was separate, but maybe I'm just old fashioned.]

iOS: Change how Calendar events look in Notifications

Mon, 03/31/2014 - 15:00
Long frustrated with how calendar events look within the Notification Center I've discovered a way to change it.

As part of iOS 7.1 Apple improved on the ability to view calendar events by adding a list view button in the Daily view. I have noticed that if you toggle this to list view within the Calendar app then your calendar events within Notification Center will also show as a list.

[crarko adds: Is this actually new? I don't remember having looked for this in previous versions of iOS.]

10.9: Enable experimental network commands

Fri, 03/28/2014 - 14:00
Many advanced network configuration commands can be reached with the scutil command line tool. Launch Terminal.app and run:

ENABLE_EXPERIMENTAL_SCUTIL_COMMANDS=1 scutil --net, then type help and press the Return key to see the available options.

For example: localhost:~ user$ ENABLE_EXPERIMENTAL_SCUTIL_COMMANDS=1 scutil --net set "Automatic" selected > help Available commands: help : list available commands f.read file : process commands from file quit [!] : quit commit : commit any changes apply : apply any changes create interface [ | ] create protocol create ser ...

Paste an address and Contacts will parse it

Wed, 03/26/2014 - 14:00
I'm not sure how long this has been the case, but if you copy an address, say from a web site, and paste it into the first address field (street) in Contacts, Contacts will parse appropriately.

For example, try:

1234 Easy St
Pleasantville, CA 43402

When pasted into Contacts it will correctly place the City, State and Zip into the appropriate fields.

[crarko adds: OK, I'll admit I don't know when this was introduced either because I'd long ago stopped looking for it. Nice to know data detectors keeps being improved.]

10.9: Run sysdiagnose with keyboard shortcut

Mon, 03/24/2014 - 14:00
The command-line utility sysdiagnose can be triggered by pressing Cmd+Opt+Ctrl+Shift+Period, and it may take a few minutes to complete. When ready, the output will automatically be revealed in a Finder window (or it can be manually retrieved from /var/tmp).

What sysdiagnose Collects:
  • A spindump of the system
  • Several seconds of fs_usage ouput
  • Several seconds of top output
  • Data about kernel zones
  • Status of loaded kernel extensions
  • Resident memory usage of user processes
  • All system logs, kernel logs, opendirectory log, windowserver log, and log of power management events
  • A System Profiler report
  • All spin and crash reports
  • Disk usage information
  • I/O Kit registry information
  • Network status
  • If a specific process is supplied as an argument: list of malloc-allocated buffers in the process's heap is collected
  • ...

10.9: Add an Automator action to Calendar

Fri, 03/21/2014 - 14:00
Apple removed the option to add an action to Maverick's Calendar app but you can use Automator to accomplish this.

I found that if you use Automator to add an action an Automator calendar will appear over in the Calendar side bar. Then just select the Automator calendar for the item you are adding.

[crarko adds: I had to play around a bit in Automator to figure out what to do here, but it looks like creating a Calendar Alarm action will do the trick.]

10.9: Encrypt/Password-Protect a PDF in Preview

Wed, 03/19/2014 - 14:00
With the latest versions of Preview.app (since OS X v10.8, I believe) which save versions of files rather than the old standard Save dialogues, it took me a while to figure out how to Save As... and encrypt a PDF file with a password.

While clicking on the File menu, press the Option key, which causes the Duplicate menu item to become Save As... instead. Then you'll see the familiar Save As.. sheet with the Encrypt checkbox. Enabling this allows you to set a password for the PDF file.

[crarko adds: I tested this, and it works as described. This may be common knowledge, but serves as another example of why it's often helpful to explore the modifier keys in an application before getting too frustrated.]

Export vector drawings from Keynote to a PNG with transparency

Mon, 03/17/2014 - 15:00
Instead of buying expensive vector drawing software, Keynote can be used as a simple but great vector drawing tool. The problem is you can only export entire slides as images from the File menu and there will be a white background. There is no obvious way of exporting just the vector art to an image file. Fortunately there is a solution. Use the following method to extract just your vector art creation to a .png file with alpha transparency.
  • Create a vector-based drawing.
  • Drag and select the entire vector drawing you are going to export.
  • Choose Edit » Copy from the menus.
  • Open Preview.app.
  • In Preview choose File » New from Clipboard.
  • The vector drawing will then appear with a transparent background, ready to be exported as a PNG.
[crarko adds: It seems like a quick, cheap way to go the job. Probably not for all situations.]

Display iTunes artwork in Growl notifications

Fri, 03/14/2014 - 14:00
OS X and Growl notifications are AppleScriptable and great for displaying user-defined text, but not so hot for user-defined images. OS X can only display the sending application's icon, and Growl no longer accepts raw iTunes artwork image data or regular image files.

Growl's iTunes limitation can be overcome by converting an iTunes track's raw artwork image data into a TIFF file that can be read and passed to Growl: tell application "iTunes" to set _rawData to raw data of artwork 1 of current track set _startupDisk to (path to startup disk as text) set _tempTiffFile to (open for access file (_star ...

iOS: Search text in Google through contextual menus

Wed, 03/12/2014 - 14:00
Unlike with the Mac, in iOS there is no way to select text and search for it on Google in a new tab. There is, however, a workaround that brings about the same result on iOS.

Select text in Safari to bring up the context menu on iOS and then tap on Define. This brings up the dictionary panel for the selected text. If you've selected a word that is not in the dictionary, or multiple words or usually even if the word is in the dictionary, on the bottom right there is Search Web. Tapping that opens a new tab and searches for the selected text. This is equivalent to selecting text, copying, opening new tab, pasting the text in omnibar.

Things to note:
  • Even though the hint mentions Google, this uses the default search engine set in the Safari preferences so your preference is respected.
  • This is not specific to Safari. Any app that allows selection of text, and brings up the contextual menu will work with this by opening Safari. ...

Make Time Machine use a Local Volume as a Network Volume

Tue, 03/11/2014 - 14:00
This procedure shows you how to prevent Time Machine from using all available free space on a local volume by backing up to a sparse disk image bundle stored on a shared folder on a local volume.

Time machine uses a feature of the HFS+ filesystem that was introduced in Mac OS X 10.5 (Leopard) called 'directory hard links.' Like file hard links, a directory that is hard linked to another directory is not actually a distinct directory, but is instead a pointer to the original directory. Time Machine uses these directory hard links to reduce duplication and save space by making references to entire directory trees whose contained files have not been modified. To properly copy or duplicate a Time Machine backup, these directory hard links must be preserved. Unfortunately, directory hard links are proprietary to Apple. Apple discourages their casual use by third party developers because, if used incorrectly, they could create recursive directory structures that would ren ...

10.9: Disable power button sleep

Fri, 03/07/2014 - 15:00
Here is a way to disable sleeping when pressing the power button on 10.9.2. In Terminal, type in the following command and then press Enter.

defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool no

This causes the 'Are you sure you want to shut down your computer now?' dialog to come up much quicker too.

[crarko adds: I tested this, and it works as described. I had to log out and log back in; I'm not sure if that's necessary.]

Keychain Access now supports iCloud Secure Notes

Wed, 03/05/2014 - 15:15
The Secure Notes feature in Keychain Access now allows syncing of notes across multiple Macs using iCloud Keychain.

To add a note to be synchronized across all of your configured Macs, select the iCloud keychain from the list and select File » New Secure Note item.... Make a title for the note, input some content, and save it. This note will now appear across all Macs. This feature is still exclusive to Mac OS; there is no iOS support yet.

Another way to add a note to the iCloud keychain is to drag an existing Secure Note from another keychain onto the iCloud keychain icon in the keychain list. Option+drag to copy, or just move it with drag and drop without a modifier key.

[crarko adds: I didn't have a chance to test this yet. I hope Apple does add this to iOS as well. It would be nice to have things go the other way.]

10.9: Smart folders on the Dock

Tue, 03/04/2014 - 15:00
In OS X 10.9 Mavericks a smart folder (or a saved search) dragged to the Dock behaves like a folder (smart folders by default are saved under ~/Library/Saved Searches). Right click gives sorting, display and viewing options similar to ordinary folders dragged to the Dock. A drawer icon is shown if Display as Folder option is selected. In grid view Quick Look works, too.

I did not check if it works under 10.8 or 10.7. I have to mention that there was already a hint about how to add 'recent things' stack to the Dock.

[crarko adds: I tested this, and it works as described.]

Put image/video inside secure notes in Keychain

Fri, 02/28/2014 - 15:00
I'm not sure if this is documented already. When you create a secure note from Keychain, it will accept an image or movie just as easily as it will accept text. I was able to put an image in one note and a movie in another. You can also play the movie while it's secured inside the note.

Create a secure note from the menu bar, then copy and paste the image into the note. That's it, the image is saved inside a secure note. You're done.

To put a movie inside a secure note, go to the file location on the Finder to locate the movie. Drag the movie to the body of the secure note.

[crarko adds: I'm not sure if it's documented either. This is a fairly old submission in the queue, so things may have changed recently.]

Quickly close all tabs in iOS 7

Thu, 02/27/2014 - 15:00
As satisfying as the swipe to close feature in mobile Safari is, it becomes a bit of a chore to close more than a few tabs.

To close all tabs at once, tap the new tab icon (two overlapping squares), tap Private, and then Close All. Repeat the first two steps and tap '+' (or the screen) to get back to an empty Safari in your preferred browsing state.

I only have an iOS 7 device to test this in.

[crarko adds: I tested this, and it works as described. I also only have iOS 7.]

Pages