OpenPGP Encrypt Folder Action

Automate file encryption

On my MacBook I use the GPG Suite in order to keep my sensitive data secure, including data which I upload to the cloud. Encrypting files is something I do frequently, so I put together a small automator folder action to automatically encrypt files dropped into a specific folder.

For this to work, you’ll need the GPG Suite installed, with a private key setup. You’ll also need to adjust the ‘–recipient’ option in the bash code listed below.

Once the file has been encrypted it deletes the unencrypted copy, so be sure to keep your key safe.

 

Read More

Send an iMessage with an AppleScript

I don’t like waiting around for long processes to finish on my Mac, so I was recently hunting for a way of sending push notifications to my iPhone/iPad.. I gave up after a while, realising that nothing seemed reliable enough.. So then I changed tact, and that’s when I came up with this AppleScript. This uses OS X’s built in message’s app to send an iMessage to my mobile!

tell application "Messages"
	set intid to get id of first service
	set myRecipient to myRecipient "+44123456789" of service id intid
	send "Your full machine backup has now completed" to myRecipient
end tell
tell application "Messages"
	quit
end tell

This could quite easily be built into Automator Workflows etc.

Read More

How To: Use Automator to show/hide hidden files

This blog posts is one of the several guest blog posts to MikeSel.info. Posted by one of my readers Thomas Hazlett, Thomas has converted the terminal commands in my earlier post Show hidden files in OS X 10.7 or 10.8

  1. Launch -> /Aplications/Automator
  2. Select what type of workflow you would like. I feel a service is a good choice for this so go ahead and;
  3. Select -> Service
  4. At the top of the window there should be 2 combo-boxes.
  5. Select -> no input
  6. Select -> Finder.app
  7. Drag -> Run shell script; from the left panel to the right and enter the following:

(You may have to retype the quotes around the “YES” in the if statement).

8.   Below that Drag -> Ask for confirmation and enter a message to the effect of “Do you want to relaunch finder? This will cancel any file transfers etc.”Under that,
9.  Drag -> Run shell script and enter killall Finder
10.  Save it, naming it whatever you want it to appear as under the services submenu of the Finder menu.
11.   With Finder in the foreground, click Finder in the top left -> down to Services and click your newly created Service.

Thomas Hazlett is from and still lives in Belfast, N. Ireland. He is currently studying with the Open University towards his BSc in Computing and IT however has decided to take a year out to work on his own projects; start a blog; and spend more time doing home renovations. You can find more about him at www.hazlett.info

Read More

How-To: Mass rename files/folders in OS X

Have you ever had the need to rename several hundred files, in countless subfolders? Using nothing but Automator you can have it completed in minutes..

Using the method below you can:

  1. Find & Replace, in either the full name or just the file extension
  2. Add Date or Time
  3. Add additional text
  4. Change the case of the name
  5. Make Sequential
This comes especially handy if you need to change the extension of countless movies for instance.. So if you want to switch M4V’s to MP4’s for compatibility with media players:
  1. Launch ‘Automator’ from the Applications
  2. Chose Workflow from the menu
  3. Select ‘Files and Folders’ from the Actions panel on the left hand side
  4. Then drag a ‘Ask for Finder Items’ to the workflow
  5. Now, chose a ‘Get Folder Contents’, and tick the box to ‘Repeat for Each Subfolder’
  6. Then select a ‘Replace Text’ object from the actions menu.
  7. Change the selections depending on what you are wanting to achieve and then hit the ‘Run’ button.
That’s it, it really is as easy as that.. What’s more, to make it even easier I have uploaded the workflow template for you to download here.

Read More

Google Latitude as a desktop app – OS X Lion

Using nothing but OS X Lion’s built in ‘Automater’ you can create your very own desktop based ‘Web App’ for Google’s Latitude service (or any other URL for that matter)

The process is really simple, and only required 2 ‘Automater Methods’

  1. Launch Apple’s Automator application, from the applications folder
  2. Chose Application from the document type menu
  3. Add the ‘Get Specified URLs’ action from the actions list
  4. Add the address “https://www.google.co.uk/latitude/b/0/” (or any of your choosing) to the ‘Specified URLs’ action
  5. Add the ‘Website Popup’ action from the actions list
  6. Specify the screen size and user agent you prefer – you may be best adjusting these settings and running the Automator script a few times to see which works best.
Once you are happy with your settings, and URL specified then you can save this as an Application, now when you want to launch the new desktop web app all you have to do is double click on your new Automator Application!
Simple really!

Read More