AppleScript

AppleScript: Creating To-Dos in iCal

Posted by admin 5 August, 2008 (0) Comment

Recently, a friend asked me to create an AppleScript that would allow him to automate To-Dos with a Mail.app mail rule. I immediately rose to the occasion because this was a cool idea: Mail.app could run the script when you get an ebill, for instance, for your car payment. The script would then create an iCal To-Do for “Pay your car payment, now!”

The script
set theSumm to “Pay My Bill Soon!”
set dueDate to (current date) + 10 * days
set theUrl to “http://www.paymybillexample.com”
set thepriority to 1

tell application “iCal”
make todo at end of events of (item 1 of every calendar) with properties {summary:theSumm, due date:dueDate, url:theUrl, priority:thepriority}
end tell

Read the rest of this entry

Popularity: 9% [?]

Categories : AppleScript, Features, How-tos Tags : , , , , ,

AppleScript: Taking screenshots

Posted by admin 7 July, 2008 (0) Comment


Last week, Dave mentioned that you can change the file type used system-wide for screenshots. However, some people are afraid of using Terminal.app to muck around with their Mac. In this week’s AppleScript article, I am going to show you how to take screenshots and change their file type using an AppleScript.

The AppleScript
property N : 0
set N to N + 1
set picPath to ((POSIX path of (path to desktop)) & “Picture_” & N & “.png”) as string
do shell script “screencapture ” & quoted form of picPath


Using the AppleScript
Open the ScriptEditor (/Applications/AppleScript/ScriptEditor.app). Copy/paste the AppleScript into the script edtitor and click the run button at the top. You will hear the camera shutter sound and a picture will be taken and saved to your desktop.

This script comes in handy when you want to take a screenshot in a different format. To do this, just change the “.png” file type to whatever you might want (say, .jpg, .tiff, etc.). When you re-run the script, the new file type will be associated with the capture image.

Continue reading to learn how to save this script.
Read the rest of this entry

Popularity: 11% [?]

Categories : AppleScript, Features, How-tos Tags : , , , , ,

Simplify media transcription with hotkeys and AppleScript

Posted by admin 26 June, 2008 (0) Comment

I’ve found myself transcribing different types of media lately; primarily recorded Skype conversations and footage from interviews. I do a lot of work in Scrivener, an application so enjoyable that it makes me want to write a lot more than I do. Scrivener allows for a split pane editor with a QuickTime media file loaded in one pane, and your current document in the other. While you type you can hit Shift-Space to start and stop the media. I loved it, but I wanted to take it to another level. There are applications specifically designed for this, but why not have a system-wide, works-with-anything solution?

Find out how I did it after the jump.
Read the rest of this entry

Popularity: 13% [?]

Categories : AppleScript, How-tos, Productivity Tags : , , ,

AppleScript: Integrating shell scripts

Posted by admin 23 June, 2008 (0) Comment

We’ve talked about AppleScript how-tos before. AppleScript is fun and all, but what if you already know how to write shell scripts? Well, did you know that by integrating shells scripts into AppleScript, you can create simple applications that do useful things? It’s true, and I am going to show you how.

Continue reading to learn how to integrate shell scripts into AppleScripts.
Read the rest of this entry

Popularity: 14% [?]

Categories : AppleScript, Features, How-tos Tags : , , , , , , , ,