{"id":173,"date":"2008-06-04T15:37:49","date_gmt":"2008-06-04T23:37:49","guid":{"rendered":"http:\/\/www.sauria.com\/blog\/2008\/06\/04\/os-x-scripting\/"},"modified":"2020-04-13T10:29:30","modified_gmt":"2020-04-13T18:29:30","slug":"os-x-scripting","status":"publish","type":"post","link":"https:\/\/www.sauria.com\/blog\/2008\/06\/04\/os-x-scripting\/","title":{"rendered":"OS X Scripting"},"content":{"rendered":"<p>John Gruber <a href=\"http:\/\/daringfireball.net\/linked\/2008\/june#tue-03-apples_script\">followed up<\/a> on Daniel Jalkut&#8217;s <a href=\"http:\/\/www.red-sweater.com\/blog\/502\/apples-script\">suggestion<\/a> that Apple replace AppleScript with Javascript:<\/p>\n<blockquote cite=\"http:\/\/www.red-sweater.com\/blog\/502\/apples-script\">\n<p>I agree with this wholeheartedly. Or maybe even make a clean break and scrap OSA and introduce a new system.<\/p>\n<\/blockquote>\n<p>I&#8217;ve been talking up the benefits of scripting apps on the Mac since the 1990&#8217;s. The sad fact of it is that Apple has never really supported scripting to the level that it deserves. It&#8217;s even more important now in the days of a UNIX based MacOS. I have a bunch of scripts that I rely on daily to help me get things done more efficiently. I&#8217;d write more of them, but two things hold me back. AppleScript is really a <a href=\"http:\/\/www.sauria.com\/blog\/2004\/02\/27#833\">funky language<\/a>. I&#8217;ve partially solved that by switching to using Python (via <a href=\"http:\/\/appscript.sourceforge.net\/\">appscript<\/a>) to do the scripting, but that&#8217;s only half the problem. The other half of the problem is that the API exposed via OSA is also pretty funky. If Apple cleaned all that up, in say, 10.6, I&#8217;d be happy to rework my existing body of scripts.<\/p>\n<p>Even if that happened, the big problem is that developer&#8217;s don&#8217;t really support scripting that well, so a good scripting system overhaul needs to look at making it easy for developers to expose application functionality to scripts. Unless that part happens, improvements in the scripting language, and OSA&#8217;s API&#8217;s will not be enough to push scripting to the level where it belongs.<\/p>\n<p style=\"text-align: right;\">\n","protected":false},"excerpt":{"rendered":"<p>John Gruber followed up on Daniel Jalkut&#8217;s suggestion that Apple replace AppleScript with Javascript: I agree with this wholeheartedly. Or maybe even make a clean break and scrap OSA and introduce a new system. I&#8217;ve been talking up the benefits of scripting apps on the Mac since the 1990&#8217;s. The sad fact of it is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[14,6,7],"tags":[143,138],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/phUVc-2N","_links":{"self":[{"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/posts\/173"}],"collection":[{"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/comments?post=173"}],"version-history":[{"count":1,"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/posts\/173\/revisions"}],"predecessor-version":[{"id":526,"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/posts\/173\/revisions\/526"}],"wp:attachment":[{"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/media?parent=173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/categories?post=173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sauria.com\/blog\/wp-json\/wp\/v2\/tags?post=173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}