{"id":191,"date":"2011-10-04T21:36:47","date_gmt":"2011-10-05T02:36:47","guid":{"rendered":"http:\/\/susarla.com\/?p=191"},"modified":"2011-10-04T21:37:13","modified_gmt":"2011-10-05T02:37:13","slug":"undocking-thunderbolt-apple-script","status":"publish","type":"post","link":"https:\/\/susarla.com\/?p=191","title":{"rendered":"Undocking thunderbolt &#8211; Apple script"},"content":{"rendered":"<div style=\"width: 377px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" class=\"  \" title=\"Thunderbold\" src=\"http:\/\/distillery.s3.amazonaws.com\/media\/2011\/09\/28\/a297750a84c24bab96e4dbaf8b31223b_7.jpg\" alt=\"Thunderbold\" width=\"367\" height=\"367\" \/><p class=\"wp-caption-text\">Thunderbolt<\/p><\/div>\n<p>Last Week finally my long awaited Thunderbolt monitor has arrived. It is breeze to setup like any other Apple product. I use the USB ports that the monitor has in the back and hooked up my back up drive, headset one thing i did not like is there is no &#8220;safe undock&#8221;. My backup drive is a 2 TB that i have set up for Time machine and every time i undock the Mac complaints about unsafe ejecting of the drive. If you know me i hate when people yank devices out without gracefully ejecting the device. So needless to say the &#8220;unsafe ejecting&#8221; message was bothering upon searching for a solution i found this little apple script that does the job really well (thanks to Shawn at <a href=\"http:\/\/chompingatbits.com\/2011\/09\/23\/undocking-from-an-apple-thunderbolt-display\/\" target=\"_blank\">Chompingatbits.com<\/a>). This is a simple script that basically sends message to the machine to eject all attached drive now my system is ready to undock. I save the script as a little &#8220;Undock.app&#8221; and launch it every time i am ready to undock. Here is the process:<\/p>\n<ol>\n<li>Open \u00e2\u20ac\u0153AppleScript Editor.app\u00e2\u20ac\u009d found in the Applications -&gt; Utilities folder<\/li>\n<li>Paste the following code into \u00e2\u20ac\u0153Untitled\u00e2\u20ac\u009d applescript window:<\/li>\n<blockquote>\n<pre>tell the application \"Finder\"\r\n\teject (every disk whose ejectable is true)\r\nend tell<\/pre>\n<\/blockquote>\n<li>Go to File -&gt; Save. Name the file \u00e2\u20ac\u0153Undock\u00e2\u20ac\u009d and choose \u00e2\u20ac\u0153Application\u00e2\u20ac\u009d as the file format. You can now run this from Spotlight or create a shortcut in your dock if you prefer; just as with any other application. Your external drives will be ejected after running this script.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last Week finally my long awaited Thunderbolt monitor has arrived. It is breeze to setup like any other Apple product. I use the USB ports that the monitor has in the back and hooked up my back up drive, headset one thing i did not like is there is no &#8220;safe undock&#8221;. My backup drive [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7,13],"tags":[9],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-techreview","category-tech-review","tag-geek"],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/susarla.com\/index.php?rest_route=\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/susarla.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/susarla.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/susarla.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/susarla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=191"}],"version-history":[{"count":0,"href":"https:\/\/susarla.com\/index.php?rest_route=\/wp\/v2\/posts\/191\/revisions"}],"wp:attachment":[{"href":"https:\/\/susarla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/susarla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/susarla.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}