Simplify the "status message" contact/account property into one getter method. Correct error -1728 from AS on contact's status messages. Fixes #13460.
The totally undocumented -1728 error appears to be caused by runtime type disagreeing with event type. "status message" is apparently assumed to only have 1 code, so specifying one for contacts and one for accounts was confusing it when it was going to fetch it.
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
3 <dictionary title="Adium Terminology">
4 <suite name="Adium Suite" code="Adum" description="AppleScript support for Adium">
5 <value-type name="TIFF picture" code="TIFF">
6 <cocoa class="NSData"/>
8 <class name="application" code="capp" description="Adium's application class">
9 <cocoa class="AIApplication" />
10 <property name="name" code="pnam" type="text" access="r" description="The name of the application."/>
11 <property name="frontmost" code="pisf" type="boolean" access="r" description="Is this the frontmost (active) application?">
12 <cocoa key="isActive"/>
14 <property name="version" code="vers" type="text" access="r" description="The version of the application."/>
15 <property name="active chat" code="Pcht" type="chat" access="r" description="The frontmost chat."/>
17 <property name="global status" code="Pgst" type="status" access="rw" description="The global status. This is the status that the most online accounts are currently using; it will only be an offline status if no accounts are online. Setting it changes the status for all accounts.">
18 <cocoa key="globalStatus"/>
21 <element type="account" />
22 <element type="contact" />
23 <element type="contact group" />
24 <element type="service" />
25 <element type="window">
26 <cocoa key="orderedWindows" />
28 <element type="chat window" />
29 <element type="chat" />
30 <element type="status" />
32 <responds-to name="go online">
33 <cocoa method="scriptingGoOnline:"/>
35 <responds-to name="go available">
36 <cocoa method="scriptingGoAvailable:"/>
38 <responds-to name="go offline">
39 <cocoa method="scriptingGoOffline:"/>
41 <responds-to name="go away">
42 <cocoa method="scriptingGoAway:"/>
44 <responds-to name="go invisible">
45 <cocoa method="scriptingGoInvisible:"/>
47 <responds-to name="GetURL">
48 <cocoa method="scriptingGetURL:"/>
51 <class name="service" code="Csrv" description="An Adium service (a.k.a. chat protocol)">
52 <cocoa class="AIService" />
53 <property name="name" code="pnam" type="text" access="r" description="The name of the service.">
54 <cocoa key="serviceID" />
56 <property name="image" code="Pimg" type="TIFF picture" access="r" description="The image associated with this service." />
57 <element type="account" />
59 <class name="window" code="cwin" description="A window in Adium">
60 <cocoa class="NSWindow" />
61 <property name="name" code="pnam" type="text" access="r" description="The title of this window">
62 <cocoa key="scriptingTitle" />
64 <property name="id" code="ID " type="integer" access="r" description="The unique identifier of the window.">
65 <cocoa key="uniqueID"/>
67 <property name="index" code="pidx" type="integer" description="The index of the window, ordered front to back.">
68 <cocoa key="orderedIndex"/>
70 <property name="bounds" code="pbnd" type="rectangle" description="The bounding rectangle of the window.">
71 <cocoa key="boundsAsQDRect"/>
73 <property name="closeable" code="hclb" type="boolean" access="r" description="Whether the window has a close box.">
74 <cocoa key="hasCloseBox"/>
76 <property name="minimizable" code="ismn" type="boolean" access="r" description="Whether the window can be minimized.">
77 <cocoa key="isMiniaturizable"/>
79 <property name="minimized" code="pmnd" type="boolean" description="Whether the window is currently minimized.">
80 <cocoa key="isMiniaturized"/>
82 <property name="resizable" code="prsz" type="boolean" access="r" description="Whether the window can be resized.">
83 <cocoa key="isResizable"/>
85 <property name="visible" code="pvis" type="boolean" description="Whether the window is currently visible.">
86 <cocoa key="isVisible"/>
88 <property name="zoomable" code="iszm" type="boolean" access="r" description="Whether the window can be zoomed.">
89 <cocoa key="isZoomable"/>
91 <property name="zoomed" code="pzum" type="boolean" description="Whether the window is currently zoomed.">
92 <cocoa key="isZoomed"/>
95 <class name="chat window" code="Ctwn" description="A window that contains chats" inherits="window">
96 <cocoa class="AIMessageWindow" />
97 <element type="chat" />
98 <responds-to name="close">
99 <cocoa method="handleCloseScriptCommand:"/>
102 <class name="chat" code="Chat" description="A chat in Adium">
103 <cocoa class="AIChat" />
104 <property name="name" code="pnam" type="text" access="r" description="The name of the chat">
105 <cocoa key="scriptingName" />
107 <property name="ID" code="ID " type="text" access="r" description="The unique identifier of the chat.">
108 <cocoa key="uniqueChatID"/>
110 <property name="account" code="Cact" type="account" access="r" description="The account associated with this chat">
111 <cocoa key="scriptingAccount" />
113 <property name="date opened" code="CDop" type="date" access="r" description="The date and time at which this chat was opened">
114 <cocoa key="dateOpened" />
116 <property name="index" code="pidx" type="integer" access="r" description="The index of this tab in the chat window" />
117 <property name="window" code="cwin" type="window" access="r" description="The window this chat is in" />
118 <property name="unread message count" code="Pumc" type="integer" access="r" description="The number of unread messages for this chat">
119 <cocoa key="unviewedContentCount" />
122 <element type="contact">
123 <cocoa key="containedObjects" />
126 <responds-to name="close">
127 <cocoa method="handleCloseScriptCommand:"/>
129 <responds-to name="send">
130 <cocoa method="sendScriptCommand:"/>
133 <enumeration name="status types" code="Esta">
134 <enumerator name="offline" code="Soff" description="Account is offline."/>
135 <enumerator name="available" code="Sonl" description="Account is online."/>
136 <enumerator name="away" code="Sawy" description="Account is away."/>
137 <enumerator name="invisible" code="Sinv" description="Account is invisible."/>
139 <enumeration name="proxy types" code="Epxt">
140 <enumerator name="HTTP proxy" code="HTTP" description="An HTTP proxy."/>
141 <enumerator name="SOCKS4 proxy" code="SCK4" description="A SOCKS 4 proxy."/>
142 <enumerator name="SOCKS5 proxy" code="SCK5" description="A SOCKS 5 proxy."/>
143 <enumerator name="default HTTP proxy" code="DHTP" description="The system-wide HTTP proxy."/>
144 <enumerator name="default SOCKS4 proxy" code="DSK4" description="The system-wide SOCKS4 proxy."/>
145 <enumerator name="default SOCKS5 proxy" code="DSK5" description="The system-wide SOCKS5 proxy."/>
146 <enumerator name="no proxy" code="NONE" description="No proxy configured."/>
148 <class name="account" code="Cact" description="An account in Adium">
149 <cocoa class="AIAccount" />
150 <property name="id" code="ID " type="integer" access="r" description="The unique ID associated with this account">
151 <cocoa key="scriptingInternalObjectID" />
153 <property name="name" code="pnam" type="text" access="r" description="The name of this account">
154 <cocoa key="scriptingUID" />
156 <property name="display name" code="Pdnm" type="text" access="rw" description="The display name of this account"/>
157 <property name="service" code="Csrv" type="service" access="r" description="The service this account is registered under" />
158 <property name="enabled" code="Penb" type="boolean" access="rw" description="Whether or not this account is enabled" />
159 <property name="host" code="Phst" type="text" access="r" description="The host this account is connected to" />
160 <property name="port" code="Pprt" type="integer" access="r" description="The port this account is connected to" />
161 <property name="status" code="Csts" type="status" access="rw" description="The current status on the account.">
162 <cocoa key="statusState" />
164 <property name="status type" code="Psts" type="status types" access="rw" description="The type of the current status. Setting this creates a temporary status.">
165 <cocoa key="scriptingStatusType" />
167 <property name="status message" code="Pasm" type="rich text" access="rw" description="The message associated with the current status. Setting this creates a temporary status.">
168 <cocoa key="scriptingStatusMessage" />
170 <property name="image" code="Pimg" type="TIFF picture" access="rw" description="The image associated with this account.">
171 <cocoa key="userIconData" />
174 <!-- Technically, by the scripting interface guidelines, a proxy should be its own class. However, I don't see that as useful outside of AS, so I'm just going to implement this here. -applmak-->
175 <property name="proxy enabled" code="Ppxe" type="boolean" access="rw" description="Whether or not a proxy is enabled for this account." />
176 <property name="proxy type" code="Ppxt" type="proxy types" access="rw" description="The type of this proxy.">
177 <cocoa key="scriptingProxyType" />
179 <property name="proxy host" code="Ppxh" type="text" access="rw" description="The proxy host." />
180 <property name="proxy port" code="Ppxp" type="integer" access="rw" description="The port that should be used to connect to the proxy." />
181 <property name="proxy username" code="Ppxu" type="text" access="rw" description="The username that should be used to connect to the proxy." />
182 <property name="proxy password" code="Ppxx" type="text" access="rw" description="The password that should be used to connect to the proxy." />
184 <element type="contact" />
186 <responds-to name="go online">
187 <cocoa method="scriptingGoOnline:"/>
189 <responds-to name="go available">
190 <cocoa method="scriptingGoAvailable:"/>
192 <responds-to name="go offline">
193 <cocoa method="scriptingGoOffline:"/>
195 <responds-to name="go away">
196 <cocoa method="scriptingGoAway:"/>
198 <responds-to name="go invisible">
199 <cocoa method="scriptingGoInvisible:"/>
202 <class name="contact group" code="Cgrp" description="A contact group">
203 <cocoa class="AIListGroup" />
204 <property name="name" code="pnam" type="text" access="rw" description="The name of this contact group.">
207 <property name="visible" code="pvis" type="boolean" access="r" description="The visibility of this group.">
208 <cocoa key="visible" />
210 <element type="contact" />
212 <class name="contact" code="Ccnt" description="A contact">
213 <cocoa class="AIListContact" />
214 <property name="account" code="Cact" type="account" access="r" description="The account associated with this contact" />
215 <property name="groups" code="Pgrp" type="list of contact group" access="r" description="The groups associated with this contact">
216 <cocoa key="groupsAsArray" />
218 <property name="name" code="pnam" type="text" access="r" description="The name of this contact">
221 <property name="ID" code="ID " type="text" access="r" description="The opaque unique identifier of the contact">
222 <cocoa key="internalObjectID" />
224 <property name="display name" code="Pdnm" type="text" access="rw" description="The display name or alias associated with this contact." />
225 <property name="notes" code="Pnts" type="text" access="rw" description="The user-defined notes for this contact."/>
226 <property name="idle time" code="Pidl" type="integer" access="r" description="The time this contact has been idle." />
227 <property name="status type" code="Psts" type="status types" access="r" description="The current status of this contact">
228 <cocoa key="scriptingStatusType" />
230 <property name="status message" code="Pasm" type="rich text" access="r" description="The custom status message for this contact.">
231 <cocoa key="scriptingStatusMessage" />
233 <property name="image" code="Pimg" type="TIFF picture" access="rw" description="The image associated with this contact.">
234 <cocoa key="userIconData" />
236 <property name="blocked" code="Pblk" type="boolean" access="rw" description="Whether or not this contact is marked as blocked.">
237 <cocoa key="scriptingBlocked" />
240 <class name="status" plural="statuses" code="Csts" description="A saved status in Adium">
241 <cocoa class="AIStatus" />
242 <property name="title" code="Pttl" type="text" access="rw" description="The title of the status.">
243 <cocoa key="scriptingTitle" />
245 <property name="status type" code="Psts" type="status types" access="rw" description="The type of this status.">
246 <cocoa key="statusTypeApplescript"/>
248 <property name="status message" code="Psmg" type="rich text" access="rw" description="The custom status message.">
249 <cocoa key="scriptingMessage"/>
251 <property name="autoreply" code="Paut" type="rich text" access="rw" description="The message to auto reply">
252 <cocoa key="scriptingAutoreply"/>
254 <property name="id" code="ID " type="integer" access="r" description="The unique ID of the status">
255 <cocoa key="uniqueStatusID"/>
257 <property name="saved" code="Psav" type="boolean" access="rw" description="Whether this status is temporary or not">
258 <cocoa key="scriptingMutabilityType"/>
261 <command name="close" code="coreclos" description="Close a document.">
262 <cocoa class="NSCloseCommand"/>
263 <direct-parameter type="specifier" description="the document(s) or window(s) to close."/>
266 <command name="go online" code="Adumgoon" description="Changes the status of an account.">
267 <cocoa class="NSScriptCommand" />
268 <direct-parameter description="The account that should connect" type="account" />
269 <parameter name="with message" code="Pmsg" description="The custom status message." type="rich text" optional="yes">
270 <cocoa key="WithMessage"/>
273 <command name="go available" code="Adumgoav" description="Changes the status of an account.">
274 <cocoa class="NSScriptCommand" />
275 <direct-parameter description="The account that should become available" type="account" />
276 <parameter name="with message" code="Pmsg" description="The custom status message." type="rich text" optional="yes">
277 <cocoa key="WithMessage"/>
280 <command name="go offline" code="Adumgoof" description="Changes the status of an account.">
281 <cocoa class="NSScriptCommand" />
282 <direct-parameter description="The account that should disconnect" type="account" />
283 <parameter name="with message" code="Pmsg" description="The custom status message." type="rich text" optional="yes">
284 <cocoa key="WithMessage"/>
287 <command name="go away" code="Adumgoaw" description="Changes the status of an account.">
288 <cocoa class="NSScriptCommand" />
289 <direct-parameter description="The account that should go away" type="account" />
290 <parameter name="with message" code="Pmsg" description="The custom status message." type="rich text" optional="yes">
291 <cocoa key="WithMessage"/>
294 <command name="go invisible" code="Adumgoin" description="Changes the status of an account.">
295 <cocoa class="NSScriptCommand" />
296 <direct-parameter description="The account that should become invisible" type="account" />
297 <parameter name="with message" code="Pmsg" description="The custom status message." type="rich text" optional="yes">
298 <cocoa key="WithMessage"/>
301 <command name="GetURL" code="GURLGURL" description="Tells Adium to open the specified chat, in URL form">
302 <cocoa class="NSScriptCommand" />
303 <direct-parameter description="The URL of the chat" type="text"/>
305 <command name="count" code="corecnte" description="Return the number elements of a particular class within an object.">
306 <cocoa class="NSCountCommand"/>
307 <direct-parameter description="the object whose elements are to be counted" type="specifier"/>
308 <parameter name="each" code="kocl" description="The class of objects to be counted." type="type" optional="yes">
309 <cocoa key="ObjectClass"/>
311 <result description="the number of elements" type="integer"/>
313 <command name="delete" code="coredelo" description="Delete an object.">
314 <cocoa class="NSDeleteCommand"/>
315 <direct-parameter description="the object to delete" type="specifier"/>
317 <command name="exists" code="coredoex" description="Verify if an object exists.">
318 <cocoa class="NSExistsCommand"/>
319 <direct-parameter description="the object in question" type="specifier"/>
320 <result description="true if it exists, false if not" type="boolean"/>
322 <command name="make" code="corecrel" description="Make a new object.">
323 <cocoa class="AICreateCommand"/>
324 <parameter name="new" code="kocl" description="The class of the new object." type="type">
325 <cocoa key="ObjectClass"/>
327 <parameter name="at" code="insh" description="The location at which to insert the object." type="location specifier" optional="yes">
328 <cocoa key="Location"/>
330 <parameter name="with data" code="data" description="The initial data for the object." type="any" optional="yes">
331 <cocoa key="ObjectData"/>
333 <parameter name="with properties" code="prdt" description="The initial values for properties of the object." type="record" optional="yes">
334 <cocoa key="KeyDictionary"/>
336 <parameter name="with contacts" code="Pwct" description="The contacts needed for creating a chat or group." type="list of contact" optional="yes">
337 <cocoa key="withContacts"/>
339 <parameter name="new chat window" code="Pncw" description="If this is true, then a new chat window will be created when creating a chat." type="boolean" optional="yes">
340 <cocoa key="newChatWindow"/>
342 <result description="to the new object" type="specifier"/>
345 <command name="move" code="coremove" description="Move object(s) to a new location.">
346 <cocoa class="AIMoveCommand"/>
347 <direct-parameter type="specifier" description="the object(s) to move"/>
348 <parameter name="to" code="insh" type="location specifier" description="The new location for the object(s).">
349 <cocoa key="ToLocation"/>
351 <result type="specifier" description="the moved object(s)"/>
354 <command name="send" code="Adumsend" description="Send text or a file to some contact.">
355 <cocoa class="NSScriptCommand"/>
356 <direct-parameter type="chat" description="The chat that mimics the entry... yada yada"/>
357 <parameter name="message" code="Smsg" description="The message to send" type="text" optional="yes">
358 <cocoa key="message"/>
360 <parameter name="with file" code="Sfil" description="A file to attach" type="file" optional="yes">
361 <cocoa key="withFile"/>
366 <suite name="Text Suite" code="TEXT" description="A set of basic classes for text processing.">
367 <cocoa name="NSTextSuite"/>
369 <value-type name="color" code="cRGB">
370 <cocoa class="NSColor"/>
373 <class name="rich text" plural="rich text" code="ricT" description="Rich (styled) text">
374 <cocoa class="NSTextStorage"/>
375 <!-- this "type" element and the ones that follow, while they
376 contradict the DTD, are NOT errors. Cocoa Scripting in 10.4 uses them to accomplish certain type conversions. -->
378 <property name="color" code="colr" type="color" description="The color of the first character.">
379 <cocoa key="foregroundColor"/>
381 <property name="font" code="font" type="text" description="The name of the font of the first character.">
382 <cocoa key="fontName"/>
384 <property name="size" code="ptsz" type="integer" description="The size in points of the first character.">
385 <cocoa key="fontSize"/>
387 <element type="character"/>
388 <element type="paragraph"/>
389 <element type="word"/>
390 <element type="attribute run"/>
391 <element type="attachment"/>
394 <class name="character" code="cha " description="This subdivides the text into characters.">
395 <cocoa class="NSTextStorage"/>
397 <property name="color" code="colr" type="color" description="The color of the first character.">
398 <cocoa key="foregroundColor"/>
400 <property name="font" code="font" type="text" description="The name of the font of the first character.">
401 <cocoa key="fontName"/>
403 <property name="size" code="ptsz" type="integer" description="The size in points of the first character.">
404 <cocoa key="fontSize"/>
406 <element type="character"/>
407 <element type="paragraph"/>
408 <element type="word"/>
409 <element type="attribute run"/>
410 <element type="attachment"/>
413 <class name="paragraph" code="cpar" description="This subdivides the text into paragraphs.">
414 <cocoa class="NSTextStorage"/>
416 <property name="color" code="colr" type="color" description="The color of the first character.">
417 <cocoa key="foregroundColor"/>
419 <property name="font" code="font" type="text" description="The name of the font of the first character.">
420 <cocoa key="fontName"/>
422 <property name="size" code="ptsz" type="integer" description="The size in points of the first character.">
423 <cocoa key="fontSize"/>
425 <element type="character"/>
426 <element type="paragraph"/>
427 <element type="word"/>
428 <element type="attribute run"/>
429 <element type="attachment"/>
432 <class name="word" code="cwor" description="This subdivides the text into words.">
433 <cocoa class="NSTextStorage"/>
435 <property name="color" code="colr" type="color" description="The color of the first character.">
436 <cocoa key="foregroundColor"/>
438 <property name="font" code="font" type="text" description="The name of the font of the first character.">
439 <cocoa key="fontName"/>
441 <property name="size" code="ptsz" type="integer" description="The size in points of the first character.">
442 <cocoa key="fontSize"/>
444 <element type="character"/>
445 <element type="paragraph"/>
446 <element type="word"/>
447 <element type="attribute run"/>
448 <element type="attachment"/>
451 <class name="attribute run" code="catr" description="This subdivides the text into chunks that all have the same attributes.">
452 <cocoa class="NSTextStorage"/>
454 <property name="color" code="colr" type="color" description="The color of the first character.">
455 <cocoa key="foregroundColor"/>
457 <property name="font" code="font" type="text" description="The name of the font of the first character.">
458 <cocoa key="fontName"/>
460 <property name="size" code="ptsz" type="integer" description="The size in points of the first character.">
461 <cocoa key="fontSize"/>
463 <element type="character"/>
464 <element type="paragraph"/>
465 <element type="word"/>
466 <element type="attribute run"/>
467 <element type="attachment"/>
470 <class name="attachment" code="atts" inherits="rich text" description="Represents an inline text attachment. This class is used mainly for make commands.">
471 <cocoa class="NSAttachmentTextStorage"/>
472 <property name="file name" code="atfn" type="text" description="The path to the file for the attachment">
473 <cocoa key="filename"/>