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

An AppleScript to convert the clipboard to plain text System
Trying to convert RTF-formatted text on the clipboard to plain text is a nightmare. There are many solutions out there, some of which cost money, and others which are free but don't work reliably. So here's an AppleScript that will do the job:
  set the clipboard to string of (the clipboard as record)
on error errMsg
  display dialog errMsg
end try
Turn it into a run-only AppleScript, bind that AppleScript to a keyboard shorcut with a utility like Keyboard Maestro (my personal favorite), and never look back again. Note that the code above is adapted from the script "clip2pure_text" found at the bottom of this blog post.

[robg adds: In the comments to this older hint, an alternative method was provided -- just do a pbpaste | pbcopy, if you happen to be working in Terminal when you need this done.]
  Post a comment  •  Comments (18)  
  • Currently 2.43 / 5
  You rated: 5 / 5 (7 votes cast)
[16,377 views]  View Printable Version
One way to ease migration to a new Mac System
So you've bought a new Mac, but your old Mac is up-to-date with the latest software updates from Apple. Or you're doing a fresh install from your older install disk to a new drive, and plan on migrating from your old drive. Chances are your new Mac may NOT have all the current Mac software updates on it. Certainly your fresh install won't. Here's how to do migration sanely.

When asked if you are going to migrate your stuff from another Mac or partition, say no, and proceed to enter your user information -- make sure that your shortname is the same as on your other Mac or existing install. When you finish that, create a temporary account via System Preferences » Accounts.

Next run Software Update to bring the new Mac or install up to date. Run it again until it says there are no more updates, as some updates rely on others being installed before they will be available. Then log out of your account and into the temporary one. Now you are ready to migrate your original user and applications, and stuff from your old Mac or drive. Migration Assistant is located in /Applications » Utilities. Take the family out to dinner or a movie while your files are copied to the new Mac.
read more (187 words)   Post a comment  •  Comments (14)  
  • Currently 2.86 / 5
  You rated: 2 / 5 (7 votes cast)
[54,082 views]  View Printable Version
Disable the .Mac screen saver System
If you like to use the random screen saver option in the Desktop & Screen Saver System Preferences panel, you might find the .Mac screen saver somewhat annoying: unless you've configured slide shows in its Options panel, the default view is a bunch of Apple products fading in and out of your screen -- and when in random mode, the .Mac screen saver can appear at any time.

Someone on the Macworld forums asked about disabling it, and I thought of two possible solutions. First, you could go into the Options screen for the .Mac screen saver and uncheck the Public Slide Show option. This will cause the saver panel to show a message stating you need to pick at least one public show before using the .Mac screen saver. However, I don't know if this will prevent the .Mac screen saver from showing in the random rotation -- it's not an easy thing to test!

The second solution, and one that's guaranteed to work, is to remove the .Mac screen saver from the list. Screen savers are stored in the /System » Library » Screen Savers folder, but if you look there in the Finder, you won't see the .Mac saver listed. That's because its name starts with a period, which means the Finder believes it to be invisible.

So instead, quit System Preferences, open a Terminal, and execute these two commands, pressing Return after each and providing your admin password when asked:
$ cd "/System/Library/Screen Savers"
$ sudo mv .Mac.slideSaver .Mac.slideSaver.old
That's it; the .Mac screen saver is now disabled. To get it back in the future, just use these two commands:
$ cd "/System/Library/Screen Savers"
$ sudo mv .Mac.slideSaver.old .Mac.slideSaver
I did test this solution, and it works -- as one would expect, since we're just renaming a file.
  Post a comment  •  Comments (8)  
  • Currently 2.33 / 5
  You rated: 3 / 5 (3 votes cast)
[17,432 views]  View Printable Version
10.4: Generate PocketMod layouts via the Print dialog System
Using the built-in Mac OS X Automator scripting function, plus the Java-based Multivalent PDF Manipulation Toolkit, one can now create PocketMod documents from any Mac OS X application.

PocketMod is an origami-like manipulation of an 8½" by 11" piece of paper into an eight-page booklet. The output of the standard OS X print dialog box is manipulated using Multivalent to create the PocketMod format. This technique replaces the Flash-based version from the PocketMod website, and the stand-alone PagePacker application. The basics of the process are:
  1. Install Multivalent.
  2. Create an Automator workflow with the following Run Shell Script action:
    cat "$1" > /tmp/temp$$.pdf && java -classpath /path/to/Multivalent20060102.jar tool.pdf.Impose -dim 2x4 -layout "1l,2r,8l,3r,7l,4r,6l,5r" -paper letter -verbose /tmp/temp$$.pdf 2> /tmp/temp$$.err && open /tmp/temp$$-up.pdf
    Replace /path/to with the full Unix path to the Multivalent program.
  3. Save the Workflow as Print Workflow plug-in.
  4. Print as you would normally, and choose the PocketMod Mac option in the PDF pop-up menu.
Full details can be found in this post on the Disruptive Library Technology Jester blog.

[robg adds: I tried this, and it seemed to work as described.]
  Post a comment  •  Comments (9)  
  • Currently 2.00 / 5
  You rated: 3 / 5 (4 votes cast)
[16,153 views]  View Printable Version
Use Mail as a last-gasp frozen Finder repair helper System
When everything is seemingly lost, your Finder has crashed, Mirror Agent refuses to quit, and you're just about to pull out your eyebrows ... just calm down, as I have a hint for you. What you need, if you're in that predicament, is Activity Monitor. A wonderful little app that resides in your Utilities folder.

"But wait," you say, "I can't use the Finder! How am I supposed to get to the Activity Monitor?" Right you are, but luckily the Dock almost always works. And if you have Apple's Mail application in your dock, you're in business. First, open Mail if it isn't open already. Then click the New button and then the Attach button. In the resulting dialog, choose the Activity Monitor (from Applications » Utilities). When you see the attachment in the new message, right-click (or control-click) on the attachment. In the menu that appears, choose Open With » Other, and choose the Activity Monitor again. When Mail prompts you, choose the Open button.

When Activity Monitor launches, choose All Processes from the drop-down menu at the top of the window. Type the name of the offending app in the Filter field. Click on the app in the list box and press the Quit Process button then, when prompted, press the Force Quit button. This fixes many problems that may arise from a frozen Finder, so don't forget it.

[robg adds: The interesting thing here, to me anyway, is using Mail to launch pretty much any program on your machine. In the generic version, just attach any tiny document to the new email, control-click on it, then pick the application you'd like to run from the Other option in the Open With menu. In my testing, this worked with everything I tried. Interesting...]
  Post a comment  •  Comments (23)  
  • Currently 2.60 / 5
  You rated: 4 / 5 (5 votes cast)
[12,737 views]  View Printable Version
Temporarily prevent sleep, screen saver activation, etc. System
There are times when it is desirable to prevent sleep mode, screen saver activation, etc. For example, during Software Update activity. However, it is inconvenient to temporarily change settings in System Preferences temporarily. There are other hardware and software solutions to keep your machine awake, such as Mouse Jiggler.

I offer a simple solution for those with an optical mouse: a watch or clock with a sweep second hand. Simply place the mouse on the face of the watch in such a way that the eye of the mouse can see the second hand pass beneath it. Every 60 seconds (like clockwork -- oof!), the cursor will move a few pixels, refreshing the display.
  Post a comment  •  Comments (15)  
  • Currently 3.00 / 5
  You rated: 1 / 5 (5 votes cast)
[31,170 views]  View Printable Version
Possible causes of a self-waking Mac System
Every night, I put my computer to sleep. Some mornings, I find that, for no discernible reason, my computer has turned itself on. It's not scheduled to turn on, and I don't know of any program that could be doing it. There's nothing in the system log that gives any hint; it shows essentially the same thing that it shows when I wake up my computer manually.

After scouring the net for an explanation, I found reports from people with similar problems. Somebody pointed out that you can sometimes (always??) wake up a computer by plugging in or unplugging a USB device. My keyboard is plugged in through a cheap hub; a loose connection might cause intermittent disconnects. One user on a forum somewhere (I've lost track of the original location) claims that his computer wakes up whenever he uses his microwave or other high-power device! He says that his electrical system is rather old, and suspects that the sudden power drain causes his computer to temporarily reduce power to his USB peripherals, which wakes the computer.

[robg adds: I had this issue with my old G5 and a really cheap USB hub, too. One night I disconnected all the USB peripherals and it slept just fine. The next day, I replaced the USB hub, and the machine no longer woke randomly overnight. (It was awake one morning when I went into the office, but the cat sleeping nearby on the desk told me exactly why the Mac had woken up!)]
  Post a comment  •  Comments (32)  
  • Currently 2.14 / 5
  You rated: 5 / 5 (7 votes cast)
[40,381 views]  View Printable Version
Caution: Do not rename a user's home folder System
I didn't realise this was possible, but it happened to a friend. She must have inadvertently clicked the trackpad while typing on her MacBook, and overtyped the home folder name -- which is indeed possible, without so much as a warning!

On the next reboot, she had a brand new user account, with all her stuff apparently gone! I helped her to put things back by simply renaming the new user folder (which appeared in her correct short user name) to '123,' then renaming the 'good' folder with her short user name and re-logging in. All was good again!

But what a bummer that this is possible! I wonder how many people had this happen and had to give up living....

[robg adds: This bug (feature?) has existed in OS X for as long as I can remember, so I was surprised to find we've never run a hint about it before. You can indeed really ruin your day by renaming your user's home folder then restarting. The fix shown here is the one I've used with friends in the past, and it seems to work with no ill effects. If you ever want to change your short user name on purpose, Apple provides a solution -- at 40 steps, this is not something to undertake lightly. A much better solution, in my opinion, is ChangeShortName, a free program by Dan Frakes and James Bucanek. Full disclosure: I work with Dan Frakes at Macworld.]
  Post a comment  •  Comments (44)  
  • Currently 2.50 / 5
  You rated: 2 / 5 (6 votes cast)
[75,686 views]  View Printable Version
Switch apps with two finger scroll System
This one surprisingly went undiscovered (by me) until just now. I like to use the keyboard and trackpad on my PowerBook a lot, and I am always looking for ways to work more efficiently. I frequently switch applications using the Command-Tab (or Command-Shift-Tab) keyboard combo. Sometimes after Command Tabbing, I'll use the trackpad and pointer to move the mouse to an application that is more than a few positions away from the current app. This involves (as it turns out) an unneccessary movement of the mouse. While command-tabbing, you can two finger scroll, and this will run through the open applications and avoids having to move precisely to the individual application. Pretty slick, pretty simple.

[robg adds: Similarly, the scroll ball on the Mighty Mouse also works for switching applications in the Command-Tab interface. I thought we'd at least mentioned the Mighty Mouse method here before, but it doesn't look like it.]
  Post a comment  •  Comments (15)  
  • Currently 1.33 / 5
  You rated: 2 / 5 (3 votes cast)
[11,520 views]  View Printable Version
Prevent windowserver.log from filling with entries System
OS X has a habit of writing messages to /var » log » windowserver.log every time you press Command-Tab. This has been discussed before on the forums. There have also been cases reported of people running out of disk space because windowserver.log starts growing without bounds (although this has never happened to me personally). The log entries look like this (date and time removed for narrower display):
 [139] Hot key operating mode is now all but UA disabled
 [139] "Dock" (0x6a07) set hot key operating mode to normal
 [139] Hot key operating mode is now normal
Anyway, both of these issues can be solved very simply: by turning the windowserver.log file into a /dev/null device. Then all logged messages will simply be dropped, and no disk activity or consumption will occur at all.
read more (186 words)   Post a comment  •  Comments (5)  
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
[13,051 views]  View Printable Version