iPhone Development

Just another iPhone Blog

AGE Meter LIVE as iChat Status via Apple Script

Necessity is the Mother of Invention” – I just experienced the truth of it. Wait, I haven’t invented anything here. Since, I had the appetite do something new and noticeable on my Birthday, I came with AGE Meter, which displays your AGE as iChat status message, and its LIVE, updated every second

 

iChatStatus

 

I had written an Apple Script to set the Chat Message, and since many people follow my iChat status message, I thought let me update my AGE every second, which is something new in a status message, Right?. It received awesome response and I would like to share this script and let you experience the awesomeness of it.

 

 

NOTE: This script requires Mac OS X 10.4 and above, AppleScript Editor, iChat Messager for Mac OS X , PHP Installed

 

The Script is divided in to two parts

 

1. Apple Script – to update the iChat Message status

 

2. PHP script – to calculate the difference between current date and your Birthdate. This script is invoked by AppleScript and its result (the Age in Years, Months, Days, Hours, Minutes, Seconds ) is piped to AppleScript for final display

 

You can find the script here.

 

Installation

 

1. Unzip the BirthdayCounter.zip, which you have downloaded. Once unzipped, you  should find a “BirthdayCounter” Folder. This folder has two files “BirthdayCounter_AppleScript” and “DateDifference.php”

 

2. Update your Birthdate here in this line in DateDifference.php file, located at the end of the script. Please note that the time should be in GMT.

 

echo dateDiff(“1976-06-23 02:00:00”, “now”) . “\n”;

 

3. Open “BirthdayCounter_AppleScript” in Apple Script Editor and Tap Run. There you go, the AGE meter has started.

 

 

Let me know if it looks awesomely for you 🙂

 

 


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: