{"id":396,"date":"2013-03-10T00:45:56","date_gmt":"2013-03-09T16:45:56","guid":{"rendered":"https:\/\/macshuo.com\/?p=396"},"modified":"2013-06-02T00:47:40","modified_gmt":"2013-06-01T16:47:40","slug":"%e6%80%9d%e8%80%83%e7%9a%84%e6%9e%81%e9%99%90","status":"publish","type":"post","link":"https:\/\/macshuo.com\/?p=396","title":{"rendered":"\u601d\u8003\u7684\u6781\u9650"},"content":{"rendered":"<p><a href=\"https:\/\/macshuo.com\/wp-content\/uploads\/2013\/06\/thinking.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/macshuo.com\/wp-content\/uploads\/2013\/06\/thinking.jpg\" alt=\"thinking\" width=\"624\" height=\"411\" class=\"alignnone size-full wp-image-245\" \/><\/a><\/p>\n<p>\u6628\u5929\u6536\u5230\u4e86\u5f88\u591a\u53cd\u9988\uff0c\u5176\u4e2d95%\u7684\u8ba2\u9605\u8005\u975e\u5e38\u5bbd\u5bb9\uff0c\u4f30\u8ba1\u5c5e\u4e8eMac\u6280\u5de7\u7684\u94c1\u6746\u4e00\u7c7b\uff0c\u610f\u601d\u5c31\u662f\u60a8\u7231\u600e\u4e48\u5199\u600e\u4e48\u5199\uff0c\u9694\u5929\u4e5f\u597d\uff0c\u77ed\u7bc7\u4e5f\u597d\uff0c\u6211\u4eec\u90fd\u770b\u3002\u67095%\u7684\u7528\u6237\u5efa\u8bae\u5929\u5929\u66f4\u65b0\u3002\u5f53\u7136\u8fd8\u6709\u6c89\u9ed8\u7684\u5927\u591a\u6570\uff0c\u4e0d\u7f6e\u4e00\u8bcd\uff0c\u6211\u5c31\u7406\u89e3\u6210\u600e\u4e48\u5199\u90fd\u884c\u5427\u3002<\/p>\n<p>\u6700\u8fd1\u5199Mac\u6280\u5de7\u4f3c\u4e4e\u6709\u70b9\u9677\u5165\u8ff7\u9014\uff0c\u6bcf\u5929\u9009\u4e2a\u4e3b\u9898\u603b\u60f3\u5199\u6df1\u5199\u900f\uff0c\u5e0c\u671b\u80fd\u4e3a\u5927\u5bb6\u5e26\u6765\u4e00\u4e9b\u601d\u8003\uff0c\u4e00\u4e07\u4e2a\u8ba2\u9605\u8005\u8fd8\u662f\u6709\u70b9\u538b\u529b\u7684\u3002\u8fd9\u6837\u7684\u8bdd\u5c31\u641e\u5f97\u6211\u5f88\u75b2\u52b3\uff0c\u5360\u7528\u65f6\u95f4\u4e5f\u6bd4\u8f83\u591a\u3002\u7ed3\u5408\u5927\u5bb6\u7684\u5efa\u8bae\uff0c\u6211\u60f3\u8fd8\u662f\u5c3d\u53ef\u80fd\u505a\u5230\u6bcf\u65e5\u66f4\u65b0\uff0c\u8a00\u4e4b\u6709\u7269\u5219\u957f\uff0c\u65e0\u8bdd\u53ef\u8bf4\u5219\u77ed\u3002\u53ef\u80fd\u53ea\u6709\u968f\u7b14\uff0c\u4e5f\u53ef\u80fd\u53ea\u6709\u6280\u672f\uff0c\u5c31\u8fd9\u6837\u5427\uff0c\u592a\u7ea0\u7ed3\u4e0d\u597d\u3002<\/p>\n<p>\u6bcf\u5929\u5199\u70b9\u4e1c\u897f\u4e8b\u5b9e\u4e0a\u5bf9\u6211\u4e2a\u4eba\u540c\u6837\u6709\u5f88\u591a\u597d\u5904\uff0c\u5de5\u4f5c\u4e86\u5341\u51e0\u5e74\u60f3\u6e05\u695a\u4e86\u5f88\u591a\u4e8b\uff0c\u4f46\u662f\u6ca1\u6709\u5199\u4e0b\u6765\u5c31\u5f88\u96be\u7cfb\u7edf\u7684\u601d\u8003\uff0c\u6c89\u6dc0\u7684\u4e1c\u897f\u4e5f\u53ef\u80fd\u4f1a\u968f\u98ce\u800c\u53bb\uff0c\u8fd9\u70b9\u4e5f\u662f\u4fc3\u4f7f\u6211\u575a\u6301\u4e0b\u53bb\u7684\u539f\u56e0\u4e4b\u4e00\u3002<\/p>\n<p>\u6bcf\u4e2a\u4eba\u7684\u601d\u8003\u90fd\u6709\u5c40\u9650\u6027\uff0c\u6bcf\u4e2a\u4eba\u90fd\u4f1a\u628a\u81ea\u5df1\u601d\u8003\u7684\u6781\u9650\u5f53\u505a\u5b9e\u9645\u7684\u6781\u9650\uff0c\u5373\u4f7f\u90a3\u4e9b\u667a\u8005\u6ca1\u6709\u8fd9\u4e48\u505a\u7684\uff0c\u4f46\u4f3c\u4e4e\u4e5f\u65e0\u53d1\u601d\u8003\u66f4\u591a\u3002\u6240\u4ee5\u62d3\u5c55\u4e2a\u4eba\u601d\u8003\u7684\u8303\u7574\u5c31\u663e\u5f97\u975e\u5e38\u91cd\u8981\uff0c\u5927\u5bb6\u6709\u4e9b\u597d\u7684\u60f3\u6cd5\u6216\u4e3b\u9898\uff0c\u4e5f\u53ef\u4ee5\u53d1\u8fc7\u6765\u5171\u4eab\u4ea4\u6d41\u3002<\/p>\n<h1>\u4eca\u5929\u63a8\u9001\u7684Mac\u6280\u5de7\uff1a<\/h1>\n<p>\u6628\u5929\u4ecb\u7ecd\u4e86\u901a\u8fc7open -n \/Applications\/XXX.app\u7684\u65b9\u5f0f\u6253\u5f00\u591a\u5b9e\u4f8b\u7a0b\u5e8f\uff0c\u6709\u4eba\u5728\u5fae\u535a\u4e0a\u95ee\u5982\u4f55\u9009\u4e2d\u4e00\u4e2a\u6587\u4ef6\u6216\u7a0b\u5e8f\uff0c\u901a\u8fc7\u53f3\u952e\u83dc\u5355\u6253\u5f00\u65b0\u5b9e\u4f8b\uff0c\u800c\u4e0d\u662f\u6bcf\u6b21\u90fd\u53bb\u547d\u4ee4\u884c\u64cd\u4f5c\u3002<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7Automator+Applescript\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u3002<\/p>\n<p>\u6253\u5f00Automator\uff0c\u9009\u62e9\u521b\u5efa\u670d\u52a1\uff0c\u5728\u5de6\u4fa7\u9009\u62e9\u201c\u8fd0\u884cAppleScript\u201d\uff0c\u53cc\u51fb\u6253\u5f00\u7a0b\u5e8f\u7a97\u53e3\uff0c\u5728(* Your script goes here *)\u5904\u8f93\u5165\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre><code>tell application \"Finder\"\n    try\n        set filename to POSIX path of (selection as text)\n        set fileType to (do shell script \"file -b \" &amp; filename)\n        if (fileType does not end with \"directory\") or (filename end with \"App\" ) then\n            do shell script \"open -n \" &amp; filename\n        end if\n    end try\nend tell\n<\/code><\/pre>\n<p>\u5728\u7a0b\u5e8f\u4e0a\u65b9\u7684\u9009\u62e9\u6846\u8bbe\u5b9a\u201c\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u201d\u3001\u201c\u4efb\u4f55\u5e94\u7528\u7a0b\u5e8f\u201d\uff0c\u7136\u540e\u4fdd\u5b58\uff0c\u8d77\u4e2a\u4f60\u559c\u6b22\u7684\u540d\u5b57\uff0c\u6bd4\u5982\u53eb\u201c\u4ee5\u65b0\u5b9e\u4f8b\u8fd0\u884c\u201d\u3002\u9000\u51faAutomator\u3002<br \/>\n\u9009\u4e2d\u6587\u4ef6\u6216\u7a0b\u5e8f\uff0c\u53f3\u952e-\u670d\u52a1-\u4ee5\u65b0\u5b9e\u4f8b\u8fd0\u884c\uff0c\u5373\u53ef\u5b9e\u73b0\u7c7b\u4f3copen -n\u7684\u65b9\u5f0f\u3002<\/p>\n<p>\u660e\u5929\u7ed9\u5927\u5bb6\u89e3\u91ca\u4e0b\u4ee3\u7801\u542b\u4e49\u3002<\/p>\n<p>\u548c\u670b\u53cb\u804a\u5929\uff0c\u8bf4\u81ea\u53e4\u4ee5\u6765\u4eba\u4eec\u90fd\u5728\u63a2\u6c42\u7b54\u6848\u5374\u6c38\u8fdc\u627e\u4e0d\u5230\u7ed3\u679c\u7684\u4e09\u4e2a\u7ec8\u6781\u95ee\u9898\u662f\uff1a\u6211\u662f\u8c01\u3001\u4ece\u54ea\u91cc\u6765\u3001\u5230\u54ea\u91cc\u53bb\u3002\u4e00\u4e2a\u670b\u53cb\u8bf4\uff0c\u5bb9\u6613\uff0c\u6211\u53eb\u5510\u50e7\uff0c\u4ece\u4e1c\u571f\u5927\u5510\u800c\u6765\uff0c\u5230\u897f\u5929\u53d6\u7ecf\u3002\u53e6\u4e00\u4e2a\u670b\u53cb\u8bf4\uff0c\u6211\u4e5f\u6709\u4e09\u4e2a\u95ee\u9898\uff0c\u65e9\u6668\u5403\u4ec0\u4e48\uff0c\u4e2d\u5348\u5403\u4ec0\u4e48\uff0c\u665a\u4e0a\u5403\u4ec0\u4e48\u3002<\/p>\n<p>\u2028\u8bf7\u95ee\u5404\u4f4d\u770b\u5b98\uff0c\u4f60\u4eec\u7684\u4e09\u4e2a\u7ec8\u6781\u95ee\u9898\u662f\u795e\u9a6c\uff1f\u601d\u8003\u4e00\u4e0b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6628\u5929\u6536\u5230\u4e86\u5f88\u591a\u53cd\u9988\uff0c\u5176\u4e2d95%\u7684\u8ba2\u9605\u8005\u975e\u5e38\u5bbd\u5bb9\uff0c\u4f30\u8ba1\u5c5e\u4e8eMac\u6280\u5de7\u7684\u94c1\u6746\u4e00\u7c7b\uff0c\u610f &hellip; <a href=\"https:\/\/macshuo.com\/?p=396\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[1],"tags":[63,65,41],"class_list":["post-396","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-applescript","tag-open","tag-41"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/macshuo.com\/index.php?rest_route=\/wp\/v2\/posts\/396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/macshuo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/macshuo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/macshuo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/macshuo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=396"}],"version-history":[{"count":1,"href":"https:\/\/macshuo.com\/index.php?rest_route=\/wp\/v2\/posts\/396\/revisions"}],"predecessor-version":[{"id":397,"href":"https:\/\/macshuo.com\/index.php?rest_route=\/wp\/v2\/posts\/396\/revisions\/397"}],"wp:attachment":[{"href":"https:\/\/macshuo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/macshuo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/macshuo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}