iTunes Controller

Click to download

I guess all new programmers write a program to control iTunes. Maybe it is a right-of-passage, a ‘That was sooo cool, look what I did!’ sort of thing. Kind of like every beginning guitar player learns ‘Stairway to Heaven’ and ‘Smoke on the Water’. Whatever the reason we do these things I present my iTunes controller called Lil’ Helper.

You may be asking yourself about now why I would name a program that controlls iTunes Lil’ Helper. Well, the full version of Lil’ Helper does a whole lot more than control iTunes. I chopped it down so that I could share it with anyone who would find it useful and never changed the name.

My favorite part of Lil’ Helper is the jump forward sixty seconds button. I hate listening to commercials in podcasts so I zoom right through them!

Read the rest of this entry »

Open Current TextMate Document in Browser

For those of you who use TextMate to build webpages here is something you might like. A command to open the current document in your browser using the “http://localhost/~username/current_doc.html” path.

Here are two examples. One is using Ruby and requires RubyCocoa and the other is AppleScript.
Both examples return error text if the current document does not reside in your “Sites” folder. I set mine up as a command in the bundles editor and assign the return value to a “tool tip.”

The AppleScript version is currently only setup to work with either Safari or FireFox. Adding additional browsers is no problem if they are scriptable.

The Ruby version opens the current TM document in your “default” browser. You can change this setting in Safari’s preferences.

Read the rest of this entry »

LatestMacScripterPosts

REQUIRES LEOPARD. DOWNLOAD HERE 

 This is a cool app that focuses on the AppleScript forum MacScripter.net. It is a great way to see the latest posts from several of the forums and even has a web viewer to post responses, perform searches and view any post you choose.

Latest MacScripter Posts

Read the rest of this entry »

Convert AppleScript to Ruby Using Rb-Appscript

Edit: A few modification were made to clean up the code thanks to suggestions by Has!

In this tutorial we will take one of my commonly used AppleScripts and re-write it in Ruby using rb-appscript.

For those who do not know, rb-appscript is a bridge to communicate with scriptable applications through Apple Events using Ruby. It was written by Hamish Sanderson who has also written bridges for Obj-C and Python. Appscript website
Read the rest of this entry »

Calling Objective-C From AppleScript Using Call-Method

Introduction

Although many areas of the Cocoa framework are accessible through AppleScript in AppleScript Studio, many areas are not. You may also find using Objective-C is often easier than an equivalent AppleScript. The way we access Objective-C from AppleScript is with a call method.

The Reason For This Tutorial

As I began to use call methods I found very little information on how it is implemented. Apple has a short example here but does not go into much detail. There have been some questions and answers on the mail lists but nothing of great detail.

I am not an experienced Objective-C developer so the information below is from personal trial-and-error and examining the example application Multi-Language that Apple provides.

With that said, let’s get started! Hope you enjoy!
Read the rest of this entry »