Apple Mac News - MacHash - Latest Apple News...

MacOSXHints logo MacOSXHints Headline News Reader

  • How to hide all .plist.lockfile files

    Expand
    18 May 2012, 7:30 am
    Apple has introduced an additional type of preference file in Lion, those whose names end in ".plist.lockfile". Here is a good explanation of the function of those files:...
    Apple has introduced an additional type of preference file in Lion, those whose names end in ".plist.lockfile". Here is a good explanation of the function of those files: Lockfiles and other plist file subtypes in OS X Lion

    Since plist.lockfiles do not contain any useful information for the user and almost double the content of and clutter the Preferences folders in /Library and ~/Library, I've been looking for a way to hide those files. With help from Yvan Koenig of MacScripter in this topic (I'm flex20 in that forum), I wrote an AppleScript "Hide Unhide plist.lockfile.scpt," which provides a quick and easy way of hiding or unhiding all those pesky files.

    You will need an admin password to run the script because some of the ".plist.lockfile" files can only be changed by admi ...

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • "Portable" TextWrangler with Dropbox

    Expand
    17 May 2012, 7:30 am
    I love TextWrangler, and I have a Mac at work and one at home, but often do coding on both. I set up a system using Dropbox so both my preferences and my Application Support files sync so I always have my stationery files and the same settings, wherever I am....
    I love TextWrangler, and I have a Mac at work and one at home, but often do coding on both. I set up a system using Dropbox so both my preferences and my Application Support files sync so I always have my stationery files and the same settings, wherever I am.

    Run the following as a shell script on each of the Macs. This will copy TextWrangler to your Dropbox folder, and create the support folder on Dropbox, then create a symlink to it in the correct location on your Macs. It will then copy the preference files to Dropbox, so when you launch the application on either Mac, you'll have the same setup.
    #!/bin/bash
    #+ Portable TextWrangler
    
    #* Formatted date & time string.
    FORMATTED_DATE=`/bin/date "+%Y-%m-%d%H%M%S"`
    
    #+  ...


    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Permanently Unhide Library

    Expand
    16 May 2012, 7:30 am
    When Apple shipped Mac OS X Lion 10.7, the “Library” folder located within every user’s home folder, which had previously been visible to users in the Finder, was made invisible. This hint shows how to make the folder visible and keep it that way...
    When Apple shipped Mac OS X Lion 10.7, the “Library” folder located within every user’s home folder, which had previously been visible to users in the Finder, was made invisible. This hint shows how to make the folder visible and keep it that way forever.

    As you may know, and as mentioned in this hint, the Library folder can be made visible again by running the following command in Terminal:

    /usr/bin/chflags nohidden ~/Library

    Apple keeps making the folder invisible again with every System update, so it gets tedious re-running the above script. You can automate this by adding a Login Item with an AppleScript "script application" containing the following code:

    do shell script "/usr/bin/chflags nohidden ~/Library"

    Read detailed instructions for this hint, and download a ready-made script application file on the ...



    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • New poll: Does your main Mac have an SSD?

    Expand
    15 May 2012, 7:31 am
    As SSDs become more common, and prices drop, more and more people are either buying Macs with SSDs, or installing them in their Macs. Personally, I started using an SSD with the first MacBook Air in 2008, and bought my current Mac - a Mac mini, purchased in...
    As SSDs become more common, and prices drop, more and more people are either buying Macs with SSDs, or installing them in their Macs. Personally, I started using an SSD with the first MacBook Air in 2008, and bought my current Mac - a Mac mini, purchased in 2011 - with an SSD. The gains in performance are huge, though the price still makes them a choice that is not for everyone.

    So, what about you? Does your main Mac - the one you use most - have an SSD? Feel free to post in the comments to the poll which model, whether you bought it with the Mac or installed it yourself, or any other comments you may have about SSDs.

    Vote in the poll

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Copy partially played Audiobooks to a playlist

    Expand
    15 May 2012, 7:30 am
    iTunes Smart Playlists don't offer a criteria to find tracks which have been partially played. While "Last Skipped" is an option, this track property may not be set if the track wasn't actually skipped and was merely stopped....
    iTunes Smart Playlists don't offer a criteria to find tracks which have been partially played. While "Last Skipped" is an option, this track property may not be set if the track wasn't actually skipped and was merely stopped.

    However, if a track's "Remember playback position" option is set (and most audiobooks have this set by default) the track's AppleScript bookmark property will contain the number of seconds that a track has advanced before being stopped. Thus, any track with a bookmark value greater than zero would have been partially played.

    Here is an AppleScript that will copy all the tracks in the "Books" library to a new playlist named "Partially Played". Each time it is run it will update the "Partially Played" playlist.
    property nameOfPlaylist : "Partially Played"
    
    tell application "iTunes"
    	try
    		set thePlaylist to some playlist whose name is nameOfPlaylist
    	on error
    		set thePlaylist to (make playlist with properties {nam ...


    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Two AppleScripts for unmounting, mounting local disk volumes

    Expand
    15 May 2012, 7:30 am
    These AppleScripts are related to this hint. Both can already be found in the replies to the hint topic post, but I'm resubmitting them so that they will appear together....
    These AppleScripts are related to this hint. Both can already be found in the replies to the hint topic post, but I'm resubmitting them so that they will appear together.

    The first is an improved version of the original AppleScript which presents a dialog box from which a selection of local volumes to be ejected can be made. An example of its usefulness might be that it provides a reliable method for quickly ejecting a MacBook's mounted local volumes for users on the go. I've configured it as a "Run AppleScript" step for an Automator-based Mac OS X Service called "Unmounter" and assigned it the keyboard shortcut of (Command-Control-Shift-E) in System Preferences on my system.

    The second is a more robust version of the AppleScript included in my first reply to the original hint topic. It attempts to automatically unmount all unmountable local volumes, and if it finds none, attempts to mo ...

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Open certain preference panes with quick shortcut

    Expand
    14 May 2012, 7:30 am
    If you press the Option key, then press certain dedicated keys on the standard Apple keyboard, preference panes will open. This works for Mission Control (Option-F3 or Option-F4), Displays (Option-F1 or Option-F2), and Sound (Option-F10, Option-F11 or...
    If you press the Option key, then press certain dedicated keys on the standard Apple keyboard, preference panes will open. This works for Mission Control (Option-F3 or Option-F4), Displays (Option-F1 or Option-F2), and Sound (Option-F10, Option-F11 or Option-F12). The F keys in question are those which act on the given features, either displaying Dashboard or Mission Control (F3 and F4), decreasing or increasing brightness (F1 and F2), or changing or muting volume (F10, F11 and F12). If you use a laptop, you may need to press the Fn key together with the other keys to open these preference panes.


    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Drag files from Safari 5 Downloads popup

    Expand
    14 May 2012, 7:30 am
    I recently tried to drag from Safari's Downloads popup and found that if you drag from the icon of the downloaded file, you can move it where you want....
    I recently tried to drag from Safari's Downloads popup and found that if you drag from the icon of the downloaded file, you can move it where you want.

    Click on an icon in the Downloads popup and drag it to any folder, or even onto a Dock icon to launch a file you've just downloaded with a specific application.

    [kirkmc adds: This seems obvious, but there's no hint here for it. There have been hints about double-clicking an icon in the Downloads window to open it, copying and pasting URLs from the Downloads window, and the keyboard shortcut to show the Downloads popup (Command-Option-L).]

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Save all of your Terminal activity to a file

    Expand
    11 May 2012, 7:30 am
    I use Terminal everyday, and I find it a good idea to log everything I you. It makes it much easier to undo your mistakes when you know what those mistakes were. Here's how I do this:...
    I use Terminal everyday, and I find it a good idea to log everything I you. It makes it much easier to undo your mistakes when you know what those mistakes were. Here's how I do this:

    Open Terminal's preferences.

    Go to Settings, then Shell. You can choose here to run a command at startup. You could create a simple log of your session using the following:
    /usr/bin/script ~/Desktop/Terminal.log
    This will log everything you do and append it to the log file.

    I like to keep my history so instead I wrote this small script that archives previous sessions by renaming the file with a date/time string. I then set Terminal.app to run at startup the following command:
    ~/Desktop/logger.sh
    Here's the script:
    #!/bin/bash
    # logger.sh
    # Log everything you do in Terminal.
    
    #* Formatted date & time string.
    FORMATTED_DATE=`/bin/date "+%Y-%m-%d%H%M%S"`
    
    #* Archive the previous file
    /bin/cp -f ~/Desktop/Terminal ...


    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Remove rubber band scrolling in most apps

    Expand
    10 May 2012, 7:30 am
    Combining some findings from a recent hint and on Apple's forums, I've finally found a way to disable the annoying rubber-band scrolling in most applications. All the credit goes to those guys as they did the initial investigation....
    Combining some findings from a recent hint and on Apple's forums, I've finally found a way to disable the annoying rubber-band scrolling in most applications. All the credit goes to those guys as they did the initial investigation.

    It works in applications like:
    • Finder
    • Mail
    • Preview
    • TextEdit
    • Xcode
    and probably in most applications that use the standard UI (the string to be used in defaults appears in AppKit.framework). It doesn't work in Safari or iTunes.

    In Terminal type:
    defaults write -g NSScrollViewRubberbanding -int 0
    It should work after you relaunch your applications.

    To undo this change, run this command in Terminal:
    defaults delete -g NSScrollViewRubberbanding
    [kirkmc adds: Works as described. I haven't tested many apps, so feel free to post which o ...

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • View full track info in iOS Music App

    Expand
    9 May 2012, 7:30 am
    This hint solves a long standing problem when playing classical music on an iPhone. When using the iPhone Music app (iOS 5.1), the full entry (e.g. name of artist, album or song title) for an item can be too long to be displayed. Tap and hold entry to see the...
    This hint solves a long standing problem when playing classical music on an iPhone. When using the iPhone Music app (iOS 5.1), the full entry (e.g. name of artist, album or song title) for an item can be too long to be displayed. Tap and hold entry to see the full entry pop up. Tap and drag your finger down the list to make the pop up change as you drag. This works for album titles, song titles, and artists names.

    [kirkmc adds: Nice. I hadn't heard of this before, but searching the web shows that it is not totally unknown. Since it hasn't shown up here before, it's worth posting.]

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Allow custom URL protocols in Lion Server wiki pages

    Expand
    9 May 2012, 7:30 am
    If you use Lion Server, and its wiki server, you may find it useful to use custom URL protocols for internal documents and links. Apple has published a technical note explaining how to do this. This document explains how to create the necessary configuration...
    If you use Lion Server, and its wiki server, you may find it useful to use custom URL protocols for internal documents and links. Apple has published a technical note explaining how to do this. This document explains how to create the necessary configuration file - /etc/collabd/filter_whitelist.plist - for any custom URL protocol you wish to use.

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Remove scrolling elasticity in Xcode

    Expand
    8 May 2012, 7:30 am
    Mac OS X Lion introduced iOS-style scrolling elasticity. Do you think it's annoying, and it slows you down while working in Xcode? Here's how to remove it....
    Mac OS X Lion introduced iOS-style scrolling elasticity. Do you think it's annoying, and it slows you down while working in Xcode? Here's how to remove it.

    Copy this Xcode plugin to the following directory:

    ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/

    You should create the directories if needed.

    Enjoy!

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Scroll PDF in Finder in Column View

    Expand
    7 May 2012, 7:30 am
    In the Finder, when working in Column View, if you select a multipage PDF you can scroll up and down in the document. This is much faster than using the small arrow controls, and appears to work with any input device that can scroll....
    In the Finder, when working in Column View, if you select a multipage PDF you can scroll up and down in the document. This is much faster than using the small arrow controls, and appears to work with any input device that can scroll.

    [kirkmc adds: Several points. First, in Column View, you need to have Show Preview Column checked in the View settings. When you select a PDF, its first page shows in the Preview column. From there, you hover your cursor and see two arrow buttons. You can either click on these or scroll.

    This might be useful if you just need a quick glance at a file, but once you've selected the PDF, you can view it in Quick Look by pressing the space bar, which lets you see the document at full size.]

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Moving custom paper sizes from Snow Leopard to Lion

    Expand
    4 May 2012, 7:30 am
    I was recently asked to see if I could copy over the custom page sizes from a Snow Leopard machine over to a Lion machine....

    I was recently asked to see if I could copy over the custom page sizes from a Snow Leopard machine over to a Lion machine.

    While finding the right file in ~/Library/Preferences (com.apple.print.custompapers.plist) wasn't so difficult, it turned out that the Snow Leopard version of the file is binary encoded while the Lion version is not. (It may be that this file was grandfathered in from a previous system.)

    XCode for Lion can convert the file to a regular XML text file:

    1. Open the file in Xcode.
    2. Choose File > Duplicate.
    3. In the Save dialog box, select "Property List XML" from the Format drop-down list.

    Moving the regular text version over to Lion and putting it into the Preferences folder gave us a way to copy a huge list of custom paper sizes from one designer to another quickly and easily.



    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • AppleScript for selecting local volumes to unmount

    Expand
    3 May 2012, 7:30 am
    Note: An updated version of this script (in fact two new scripts) has been posted as a new hint. These new scripts take into account many of the comments posted below. Please see the new hint to find the improved version....
    Note: An updated version of this script (in fact two new scripts) has been posted as a new hint. These new scripts take into account many of the comments posted below. Please see the new hint to find the improved version.

    Here's an AppleScript that presents a dialog box listing mounted local volumes, one or more of which can be selected for unmounting. Some solutions for doing this either require the use of additional system resources or are offered commercially. This AppleScript is free, of course. I’ve only tested it in Lion so far. I recommend that you set up a keyboard shortcut that launches the AppleScript either as part of a Mac OS X Automator Service, or from the Script menu, which (in Lion) can be configured using the Keyboard preferences. ...

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Option-up arrow and Option-down arrow cycle through sent messages in iChat

    Expand
    2 May 2012, 7:30 am
    When focus is in the text entry field in an iChat chat window, holding option and using your up and down arrow keys cycles through the previous messages you've sent. This is very similar to how Terminal lets you cycle through previous command just using the up...
    When focus is in the text entry field in an iChat chat window, holding option and using your up and down arrow keys cycles through the previous messages you've sent. This is very similar to how Terminal lets you cycle through previous command just using the up and down arrow keys.

    [kirkmc adds: I actually spotted this a while ago. I'm not sure why it's there; and I don't really see any use for it, other than, perhaps, to find a text you sent to someone without scrolling in the window, and then copy it to send to someone else. This works in Lion; can anyone confirm that whether works in earlier versions of OS X or not?]

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Build a service to count characters, words and paragraphs

    Expand
    1 May 2012, 7:30 am
    Apple does not provide any way to count the number of characters in a selected text. Fortunately, you can create your own very easily using Automator....
    Apple does not provide any way to count the number of characters in a selected text. Fortunately, you can create your own very easily using Automator.

    Launch Automator and create a new Service. Add the Run AppleScript script action, then paste the following code:
    on run {input, parameters}
    	try
    		set MyText to input as string
    		set NombreSignes to the number of characters of MyText
    		set NombreMots to the number of words of MyText
    		set NombrePara to the number of paragraphs of MyText
    		set LeResultat to "The selected text contains :" & return & "- " & NombreSignes & " sign(s) ;" & return & "- " & NombreMots & " word(s) ;" & return & "- " & NombrePara & " paragraph(s)."
    		display dialog LeResultat buttons {"OK"} default button 1 with icon note
    	on ...


    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Use Logitech N305 number pad with Mac

    Expand
    30 April 2012, 7:30 am
    My right shoulder had been hurting lately, due to the movement necessary to reach my trackpad. I was using a standard, wired Apple keyboard with the number pad on the right, and my Magic Trackpad was to the right of that, making me reach pretty far to access...
    My right shoulder had been hurting lately, due to the movement necessary to reach my trackpad. I was using a standard, wired Apple keyboard with the number pad on the right, and my Magic Trackpad was to the right of that, making me reach pretty far to access it.

    So, I set out in search of a standalone number pad I could use with my Mac. While I don't work with numbers often, when I do my accounting, it's a pain to have to type numbers from the top row of the keyboard. I looked at a number of models - both wired and wireless - and found what seemed to be the best choice: Logitech's N305. This works with Logitech's Unifying Receiver, is fairly compact, and, according to Logitech, works for three years with a pair of batteries.

    But the N305 does not support Macs. Fortunately, in reviews for the product on Amazon, a number of people posted a solution. Download the free KeyRemap4MacBook, a preference p ...

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article
  • Reduce the size of Google Chrome

    Expand
    27 April 2012, 7:30 am
    ]Google Chrome keeps older versions of its web browser causing it to balloon in size. I noticed that the Google Chrome App on my Mac was 1.2 GB. That seemed a bit portly for a web browser. Upon looking into the app's bundle, by right-clicking and choosing Show...
    ]Google Chrome keeps older versions of its web browser causing it to balloon in size. I noticed that the Google Chrome App on my Mac was 1.2 GB. That seemed a bit portly for a web browser. Upon looking into the app's bundle, by right-clicking and choosing Show Package Contents, I found multiple old versions of the app, all which appeared to be nearly identical. I removed all but the most recent version and everything appears to run correctly and the app size is now a much more slim 113 MB.

    [kirkmc adds: Interesting. On my Mac, in the bundle, in Contents > Versions, there are, indeed, two versions of Chrome. This presumably has something to do with Chrome's silent updating. (Queries on Twitter suggest that this is the norm; a number of people replied that theirs was around 220 MB, as was mine.) Make sure you keep the one with the highest version number. You could also, of course, just download a new copy.

    If you want to turn off this automatic updating, s ...

    Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon
    Permalink* Read Article