{"id":215,"date":"2009-01-18T22:48:08","date_gmt":"2009-01-19T03:48:08","guid":{"rendered":"http:\/\/vgable.com\/blog\/2009\/01\/18\/ichat-applescript-apple-event-bug-with-set-status\/"},"modified":"2009-01-23T02:02:17","modified_gmt":"2009-01-23T07:02:17","slug":"ichat-applescript-apple-event-bug-with-set-status","status":"publish","type":"post","link":"https:\/\/vgable.com\/blog\/2009\/01\/18\/ichat-applescript-apple-event-bug-with-set-status\/","title":{"rendered":"iChat AppleScript \/ Apple Event Gotcha With &#8220;set status&#8221;"},"content":{"rendered":"<p>If you run the AppleScript:<\/p>\n<p><code><br \/>\ntell application \"iChat\"<br \/>\n&nbsp;&nbsp;&nbsp;set status message to \"testing\"<br \/>\n&nbsp;&nbsp;&nbsp;set status to away<br \/>\nend tell<br \/>\n<\/code><\/p>\n<p>You might expect to have the away message &#8220;testing&#8221;.  But what you get is an empty away message.  That&#8217;s because <strong><code>set status<\/code> destroys your status message<\/strong>.  It behaves as if you had selected &#8220;Away&#8221;, &#8220;Available&#8221;, etc. as your status from iChat&#8217;s status menu.<\/p>\n<p>If you want to set a custom away message, <strong>call <code>set status<\/code> first<\/strong>, so it won&#8217;t over-write your message.<\/p>\n<p><code><br \/>\ntell application \"iChat\"<br \/>\n&nbsp;&nbsp;&nbsp;set status to away<br \/>\n&nbsp;&nbsp;&nbsp;set status message to \"testing\"<br \/>\nend tell<br \/>\n<\/code><\/p>\n<p>Filled as <a href=\"http:\/\/openradar.appspot.com\/radar?id=2633\">radar:\/\/6505882<\/a>, but Apple considers it expected behavior.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you run the AppleScript: tell application &#8220;iChat&#8221; &nbsp;&nbsp;&nbsp;set status message to &#8220;testing&#8221; &nbsp;&nbsp;&nbsp;set status to away end tell You might expect to have the away message &#8220;testing&#8221;. But what you get is an empty away message. That&#8217;s because set status destroys your status message. It behaves as if you had selected &#8220;Away&#8221;, &#8220;Available&#8221;, etc. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,3,4],"tags":[309,45,308],"class_list":["post-215","post","type-post","status-publish","format-standard","hentry","category-bug-bite","category-macosx","category-programming","tag-apple-events","tag-apple-script","tag-ichat"],"_links":{"self":[{"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/posts\/215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/comments?post=215"}],"version-history":[{"count":0,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/posts\/215\/revisions"}],"wp:attachment":[{"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/media?parent=215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/categories?post=215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/tags?post=215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}