{"id":16273,"date":"2016-11-06T11:54:08","date_gmt":"2016-11-06T16:54:08","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=16273"},"modified":"2016-11-06T11:54:08","modified_gmt":"2016-11-06T16:54:08","slug":"scriptarian","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/11\/06\/scriptarian\/","title":{"rendered":"Scriptarian"},"content":{"rendered":"<p><a href=\"https:\/\/scriptarian.com\/\">Matt Rajca<\/a> (<a href=\"https:\/\/twitter.com\/mattrajca\/status\/793105552876470273\">tweet<\/a>):<\/p>\n<blockquote cite=\"https:\/\/scriptarian.com\/\">\n<p>Scriptarian allows you to easily automate macOS using the Swift programming language, providing a modern alternative to AppleScript.<\/p>\n<p>[&#8230;]<\/p>\n<p>Scriptarian uses a multitude of heuristics and transformation passes to ensure AppleScript naming conventions map nicely to Swift. For example, the property name <code>uses ssl<\/code> gets imported as <code>usesSSL<\/code>, <code>url string<\/code> gets imported as <code>urlString<\/code>, and the class name <code>PXCanvasDocument<\/code> gets imported as <code>CanvasDocument<\/code>.<\/p>\n<p>[&#8230;]<\/p>\n<p>In addition to full support for the Swift Standard Library, Scriptarian includes ScriptingKit, a scripting framework we built from the ground up with Swift in mind. It lets you communicate with any AppleScript-enabled app and even provides various utility functions for speech synthesis, sound playback, file management, process management, and more.<\/p>\n<\/blockquote>\n<p>There&rsquo;s no trial version, but it&rsquo;s only $10.<\/p>\n\n<p><a href=\"https:\/\/twitter.com\/ecormany\/status\/793083477801463808\">Ed Cormany<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/ecormany\/status\/793083477801463808\"><p>There&rsquo;s a 100% chance Apple either Sherlocks this or buys it, strips it down, and ships it as Script Editor 3.0.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/www.reddit.com\/r\/swift\/comments\/5a7zke\/scriptarian_automate_macos_with_swift\/d9fn7vi\/\">Hamish Sanderson<\/a> sees potential:<\/p>\n<blockquote cite=\"https:\/\/www.reddit.com\/r\/swift\/comments\/5a7zke\/scriptarian_automate_macos_with_swift\/d9fn7vi\/\"><p>I love the <em>idea<\/em> of Scriptarian: a clean, simple out-of-the-box alternative to Script Editor + AppleScript that &ldquo;Just Works&rdquo;. The minimal featureset is quite acceptable considering it&rsquo;s only $10; by comparison, Script Debugger 6 is $100, down from $200, which is still not unreasonable for a &ldquo;pro&rdquo; tool.<\/p><\/blockquote>\n<p>But has some concerns:<\/p>\n<blockquote cite=\"https:\/\/www.reddit.com\/r\/swift\/comments\/5a7zke\/scriptarian_automate_macos_with_swift\/d9fn7vi\/\"><p>And this one&rsquo;s the deal-killer: For any software that claims to provide a modern alternative to AppleScript, <em>everything<\/em> hinges upon how well its application scripting support, a.k.a. Apple event bridge, works compared to AppleScript. And Swiftarian&rsquo;s AE bridge is <em>rubbish<\/em>.<\/p>\n<p>[&#8230;]<\/p>\n<p>Whether an Apple event bridge has <em>any<\/em> chance of working right depends 100% on whether or not its authors realize that application scripting is far more closely related to relational databases and SQL than it ever will be to Cocoa and Swift.<\/p>\n<p>Again, I have some sympathy for Swiftarian, since even Apple's own AppleScript alternatives, ScriptingBridge and JavaScript for Automation, are crippled, incompetent garbage, while Apple documentation at best leaves you with no clue about how this stuff works and at worst gives you an understanding of it that is 100% wrong. OTOH, even a cursory study of history would've found that this is hardly a new problem and there are numerous previous attempts, both good and bad, from which to learn: Frontier, AppleScript, Mac::Glue, aetools+gensuitemodule, JavaScriptOSA, aeve, appscript, ScriptingBridge, RubyOSA, and so on.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/www.reddit.com\/r\/swift\/comments\/5a7zke\/scriptarian_automate_macos_with_swift\/d9g6gv0\/\">RupturedHeartTheory<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.reddit.com\/r\/swift\/comments\/5a7zke\/scriptarian_automate_macos_with_swift\/d9g6gv0\/\"><p>If the <em>first<\/em> thing I notice about this app is that it&rsquo;s more than twice the size than the developer claims that it is, I&rsquo;m bound to get confused. I can&rsquo;t see <em>any<\/em> reason for a developer to claim a thing like this if it&rsquo;s not the truth.<\/p><p>Then I notice that it&rsquo;s kinda slow, but hey, it&rsquo;s a work in progress, so I really don&rsquo;t mind that. And it&rsquo;s probably faster if I compile it first&#8230; Oh, the second claim about the app <em>&ldquo;Scriptarian can compile your scripts into native executables&rdquo;<\/em> is <strong><em>also not true<\/em><\/strong>. <\/p><p>I seriously can&rsquo;t understand why you would advertise features that isn&rsquo;t working in the state you are selling it. And apparently it will work in the next update, then please <em>write that it will work, not that it actually works<\/em>.<\/p>\n<p>I <em>still<\/em> think that this is a great idea, and worth my $10, but it really needs some tweaks on how the developer is trying to sell it.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Matt Rajca (tweet): Scriptarian allows you to easily automate macOS using the Swift programming language, providing a modern alternative to AppleScript. [&#8230;] Scriptarian uses a multitude of heuristics and transformation passes to ensure AppleScript naming conventions map nicely to Swift. For example, the property name uses ssl gets imported as usesSSL, url string gets imported [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[159,317,30,32,1381,71,1438,901],"class_list":["post-16273","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-applescript","tag-lldb","tag-mac","tag-macapp","tag-macos-10-12","tag-programming","tag-scriptarian","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=16273"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16273\/revisions"}],"predecessor-version":[{"id":16274,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16273\/revisions\/16274"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=16273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=16273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=16273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}