Applescript: make new contact group

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
Beriechil
Harmless
Posts: 4
Joined: Wed Feb 15, 2012 6:54 pm

Applescript: make new contact group

Post by Beriechil »

Dear Adium community,

I am currently trying to make a new contact group using Applescript. Does anyone have a working example code for that or can help me debug mine?

My non-working code:

Code: Select all

tell application "Adium" to tell account id 13 to make new contact group "test" with contacts {contact "contactName"}
Error: Can’t get contact group "test" of account id 13.

I also tried this:

Code: Select all

tell application "Adium" to make new contact group "test" with contacts {contact "contactName"}
which just gives me this error: Can’t make contact group "test" into type type.

---------------
More info, if needed / helpful:
I've found a working example code to create a new chat:

Code: Select all

tell application "Adium" to tell account id 13 to make new chat with contacts {contact "contactName"} with new chat window
So this proves the account id 13 and the contact "contactName" works for me. (The contact is not actually "contactName" but rather the contact's ID.)

Also, I found the account ID by using

Code: Select all

tell application "Adium" to get accounts
Beriechil
Harmless
Posts: 4
Joined: Wed Feb 15, 2012 6:54 pm

Re: Applescript: make new contact group

Post by Beriechil »

After playing around with it, let me rephrase my question: Is it even possible to create a new contact group using Applescript?

Or, alternatively, to move a contact to a group. Either I'm doing it wrong or it doesn't work in 1.4:

Code: Select all

move contact "contactName" to contact group "groupName"
Post Reply