{"id":1654,"date":"2006-09-10T12:57:53","date_gmt":"2006-09-10T19:57:53","guid":{"rendered":"http:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/"},"modified":"2006-09-10T12:57:53","modified_gmt":"2006-09-10T19:57:53","slug":"applescript-and-launchctl-equals-beachball","status":"publish","type":"post","link":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/","title":{"rendered":"Applescript and launchctl equals beachball"},"content":{"rendered":"<p>AppleScript I hate. The concept to have a scripting system to drive Applications is great. The implementation sucks ass. No, really, it&#8217;s worth this trip into the dumb language bin. AppleScript is a stupid hack. It&#8217;s syntax makes no sense for anybody. Only a couple (and I mean less than hundret) zealots that happen to get scared of any real language still use it. Worst of all: the makers of AppleScript are still with Apple and have given us &#8220;Automator&#8221;. Just add another layer of crap over another one. AppleScript thinks that people want &#8216;human readable code&#8217;. No they don&#8217;t. Specially if it makes no sense at all. End of rant.<\/p>\n<p>It is also plain broken:<br \/>\n<code>launchctl<\/code> is the utility to start and stop processes for Apples <code>launchd<\/code> tool. For an application I am writing I would like to start \/ stop services, and launchctl does just that. I can create a <code>.command<\/code> file and that makes a shell script clickable. The only caveat is that terminal will launch and the window will not go away once the script is done. Not as neat as it should be. As an aside: stay away from the &#8220;Save Settings as Defaults&#8221; in Terminal.app. This will also save your current running application for instance as that. If you have a login to another machine, than all future Terminal windows will want to log in to that machine. The remedy is to trash the terminal.plist out of ~\/Library\/Prefecenses. And the &#8216;close winow when shell exits&#8217; option does not work. Hence the detour to Applescript. But, that does not work either, since Applescript just beachballs if it launches a <code>launchtl unload ... for instance.<\/p>\n<p>Applescript is a freaking hack. It makes me sad and angry (ok, actually that  would be an overstated, computers don't that do that anymore to me) since it's sitting in a place that an amazing application could occupy. Imagine any decent widespread syntax, an API library to all Applications and some GUI glue. That together with some way of version manage \/ download these 'system scripts' and you would have lots of people developing nice short cuts, meta apps or whatever you want to call it. It would be extending what Unix did 30 years ago for command line applications. Use Photoshop, mail and iDVD in one workflow for instance. Or google, iTunes and a printer in another. You see, it would be awesome. For everybody. But instead Sal and Co. give us what they can come up with. Which is frankly not much. Sigh.<\/p>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AppleScript I hate. The concept to have a scripting system to drive Applications is great. The implementation sucks ass. No, really, it&#8217;s worth this trip into the dumb language bin. AppleScript is a stupid hack. It&#8217;s syntax makes no sense for anybody. Only a couple (and I mean less than hundret) zealots that happen to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Applescript and launchctl equals beachball - Andreas Wacker<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Applescript and launchctl equals beachball - Andreas Wacker\" \/>\n<meta property=\"og:description\" content=\"AppleScript I hate. The concept to have a scripting system to drive Applications is great. The implementation sucks ass. No, really, it&#8217;s worth this trip into the dumb language bin. AppleScript is a stupid hack. It&#8217;s syntax makes no sense for anybody. Only a couple (and I mean less than hundret) zealots that happen to [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/\" \/>\n<meta property=\"og:site_name\" content=\"Andreas Wacker\" \/>\n<meta property=\"article:published_time\" content=\"2006-09-10T19:57:53+00:00\" \/>\n<meta name=\"author\" content=\"1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@_andreaswacker\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"1\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/\"},\"author\":{\"name\":\"1\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631\"},\"headline\":\"Applescript and launchctl equals beachball\",\"datePublished\":\"2006-09-10T19:57:53+00:00\",\"dateModified\":\"2006-09-10T19:57:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/\"},\"wordCount\":281,\"publisher\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a\"},\"articleSection\":[\"Apple\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/\",\"url\":\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/\",\"name\":\"Applescript and launchctl equals beachball - Andreas Wacker\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#website\"},\"datePublished\":\"2006-09-10T19:57:53+00:00\",\"dateModified\":\"2006-09-10T19:57:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.andreaswacker.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Applescript and launchctl equals beachball\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#website\",\"url\":\"https:\/\/www.andreaswacker.com\/blog\/\",\"name\":\"Andreas Wacker\",\"description\":\"weblog\",\"publisher\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.andreaswacker.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a\",\"name\":\"Andreas Wacker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png\",\"contentUrl\":\"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png\",\"width\":248,\"height\":248,\"caption\":\"Andreas Wacker\"},\"logo\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.andreaswacker.com\",\"https:\/\/www.instagram.com\/_andreaswacker\/\",\"https:\/\/x.com\/_andreaswacker\",\"https:\/\/www.youtube.com\/channel\/UCWwFtVC_HATVr-R5EiNmhHw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631\",\"name\":\"1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"1\"},\"url\":\"https:\/\/www.andreaswacker.com\/blog\/author\/1\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Applescript and launchctl equals beachball - Andreas Wacker","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/","og_locale":"en_US","og_type":"article","og_title":"Applescript and launchctl equals beachball - Andreas Wacker","og_description":"AppleScript I hate. The concept to have a scripting system to drive Applications is great. The implementation sucks ass. No, really, it&#8217;s worth this trip into the dumb language bin. AppleScript is a stupid hack. It&#8217;s syntax makes no sense for anybody. Only a couple (and I mean less than hundret) zealots that happen to [&hellip;]","og_url":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/","og_site_name":"Andreas Wacker","article_published_time":"2006-09-10T19:57:53+00:00","author":"1","twitter_card":"summary_large_image","twitter_site":"@_andreaswacker","twitter_misc":{"Written by":"1","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/#article","isPartOf":{"@id":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/"},"author":{"name":"1","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631"},"headline":"Applescript and launchctl equals beachball","datePublished":"2006-09-10T19:57:53+00:00","dateModified":"2006-09-10T19:57:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/"},"wordCount":281,"publisher":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a"},"articleSection":["Apple"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/","url":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/","name":"Applescript and launchctl equals beachball - Andreas Wacker","isPartOf":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#website"},"datePublished":"2006-09-10T19:57:53+00:00","dateModified":"2006-09-10T19:57:53+00:00","breadcrumb":{"@id":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.andreaswacker.com\/blog\/2006\/09\/10\/applescript-and-launchctl-equals-beachball\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.andreaswacker.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Applescript and launchctl equals beachball"}]},{"@type":"WebSite","@id":"https:\/\/www.andreaswacker.com\/blog\/#website","url":"https:\/\/www.andreaswacker.com\/blog\/","name":"Andreas Wacker","description":"weblog","publisher":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.andreaswacker.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a","name":"Andreas Wacker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png","contentUrl":"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png","width":248,"height":248,"caption":"Andreas Wacker"},"logo":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.andreaswacker.com","https:\/\/www.instagram.com\/_andreaswacker\/","https:\/\/x.com\/_andreaswacker","https:\/\/www.youtube.com\/channel\/UCWwFtVC_HATVr-R5EiNmhHw"]},{"@type":"Person","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631","name":"1","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"1"},"url":"https:\/\/www.andreaswacker.com\/blog\/author\/1\/"}]}},"_links":{"self":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/posts\/1654"}],"collection":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/comments?post=1654"}],"version-history":[{"count":0,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/posts\/1654\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/media?parent=1654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/categories?post=1654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/tags?post=1654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}