OS X: Scripting “Needs Access To Assistive Devices” Accessibility

Some app needs access to assistive devices.”  This message appears on a lot of software starting in Mavericks and Yosemite and is slow to fix without scripting it.

If you are a systems administrator and have thousands of computers to deploy this app to, do you really want to manually walk through six steps on every computer you need to do this for?  That will take a long time and a lot of manual work. Continue reading “OS X: Scripting “Needs Access To Assistive Devices” Accessibility”

OS X: Screenshots Not Appearing On Desktop?

Sometimes screen shots will no longer appear as files on the Desktop.  The screenshot sound will play, but nothing will appear.  There is an easy fix for this:

Run this one-line command from Terminal.  You can change ~/Desktop  to any directory you want, too.

defaults write com.apple.screencapture location ~/Desktop/;killall SystemUIServer

 

QuickLooks Most Powerful Feature Is Disabled By Default!

QuickLook is one of Apple’s best additions to OS X.  You can view all sorts of files, even if you do not have the correct program installed on your Mac.  Just hit the space bar while a file is highlighted.  I often want to look at a text file, copy something, and paste it into another document.  After running two Terminal commands, this is possible through QuickLook without ever having to open the document.  I’m not certain why Apple doesn’t enable this by default.

Open Terminal and enter these two commands:

defaults write com.apple.finder QLEnableTextSelection -bool TRUE
killall Finder

Now you will be able to highlight text and copy it directly from the QuickLook window.  This is especially useful if someone sends you a .docx and don’t have Microsoft Office installed.

quicklook-textselection

OS X: Bulk Rename Computers That Are Being Repurposed

Whenever I get a bunch of new computers and phase out some old ones, I typically want them to have the same name.  Since I do not want duplicates, I just prepend (or append) “Repurpose-” to the computer name.  Then, I can name the new computer with the same without any conflicts.  Finally, I update the JSS record of the computer to change it’s building to “Recycled.”  Below is the script I use to do this. Continue reading “OS X: Bulk Rename Computers That Are Being Repurposed”

Use TextExpander To Run Shell Scripts

TextExpander is great for saving time writing repetitive text.  However, I recently discovered that you can also run scripts via a TextExpander keystroke.  To do this, create a new snippet and choose Shell Script as the Content type.  Then type your script in.

In the example below, I create a simple script that makes the computer talk, so I know that the script works.  All I need to do is type ;script and then Tab and it will make the computer run my script. Continue reading “Use TextExpander To Run Shell Scripts”

Freak Out Your Friends By Changing The “Ready” Message On HP Printers

How The Trick Works

You create a file or enter some Terminal commands, which get sent to the printer.  Instead of printing out what you typed, the printer recognizes that the text is actually a set of instructions, known as the Printer Job Language (PJL), which are then carried out by the printer.  In this case, we tell the printer to change the message shown on the little display on the printer.  So instead of it showing “READY,” you can make it say (almost) whatever you want. Continue reading “Freak Out Your Friends By Changing The “Ready” Message On HP Printers”