Getting iChat buddy id from IMServices

  • I have an application that uses the InstantMessage and AddressBook
    frameworks gather IM information about a contact and then uses
    Applescript to tell iChat to send that buddy a message. But it stopped
    working with Leopard and I can't find a fix.

    In Tiger, I could construct the buddy ID by taking the service name
    (using IMPersonServiceNameKey), appending a colon, and appending the
    buddy's screen name (using IMPersonScreenNameKey). So I would get
    something like AIM:wonderfulbuddy and I could pass that to iChat via
    Applescript.

    But it seems that in Leopard, iChat is using some sort of GUID in
    place of the service name. My buddy IDs in Script Editor appear like
    "DA369698-A9EA-4BED-95F3-890092D1086D:wonderfulbuddy".

    So... is there a way to extract this information from the Instant
    Message framework so I can communicate with iChat? Or is there some
    other way I can IM a buddy I've gotten via the framework?

    Thanks for any help!

    Derrick
  • On 2.1.2008, at 7:39, Derrick Bass wrote:

    > I have an application that uses the InstantMessage and AddressBook
    > frameworks gather IM information about a contact and then uses
    > Applescript to tell iChat to send that buddy a message. But it
    > stopped working with Leopard and I can't find a fix.
    >
    > In Tiger, I could construct the buddy ID by taking the service name
    > (using IMPersonServiceNameKey), appending a colon, and appending the
    > buddy's screen name (using IMPersonScreenNameKey). So I would get
    > something like AIM:wonderfulbuddy and I could pass that to iChat via
    > Applescript.
    >
    > But it seems that in Leopard, iChat is using some sort of GUID in
    > place of the service name. My buddy IDs in Script Editor appear like
    > "DA369698-A9EA-4BED-95F3-890092D1086D:wonderfulbuddy".
    >
    > So... is there a way to extract this information from the Instant
    > Message framework so I can communicate with iChat? Or is there some
    > other way I can IM a buddy I've gotten via the framework?
    >
    > Thanks for any help!
    >
    > Derrick
    >

    Hi,
    I didn't test it by myself, but I believe you can use the new
    scripting bridge support introduced in Leopard.

    <file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/ScriptingAutomation/Reference/ScriptingBridgeFramework/index.html#//apple_ref/doc/uid/TP40005074
    >

    HTH
    Robert
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today