Rename Screen Shots AppleScript

Working in a support role means I spend alot of time using the built in OS X screen capture facilities, which generally means I end up with hundreds of Screen Shot ****.png files scattered all over my desktop.

Today I started working on the AppleScript below, which I have set as a folder action on my default screen capture folder.

It’s far from complete, and is definitely a current project, however I thought I’d share it at each stage.

To change your default screen capture directory, launch terminal and run the following command

defaults write com.apple.screencapture location /screencapturepath/;killall SystemUIServer

Would you do it differntly? Have an improvement to suggest? Drop me a note below.

Read More

Bulk folder rename AppleScript

I was recently approached by one of my blog readers John Ott, to help out with a bit of a technical challenge he had. John used a fairly complicated filing system for keeping track of lots of documents, blue prints and photos for projects him and his team work on. This included many subfolders with deep subfolders following a strict naming convention. When John starts a project, he used to copy and paste his top-level folder, then work his way through all its subfolders updating the folder names with the new project code. John reached out to me to see if I could help out, so I put together this Bulk folder rename AppleScript which takes user input for source and destination folders and the latest project code, it then traverses the folders and their subfolder and updates the names as required.

You can download a zipped up copy of the above script by clicking 

.

If you’ve a project and you’d like to see if I can help, get in touch using my Contact Form.

Read More

Set Microsoft Lync Availability using AppleScript

We have recently started the deployment of the Microsoft Lync Unified Communications platform, and although the majority of our user base uses Microsoft Windows – us lucky ones use OS X.. In light of that, I have a collection of AppleScripts for doing all manor of things in Lync. Here’s a simple one to change Lync’s presence state and update the ‘personal status message’

This could easily be adjusted to choose any of the other Lync Presence states available in the menu (including custom states). This is handy in Automator Workflows if you know your machine is going to be tied up whilst a task completes.

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

Unhide the Library folder in Finder – AppleScript

By default the ‘Library’ folder is a hidden folder in OS X Finder. However, if you need temporary (GUI) access you can use this simple AppleScript below to remove the ‘hidden’ flag from the folder.

tell application "System Events"
	set libvis to (get visible of folder "~/Library")
end tell

if libvis = false then --~/Library is currently invisible
	tell application "System Events" to set visible of folder "~/Library/" to true
else --~/Library is visible
	tell application "System Events" to set visible of folder "~/Library/" to false
end if

This script could also be easily amended to show and hide any folder of your choice, simply by replacing the ~/Library/ with the path of the folder you’d like to toggle.

Read More