ApplesScript is a very interesting scripting language that allows the user to write scripts to automate computer tasks, it differs from the other script languages because of its syntax that is pretty closer to natural language.
I spent few hours this morning trying to understand how to write AppleScript scripts, It’s very simple, please read the AppleScript Language Guide to learn more about how to use AppleScript with your favorite applications.
The scripts below give to us an idea about how we can use AppleScript to change the behaviour of 4 most popular applications for MacOSX: iChat, Growl, Adium and Skype.
tell application "iChat"
set the status message to "New iChat status message"
iChatStatus can be used to change status message of the user on iChat. The first line starts with “tell” statement, we use this statement to specify the target of all commands on this script, in the second line we are using the “set” command to change a the value of “status message” property value on application to “New iChat status message”, the third line finishes the “tell” statement.