{"id":37146,"date":"2022-09-26T15:05:18","date_gmt":"2022-09-26T19:05:18","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=37146"},"modified":"2022-09-26T15:59:29","modified_gmt":"2022-09-26T19:59:29","slug":"fastscripts-3-2","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/09\/26\/fastscripts-3-2\/","title":{"rendered":"FastScripts 3.2"},"content":{"rendered":"<p><a href=\"https:\/\/redsweater.com\/blog\/3912\/fastscripts-3-2\">Red Sweater<\/a>:<\/p>\n<blockquote cite=\"https:\/\/redsweater.com\/blog\/3912\/fastscripts-3-2\"><p>By default, FastScripts searches for scripts in the same standard &ldquo;Scripts&rdquo; folders that Apple&rsquo;s Script Menu searches. [&#8230;] I&rsquo;ve expanded FastScripts to support an arbitrary number of user-determined locations, whose script contents will all be available to the app.<\/p><p>[&#8230;]<\/p><p>FastScripts supports the ability to invoke any script &#8230; from within another script. [&#8230;] The ability to run scripts has gotten a lot more powerful in FastScripts 3.2, with the addition of robust support for specifying parameters to invoked scripts.<\/p><p>[&#8230;]<\/p><p>Instead of a result, the &ldquo;run&rdquo; command in FastScripts returns a script task object. You can use this reference to &ldquo;force stop&rdquo; a running script, but perhaps more importantly, you can now use it to await the script&rsquo;s result. When your script requests the &ldquo;result&rdquo; of a script item, FastScripts will suspend the execution of your script until the result is available.<\/p><p>[&#8230;]<\/p><p>In FastScripts 3.2 special care is taken to differentiate search results so that identically named items are further identified by the folder that contains them.<\/p><\/blockquote>\n<p>I love the new custom Script Collections feature. I like to keep my scripts in a Git repository, which is stored outside of the standard <tt>Scripts<\/tt> folder, and so I would create symlinks to the per-application folders in the repo from there. I&rsquo;d have to recreate these when adding scripts for a new app or when cloning the repo to a new Mac. Also, although FastScripts would <em>follow<\/em> the symlinks to my folders, they would confuse its file system monitoring, so it wouldn&rsquo;t notice changes to the contents of the actual folders. Now I can dispense with the symlinks and just add the <tt>AppleScripts<\/tt> folder of my repo as a script collection in FastScripts. (I also needed to move all the per-application folders into an <tt>Applications<\/tt> folder to prevent all the scripts from being universally available.) My FastScripts menu looks and works the same as before, but now I can store the files where I want and everything updates automatically.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/03\/14\/fastscripts-3-1\/\">FastScripts 3.1<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Red Sweater: By default, FastScripts searches for scripts in the same standard &ldquo;Scripts&rdquo; folders that Apple&rsquo;s Script Menu searches. [&#8230;] I&rsquo;ve expanded FastScripts to support an arbitrary number of user-determined locations, whose script contents will all be available to the app.[&#8230;]FastScripts supports the ability to invoke any script &#8230; from within another script. [&#8230;] The [&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":"2022-09-26T19:05:21Z","apple_news_api_id":"a7e9fea1-1b26-4fcc-826e-9e5499af518a","apple_news_api_modified_at":"2022-09-26T19:59:32Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/Ap-n-oRsmT8yCbp5Uma9Rig","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":[2],"tags":[159,1624,377,30,32,2077],"class_list":["post-37146","post","type-post","status-publish","format-standard","hentry","category-technology","tag-applescript","tag-fastscripts","tag-git","tag-mac","tag-macapp","tag-macos-12"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37146","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=37146"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37146\/revisions"}],"predecessor-version":[{"id":37147,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37146\/revisions\/37147"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=37146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=37146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=37146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}