Adium

Opened 9 years ago

Closed 9 years ago

Last modified 9 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: 1.2.3 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 9 years ago 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

comment:2 Changed 9 years ago by jas8522

  • Resolution set to invalid
  • Status changed from new to closed

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

comment:3 Changed 9 years ago 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.

comment:4 Changed 9 years ago by jas8522

  • Cc applmak added
  • Milestone set to Adium X 1.2.x
  • priority changed from normal to low
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from 1.2 to 1.2.3

comment:5 Changed 9 years ago by jas8522

  • Cc applmak removed
  • Owner changed from nobody to applmak
  • Status changed from reopened to new

comment:6 Changed 9 years ago by applmak

  • Resolution set to fixed
  • Status changed from new to closed

(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 9 years ago by applmak

  • Milestone changed from Adium X 1.2.x to Adium X 1.3
Note: See TracTickets for help on using tickets.