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

Use TextEdit in native Full Screen mode Apps
Do you love TextEdit for its simplicity and elegance? Have you ever thought that it'd be great to use it in full screen mode? Here's how to achieve that. Apple has released TextEdit's source code as an example of an Xcode project; with Xcode installed, you'll be able to manufacture a version of TextEdit with full screen support.

Open TextEdit.xcodeproj and on the left, find the Interfaces folder and select the file DocumentWindow. Then, select the window; make sure you select the window itself and not one of the objects contained in it. On the right, you can see the different inspectors Xcode provides. You'll want to select the fourth, the Attributes inspector. There are a lot of changeable attributes of the window available, but what we're interested in is the full screen support. Change that to "Primary Window". Build and run the application. Presto, you have full screen support!

To get the finished, executable application, locate "TextEdit.app" in the folder "products", right click on it and "Show in Finder". You can move or copy it to a place of your choice - you might wanna keep the original TextEdit application, just to be safe though.
  Post a comment  •  Comments (4)  
  • Currently 1.80 / 5
  You rated: 4 / 5 (5 votes cast)
 
[5,852 views] Email Article To a Friend View Printable Version
Remove old events from Calendar Apps
Ever wanted to remove all events prior to a given date from your calendar? Well, there's a script for that. This Applescript prompts you for a pivot date and removes all events prior to this date from your Calendar database.

display dialog "Please set the pivot date. (Events earlier than the pivot date will be deleted.)" default answer "01-01-2010" with icon note
set dateLimit to (date the (text returned of the result))
display dialog "This might take a few minutes." giving up after 2

tell application "Calendar"
    set cals to every calendar whose writable is true
    set r to {}
    repeat with c in cals
        set event_list to every event in c
        repeat with e in event_list
            if start date of e is less than dateLimit then
                set r to r & {e} 
            end if
        end repeat
    end repeat
    if the number of items in r > 1 then
		display dialog "Nothing to delete."
    else
        display dialog "Done. Found " & (number of items in r) & " events with a date before " & dateLimit & ". Shall I delete them?"
        repeat with e in r
            delete e
        end repeat
        display dialog "Done." buttons {"OK"} default button 1
    end if
  Post a comment  •  Comments (4)  
  • Currently 2.14 / 5
  You rated: 4 / 5 (7 votes cast)
 
[6,456 views] Email Article To a Friend View Printable Version
Use Finder's Paste Item Exactly to maintain permissions Apps
You may already be aware that the Finder allows you to copy and paste files and folders to move them around on your Mac: Select a file, choose Edit -> Copy, navigate elsewhere, and then choose Paste Item. Now you've copied the file, and it exists in two places.

If you hold down the Option key, that Paste Item command changes to Move Item Here instead. Now instead of duplicating the file in question, you've changed its location on your Mac. Great!

But here's the hint: Hold down Shift and Option together, and the command becomes Paste Item Exactly. (You can use the keyboard shortcut Shift-Option-Command-V if you're dextrous.) When you select that option, the Finder prompts you for an administrator password. This option ensures that the file's original ownership and permission settings (that you'd set via the Get Info panel, or via the chmod and chown commands, for example) are maintained exactly.

  Post a comment  •  Comments (3)  
  • Currently 3.00 / 5
  You rated: 5 / 5 (9 votes cast)
 
[8,123 views] Email Article To a Friend View Printable Version
Hide TextEdit's ruler by default Apps

If, like me, you wish that TextEdit did not show its ruler by default, this hint is for you.

TextEdit displays the ruler by default when creating or opening rich text documents. I find the ruler visually cluttering and distracting, and I rarely ever need it.

Unfortunately, TextEdit does not offer a way to turn off the ruler by default in its Preferences window. But it can be done using the following simple steps:

  1. Quit TextEdit if it is running.
  2. Enter the following command into a Terminal window: defaults write com.apple.TextEdit ShowRuler 0
  3. Open TextEdit.
  4. Enjoy increased visual and mental tranquility.

You can always show the ruler if you need it for something by pressing ⌘R or choosing Format > Text > Show Ruler from TextEdit's menus.

To revert TextEdit to its default setting, repeat steps 1 to 3 above, but use this command in Terminal instead: defaults delete com.apple.TextEdit ShowRuler

  Post a comment  •  Comments (13)  
  • Currently 2.11 / 5
  You rated: 5 / 5 (9 votes cast)
 
[4,659 views] Email Article To a Friend View Printable Version
Access dozens of awesome high-res screen saver images on your Mac for desktop backgrounds Apps
As first pointed out by OS X Daily, Mountain Lion's built-in screen savers cycle through a couple dozen awesome photos, across several categories, with images of space, nature, and more. The images are huge—and thus make great desktop backgrounds.

To find the images, use the Go To Folder command in the Finder (from the Go menu) and navigate here:

/System/Library/Frameworks/ScreenSaver.Framework/Versions/A/Resources/Default Collections/

There, you'll find four folders full of high-resolution imagery. You can copy them elsewhere, or even access the images from right where they are. Simply fire up the Desktop & Screen Saver preference pane, click the Plus (+) icon at the left, and add the folders—or individual images—as desired.
  Post a comment  •  Comments (3)  
  • Currently 4.18 / 5
  You rated: 5 / 5 (11 votes cast)
 
[6,167 views] Email Article To a Friend View Printable Version
Do more with Siri and navigation Apps

You already know that you can use Siri to ask for directions. You might say, “Give me directions to 1 Infinite Loop in Cupertino, California,” or you might say “Take me home” when you’re out and about.

But there are a few other things you can say to Siri whilst your iOS device is helping you navigate, and you might not know about these options.

Ask Siri, “Are we there yet?”—or similar, less obnoxious incarnations of that query—and you’ll get an update on your estimated time of arrival. You can get more specific, too. Ask, “When is my next turn,” and Siri will give you the number of minutes until you should encounter it.

Tank running low? Ask Siri where the nearest gas station is, and you’ll get suggestions for fill-up spots along your current route. If you tap one, though, you’ll cancel your current navigation in lieu of the new destination instead.

  Post a comment  •  Comments (1)  
  • Currently 3.14 / 5
  You rated: 2 / 5 (7 votes cast)
 
[6,637 views] Email Article To a Friend View Printable Version
How to pull a password from Keychain to use in a script Apps
Quite some time ago, I needed to create a script which would mount a network volume. I did not want to hardcode username and password into the script, so I kept looking for ways to accomplish this using OS X’s built-in Keychain. The following example uses a script to mount a network volume, using variables for the currently logged-in user, and fetches its password from the Keychain. Of course, you can do other things with this approach, so I figured it might be of use to someone out there.

The following is a combination of these 2 links:
http://hintsforums.macworld.com/showthread.php?t=163359
http://blog.macromates.com/2006/keychain-access-from-shell/

This script gets the password for the currently logged in user and pulls its password from the Keychain. It then mounts a share using the variables without hardcoded username/password. The mount point is not in /Volumes on purpose, because mounting the volume would not work for User B when Fast User Switching is in use and User A remains logged in without having unmounted the volume. echo $USER gets the username of the currently logged in user.
$(get_pw) contains the password retrieved from the user’s keychain.

In this case I am mounting an AFP volume, but it could be any other protocol, as well as something completely different which has nothing to do with mounting volumes.

get_pw () {
  security 2>&1 >/dev/null find-generic-password -ga $USER 
  |ruby -e 'print $1 if STDIN.gets =~ /^password: "(.*)"$/'
}
mkdir ~/Data
mount -t afp afp://$USER:$(get_pw)@10.0.77.3/Data ~/Data
Before running this script you have to create a new entry using Keychain Access with the username and its (server) password.

The steps are as follows:

Manually create a Keychain entry for the AFP user account. To do so open Keychain Access.app and hit cmd+n. Keychain Item Name does not matter, but Account and Password have to be filled out with the user’s username+password. That is the login info of the AFP account on the server!

Then create a shell script the way you prefer. I usually use pico, but there’s also a "run shell script" workflow in Automator if you want to use it. The script is shown above. Here’s a short explanation of what’s happening in the script:

We issue the security command which itself is able to read info from the keychain. It fills the variable $get_pw with the password it retrieved from the keychain. That’s why you need to create the keychain entry mentioned above. Instead of hardcoding which user’s password to get we use another variable called $USER. This always represents the currently logged in user (try echo $USER in Terminal as an example). In the next step we create the mount point, but instead of the default location (/Volumes) we use ~/ to ensure the mount point is inside the user home. This prevents the mount point from being already in use when using Fast User Switching. The last step then mounts the desired share using both variables. In my case that is the share Data on the server 10.0.77.3 which will be mounted at ~/Data.

In order for this to work you need to use network user accounts (Open Directory, LDAP, Active Directory, etc.) OR have to use the exact same username (password does not matter) for the local account and the account on the afp server. That is because $USER will always return the currently logged in user’s name which will be the local account if you are not using network accounts. In my case it was perfect that way, because I use network accounts anyway. You could always replace $USER in the script with jon.doe while losing the flexibility of the solution. I wanted a script without hardcoded usernames or passwords which could get the needed information dynamically from the keychain, which is exactly what this does.
  Post a comment  •  Comments (4)  
  • Currently 3.17 / 5
  You rated: 2 / 5 (6 votes cast)
 
[8,938 views] Email Article To a Friend View Printable Version
Send an RSS item from ReadKit to Safari's Reading List Apps
ReadKit (http://www.readkitapp.com) is an RSS reader that synchronizes with multiple RSS services. It supports sending articles to read-later services such as Instapaper, Readability and Pocket. However, out of the box there is no way to send an article to Safari's Reading List (aside from manually copy-and-pasting the URL into Safari).

Reading List (RL) is very handy if you have multiple iOS devices, since articles in RL are automatically synchronized and downloaded on each devices. Below, I will describe a simple service that import the currently selected article in ReadKit into RL.

  • Open Automator and create a new Service. Call the Service "Add to Reading List"
  • Select Service receives: "no input"
  • Click on the next drop-down box, select "Other..." and find ReadKit in the Applications folder
  • On the left-hand side sidebar, select "Utilities" and then double-click the action "Run AppleScript"
  • Copy and paste the content of this script into the window
  • Save the service and quit Automator.
  • To add a keyboard shortcut, go to System Preferences -> Keyboard -> Keyboard Shortcuts and select "Services"
  • Find the "Add to Reading List" service and add your preferred shortcut.
  Post a comment  •  Comments (1)  
  • Currently 2.57 / 5
  You rated: 2 / 5 (7 votes cast)
 
[6,274 views] Email Article To a Friend View Printable Version
Cache Google Maps for offline access on iOS Apps
Google's recent update for the Maps app introduced a variety of new features and improvements. One of those is the ability to save map data for offline access.

If you use Google Maps on a Wi-Fi only iPad, or if you'll be traveling somewhere where cellular data is spotty, knowing how to enable offline caching of map data is pretty important. CNet explained the trick recently.

First, you'll need to zoom in a bit; you can't cache a widely-zoomed-out map view. Then, when you're at the spot you'd like to cache, type OK maps into the search box, and then tap Search.

When you do that, a Google Maps icon will appear briefly, followed by a message indicating that your map data was saved. Now, even when you're offline, if you navigate to your cached areas, the map data will appear.
  Post a comment  •  Comments (6)  
  • Currently 3.57 / 5
  You rated: 2 / 5 (7 votes cast)
 
[13,651 views] Email Article To a Friend View Printable Version
Navigate directly to recently accessed files and apps Apps
Sometimes, an old hint is so good, it bears repeating. Years ago, we shared a hint involving the Recent Items section of the Apple menu.

Next time you're looking at that particular section, hold down the Command key. The names of your recent apps and files—which you could otherwise select to launch as desired—will change. For example, if your Recent Apps list included Acorn, that item would change to Show Acorn in Finder. And yes, this works with documents, too.

So if you very quickly want to find specific files in the Finder that you know you used recently, the Apple menu's Recent Items section, in tandem with the Command key, can help you out in a jiffy.
  Post a comment  •  Comments (9)  
  • Currently 2.56 / 5
  You rated: 2 / 5 (9 votes cast)
 
[5,196 views] Email Article To a Friend View Printable Version