You may be familiar with the aim: URL scheme, which allows web pages to interact with the AIM client software when the user clicks on a hyperlink..While it's not the most powerful programming model, it's very easy to learn and use. Four of the most common aim: URLs are "AddBuddy", "GoIM", "GoChat", and "BuddyIcon", which I will discuss in more detail below.
AddBuddy is fairly self-explanatory; it typically looks like this:
aim:AddBuddy?screenname=juberti
Clicking this will bring up the AIM user interface to add the specified screenname to your buddylist. It is also possible to add multiple screennames at once, using the "ListOfScreenNames" parameter, and to specify what group they should be added to, using the "GroupName" parameter:
aim:AddBuddy?GroupName=Bots&ListOfScreenNames=aoljournals,zolaonaol,millionaireIM
GoIM allows one to prepopulate an IM window, here's an example:
aim:GoIM?screenname=juberti&message=This+Is+A+Test.
Note the use of the '+' character for spaces; if you want to use the actual '+' character in the URL, you'll need to use '%2B' instead. This ends up being important if you want to send an IM to an SMS number, such as +18005551212.
Also, GoIM will only compose the IM, not send it; this is by design.
GoChat causes the client to automatically enter the specified chat room. The example below creates a new private room called "My Room".
aim:GoChat?roomname=My+Room
BuddyIcon allows you to set the specified screenname's buddy icon to an image that you specify (the user will be prompted first). The example below sets the buddy icon for a user named "test" to be a cool Rubik's Cube.
aim:BuddyIcon?screenname=test&src=http://www.originalicons.com/images/icons/Toys/Classics/1100779782_171306471.gif
Those are the basics. However, there are several other aim: URLs that are also fairly interesting. I'll be writing about those in a future post.
Subscribe to:
Post Comments (Atom)
3 comments:
Don't forget the 'exchange' argument for the chatrooms!
call cell
Works a treat but cant figure out how to change url to allow auto chat to a .Mac account. When setting up a buddy who's a .Mac you add @mac.com to end of <user>. I tried aim:goim?screenname=<user>@mac.com and it didn't work. Anyone been able to get this to work??
A .Mac account works off same servers as AIM accounts so I suspect we either have to use another command instead of screenname or modify the screenname to identify it as a mac.com user
Post a Comment