{"id":2077,"date":"2014-03-13T18:21:20","date_gmt":"2014-03-13T18:21:20","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=2077"},"modified":"2023-06-12T23:46:19","modified_gmt":"2023-06-12T23:46:19","slug":"scripting-on-the-mac","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/scripting-on-the-mac\/","title":{"rendered":"Scripting on the Mac"},"content":{"rendered":"<p>It&#8217;s UNIX, how hard can it be? I want to run some Macports uodate scripts regularly. To me the obvious programming language is bash, but I got excited and decided I want to notify that the script had run, and run OK.<\/p>\n<p>There are two schemes, Growl and OSX Notification system. These both have language bindings.<\/p>\n<p>[jp-rss-feed url=&#8221;http:\/\/feeds.delicious.com\/v2\/rss\/davelevy\/macosx+scripting&#8221; numitems=&#8221;7&#8243; getdesc=&#8221;50&#8243; ]<\/p>\n<p>See also <a title=\"on Wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Growl_%28software%29\">the wikipedia Growl page<\/a> and <a href=\"http:\/\/growl.info\/\">the Growl home page<\/a><\/p>\n<p>So most roads lead to Applescript, and <a title=\"applescript at apple.developer.com\" href=\"https:\/\/developer.apple.com\/library\/mac\/documentation\/AppleScript\/Conceptual\/AppleScriptX\/AppleScriptX.html\">here is the Apple developer resource<\/a>, and <a title=\"also at developer.apple.com\" href=\"https:\/\/web.archive.org\/web\/20160308061048\/https:\/\/developer.apple.com\/library\/mac\/documentation\/Darwin\/Reference\/ManPages\/man1\/osascript.1.html\">here is the man osascript<\/a> page which allows applescript calls from the command line, and hence from within a script. I have bookmarked the applescript manual.<\/p>\n<p>The shell call osascript takes a program file argument.<\/p>\n<p style=\"text-align: center;\">ooOOOoo<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s UNIX, how hard can it be? I want to run some Macports uodate scripts regularly. To me the obvious programming language is bash, but I got excited and decided I want to notify that the script had run, and run OK. There are two schemes, Growl and OSX Notification system. These both have language&#8230;<\/p>\n","protected":false},"author":1,"featured_media":4877,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[150,3],"tags":[639,75,638,691,373,920,911],"class_list":["post-2077","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-macos-technology","category-technology","tag-growl","tag-macos","tag-notification","tag-osascript","tag-scripting","tag-software","tag-technology"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2020\/04\/handwriting-w650.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/2077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=2077"}],"version-history":[{"count":2,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/2077\/revisions"}],"predecessor-version":[{"id":3798,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/2077\/revisions\/3798"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/4877"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=2077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=2077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=2077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}