{"id":1002609,"date":"2009-09-14T05:25:03","date_gmt":"2009-09-14T10:25:03","guid":{"rendered":"http:\/\/www.elharo.com\/blog\/?p=1002609"},"modified":"2009-09-16T16:04:48","modified_gmt":"2009-09-16T21:04:48","slug":"snow-leopard-files-and-applescript","status":"publish","type":"post","link":"https:\/\/www.elharo.com\/blog\/mac\/2009\/09\/14\/snow-leopard-files-and-applescript\/","title":{"rendered":"Snow Leopard, Files and AppleScript"},"content":{"rendered":"<p>Snow Leopard&#8217;s broken some of my AppleScripts in some weird way I don&#8217;t yet understand. After some debugging the problem seems to lie in files. Specifically files treated as strings. This no longer works:<\/p>\n<pre>set libraryFile to file \"Macintosh HD:Users:elharo:Cafe Au Lait:support:CafeLib.scpt\"<\/pre>\n<p>Nor does this:<\/p>\n<pre>set libraryFile to alias \"Macintosh HD:Users:elharo:Cafe Au Lait:support:CafeLib.scpt\"<\/pre>\n<p>They both die with <\/p>\n<p><b>error<\/b> &#8220;File alias Macintosh HD:Users:elharo:Cafe Au Lait:support:CafeLib.scpt of \u00c2\u00abscript\u00c2\u00bb wasn\u00e2\u20ac\u2122t found.&#8221; number -43<\/p>\n<p>Any ideas?<br \/>\n<!--more--><\/p>\n<p><strong>Update<\/strong>: The fix seems to be switching from &#8220;Macintosh HD:Users:elharo:Cafe Au Lait:support:CafeLib.scpt&#8221; to just &#8220;elharo:Cafe Au Lait:support:CafeLib.scpt&#8221;. The problem may not be Snow Leopard at all, but rather a concomitant encrypting of my home directory with FileVault. That seems to change what AppleScript sees as paths. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Snow Leopard&#8217;s broken some of my AppleScripts in some weird way I don&#8217;t yet understand. After some debugging the problem seems to lie in files. Specifically files treated as strings. This no longer works: set libraryFile to file &#8220;Macintosh HD:Users:elharo:Cafe Au Lait:support:CafeLib.scpt&#8221; Nor does this: set libraryFile to alias &#8220;Macintosh HD:Users:elharo:Cafe Au Lait:support:CafeLib.scpt&#8221; They both [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[171,169,170],"class_list":["post-1002609","post","type-post","status-publish","format-standard","hentry","category-mac","tag-10-6","tag-applescript","tag-snow-leopard"],"_links":{"self":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts\/1002609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/comments?post=1002609"}],"version-history":[{"count":3,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts\/1002609\/revisions"}],"predecessor-version":[{"id":1002632,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts\/1002609\/revisions\/1002632"}],"wp:attachment":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/media?parent=1002609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/categories?post=1002609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/tags?post=1002609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}