Adium

Ticket #8972 (closed defect: fixed)

Opened 9 months ago

Last modified 7 months ago

AppleScript can not get the account of a contact in Tiger

Reported by: mtimmsj Assigned to: applmak
Priority: low Milestone: Adium X 1.3
Component: AppleScript Version: 1.2.3
Severity: normal Keywords: AppleScript contact account
Cc: Patch: None
Pending: 0

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

01/23/2008 06:01:12 PM changed by mtimmsj

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

01/29/2008 11:24:50 PM changed by jas8522

  • status changed from new to closed.
  • resolution set to invalid.

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

03/05/2008 03:36:52 PM changed by aurelio

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.

03/05/2008 04:45:38 PM changed by jas8522

  • status changed from closed to reopened.
  • cc set to applmak.
  • priority changed from normal to low.
  • version changed from 1.2 to 1.2.3.
  • milestone set to Adium X 1.2.x.
  • resolution deleted.

03/05/2008 04:45:50 PM changed by jas8522

  • cc deleted.
  • owner changed from nobody to applmak.
  • status changed from reopened to new.

03/19/2008 01:01:42 PM changed by applmak

  • status changed from new to closed.
  • resolution set to fixed.

(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.

03/19/2008 01:02:22 PM changed by applmak

  • milestone changed from Adium X 1.2.x to Adium X 1.3.