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

Fix iChat AppleScripts in Mountain Lion System 10.8
I noticed that my iChat-related AppleScripts had stopped working after the 10.8 upgrade. Apparently, Messages no longer answers to the name iChat; you have to edit your scripts to call "Messages" instead, like this:
tell application "Messages" to set status message to "On Mountain Lion"
I'm pretty sure the beta didn't break backwards compatibility like that, and I really can't think of a good reason for it.

[kirkmc adds: It's true that the name of an application like this changes it should probably still respond to the old name. So scripters beware. It's worth noting that both Contacts and Messages do respond to their old names if you search for them in Spotlight, though Calendar does not.]
  Post a comment  •  Comments (4)  
  • Currently 3.75 / 5
  You rated: 5 / 5 (4 votes cast)
[3,392 views] Email Article To a Friend View Printable Version
Chronologically sort trimmed videos in iPhoto Apps
if you take movies with your iOS device (or other camera) that need to be trimmed, you may have encountered the following. If you do not trim the movie on the device, but do it later on your Mac using QuickTime, the file’s date will change to the date you trimmed it, resulting in an incorrect sort order in iPhoto.

Terminal and touch come to the rescue:

First check the original file’s date and time in the Finder by selecting it and pressing Command-I.

Then, in Terminal, use touch to change the date and time. Here’s an example:
 touch -t 201208191230 /Users/myname/Desktop/ 
This will change the file's modification date to August 19, 2012 at 12:30. Doing this before importing the trimmed video will keep an appropriate sort order in iPhoto.

Check man touch for more on using this command.

[kirkmc adds: The touch command is nothing new, and there's even a hint about using touch with iPhoto that's more than ten years old. I thought it was worth posting this, however, because of the issue with dates that are changed when editing files such as movies.

If you want a GUI alternative, you should look at A Better Finder Attributes, which I recently reviewed for Macworld.]
  Post a comment  •  Comments (3)  
  • Currently 3.20 / 5
  You rated: 2 / 5 (5 votes cast)
[2,840 views] Email Article To a Friend View Printable Version
Script to Pause and Resume Growl with a Hidden Menu Icon Apps
Growl includes a feature to pause and resume notifications, which is very useful when giving presentations or screen sharing. Unfortunately, the UI only exposes this feature via the menu icon. With this script you can hide the icon and control notifications via a launcher such as QuickSilver or Alfred.
 * Pause and resume Growl. Use in a launcher like Quicksilver or Alfred to
 * pause and resume Growl when the menu bar icon is disabled.
 * Author: Andrew Berry,
tell application "Growl"
	register as application "Growl pause/resume" all notifications {"Growl paused", "Growl resumed"} default notifications {"Growl paused", "Growl resumed"} icon of application "Growl"
	if is paused then
		notify with name "Growl resumed" title "Growl resumed" description "Growl notifications resumed" application name "Growl pause/resume"
		notify with name "Growl paused" title "Growl paused" description "Growl notifications paused" application name "Growl pause/resume"
	end if
end tell
If you wish to make any improvements to this, feel free to fork the code over at Gist.
  Post a comment  •  Comments (4)  
  • Currently 2.00 / 5
  You rated: 3 / 5 (5 votes cast)
[2,844 views] Email Article To a Friend View Printable Version
Replace Notes app brown title bar with gray Apps
If you don't care for Apple's skeuomorphic design in Calendar and Notes in Mountain Lion, here's a way you can change Notes to use a gray titlebar and inactive buttons.

Do the following:
  • Copy Notes from /Applications to a safe place in case you want to revert back to the original.
  • Download this archive which contains a few gray graphic files.
  • Unzip the archive; it contains a folder called Notes dark grey.
  • Browse to /Applications/ in Finder. (Right-click on the Notes app and choose Show Package Contents, then go to the Resources folder.)
  • Quit Notes if it is running.
  • Copy the 5 PNG files from Notes dark grey to /Applications/
  • Restart and enjoy
[kirkmc adds: Beware that this may not work after an OS X upgrade, so you may need to do the above operation again.]
  Post a comment  •  Comments (2)  
  • Currently 2.57 / 5
  You rated: 3 / 5 (7 votes cast)
[2,776 views] Email Article To a Friend View Printable Version
Use two-finger scroll to change pages in Finder column View file preview System 10.7
If you're in Column View in the Finder, select a PDF and you'll see a preview of the file in the rightmost column. There are two next and previous arrows to switch pages, but you can also scroll using two fingers (or a scroll wheel on a mouse) to move through the document.

[kirkmc adds: This works with PDFs, but it doesn't work with Word documents, which seem to have recently inherited the next and previous buttons in Column View previews.]
  Post a comment  •  Comments (1)  
  • Currently 2.90 / 5
  You rated: 3 / 5 (21 votes cast)
[11,610 views] Email Article To a Friend View Printable Version
View more export options in Preview Apps
Preview in 10.8 has removed a number of export options. If you choose File > Export, there are only six options in the Format popup menu, compared to 13 in the Lion version of the application.

Alas, this is yet another feature that has more options hidden behind an Option keypress. Hold down the Option key when clicking on the Format menu to see all 13 available options.
  Post a comment  •  Comments (12)  
  • Currently 3.75 / 5
  You rated: 2 / 5 (8 votes cast)
[11,592 views] Email Article To a Friend View Printable Version
AppleScript to tweet via Notification Center System 10.8
The Click to Tweet button in Notification Center is just crying out for a way to activate it without taking your hands off your keyboard. Over at StackExchange, user Ewwis posted the following AppleScript. Save this and launch it with, say, LaunchBar or another launcher. It displays a dialog where you can post your tweet, then, when you click on OK, displays Notification Center and sends your tweet.
display dialog "Tweet?" default answer "" buttons {"OK"} default button 1
set mytweet to text returned of result

tell application "System Events"
    tell process "Notification Center"
        click menu bar item 1 of menu bar 1
        click button 1 of UI element 1 of row 2 of table 1 of scroll area 1 of window "window"
        keystroke mytweet
        keystroke "D" using {command down, shift down}
        keystroke space
    end tell
end tell
  Post a comment  •  Comments (1)  
  • Currently 2.80 / 5
  You rated: 1 / 5 (5 votes cast)
[4,117 views] Email Article To a Friend View Printable Version
Send Terminal output to iCloud UNIX
Imagine that you run a script automatically on your Mac, and that you want to check the result of that script. There are many ways you could do this, such as remotely connecting to the Mac, or sending the results by e-mail. But with iCloud, you can also save the output to a file and put it on iCloud, where you can access it with your favorite iCloud-compatible text editor on another Mac, or on an iOS device.

To do so, simply send the output of the script to a file like this:

~/Library/Mobile\ Documents/com\~apple\~TextEdit/Documents/filename.txt

So, to save a list of a directory's contents, you'd use this:

ls -al > ~/Library/Mobile\ Documents/com\~apple\~TextEdit/Documents/list.txt

That saves a file called list.txt in TextEdit's Documents folder. Look inside the ~/Library/Mobile\ Documents folder for the paths to other apps you have that can use iCloud. Each folder in the Mobile Documents folder has a Documents sub-folder. Depending on the app, you may be able to access the files on another Mac or on iOS.
  Post a comment  •  Comments (4)  
  • Currently 2.80 / 5
  You rated: 1 / 5 (5 votes cast)
[4,083 views] Email Article To a Friend View Printable Version
Drag e-mails to Notes, and save links to e-mails Apps
You can drag an e-mail from Mail to Notes, and Notes will display a clickable link with the subject of the e-mail. Click that link to open the e-mail in Mail.

What's interesting is that you can then copy the link to the message by right-clicking and choosing Copy Link. When you paste the link into a text editor, it will look something like this:

If you paste the link into an application that can recognize it as a link, it will be clickable, and will open the e-mail. For example, TextEdit will display this as a link, if you're using an RTF document. I use BusyCal as my calendar application, and pasting an e-mail link in the Notes field results in a clickable link; however, Apple's Calendar doesn't recognize it as such. The Scrivener word processor recognizes it as a link, but Microsoft Word doesn't.
  Post a comment  •  Comments (2)  
  • Currently 3.00 / 5
  You rated: 1 / 5 (6 votes cast)
[3,770 views] Email Article To a Friend View Printable Version
Choose number of days displayed in week view in Calendar System 10.8
In previous versions of OS X, you could access a secret Debug menu in iCal - now Calendar - offering many interesting options. Apple removed any way to activate this menu in Mountain Lion, but you can still access some options. I like to have two weeks displayed in week view in Calendar. To do so, quit Calendar and open Terminal, then type:
defaults write CalUIDebugDefaultDaysInWeekView XX
replacing XX with the number of days in the week. You can even use very large values, such as 90, to display 3 months in a week view, though each day will be very small.

To go back with the 7-days-a-week view, simply type:
 defaults write CalUIDebugDefaultDaysInWeekView 7 
and relaunch Calendar.
  Post a comment  •  Comments (11)  
  • Currently 4.25 / 5
  You rated: 3 / 5 (8 votes cast)
[9,431 views] Email Article To a Friend View Printable Version