Adium

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8972 closed defect (fixed)

AppleScript can not get the account of a contact in Tiger

Reported by: mtimmsj Owned by: applmak
Milestone: Adium 1.3 Component: AppleScript
Version: Severity: normal
Keywords: AppleScript contact account Cc:
Patch Status:

Description

In MacOSX 10.4.11 with Adium 1.2 the following AppleScript throws an error:

tell application "Adium" to get the account of the contact of the active chat

The error is: "Adium got an error: Can't make account of contact of active chat into type reference."

This error is not seen with 10.5.1. I thought that this might be a workaround, but it doesn't work either:

tell application "Adium"
  set theName to the name of the contact of the active chat as string
  set theAccount to the account of the contact theName
end tell

Change History (7)

comment:1 Changed 12 years ago by Mike

I found a workaround that works in both Tiger and Leopard. The account is now a property of the chat so you can do:

tell application "Adium" to get the account of the active chat

comment:2 Changed 12 years ago by Jordan

Resolution: invalid
Status: newclosed

So then this is not a problem if there is a simpler solution...

comment:3 Changed 12 years ago by Aurelio Jargas

I would like to reopen this isssue.

Regardless of the proposed "active chat" workaround, according to http://trac.adiumx.com/wiki/AppleScript_Support_1.2, account is a property of the contact class. So the following should work:

tell application "Adium" to get account of contact 1

It works indeed in Leopard (10.5.1), but not in Tiger (10.4.11). Tested with Adium 1.2.3 in both systems. This is the error raised in Tiger:

AppleScript Error
Adium 1.2.3 got an error: Can't make account contact 1 into type reference.

It's very useful when dealing with contacts, not being limited to the ones you're chatting.

comment:4 Changed 12 years ago by Jordan

Cc: Matt Handley added
Milestone: Adium X 1.2.x
priority: normallow
Resolution: invalid
Status: closedreopened
Version: 1.21.2.3

comment:5 Changed 12 years ago by Jordan

Cc: Matt Handley removed
Owner: changed from nobody to Matt Handley
Status: reopenednew

comment:6 Changed 12 years ago by Matt Handley

Resolution: fixed
Status: newclosed

(In [22957]) Closes #8972. Per the discussion on the adium devl list, this change should not be released until 1.3, as it will break existing compiled scripts. Also, many other four-letter codes may need changing. I'll make a new ticket for that, as well.

comment:7 Changed 12 years ago by Matt Handley

Milestone: Adium X 1.2.xAdium X 1.3
Note: See TracTickets for help on using tickets.