{"id":15,"date":"2016-09-14T08:57:05","date_gmt":"2016-09-14T00:57:05","guid":{"rendered":"http:\/\/45.76.100.195\/?p=15"},"modified":"2016-09-14T11:38:46","modified_gmt":"2016-09-14T03:38:46","slug":"%e8%af%bb%e6%87%82%e5%ad%97%e5%85%b8","status":"publish","type":"post","link":"https:\/\/www.carnica.cn\/?p=15","title":{"rendered":"\u8bfb\u61c2\u5b57\u5178"},"content":{"rendered":"<h2>\u6253\u5f00\u7279\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684AppleScript\u5b57\u5178<\/h2>\n<ul class=\" list-paddingleft-2\">\n<li>\u6253\u5f00\u201cAppleScript\u7f16\u8f91\u5668\u201d\uff0c\u5355\u51fb\u201c\u6587\u4ef6\u201d\u83dc\u5355\u4e0b\u7684\u201c\u6253\u5f00\u5b57\u5178...\u201d\uff0c\u5c06\u4f1a\u5f39\u51fa\u5bf9\u8bdd\u6846\u5217\u51fa\u53ef\u811a\u672c\u63a7\u5236\u7684\u7a0b\u5e8f\u3002<\/li>\n<li>\u76f4\u63a5\u5c06\u5e94\u7528\u7a0b\u5e8f\uff08app\u6587\u4ef6\uff09\u62d6\u62fd\u5230Dock\u4e2d\u7684\u201cAppleScript\u7f16\u8f91\u5668\u201d\u56fe\u6807\u4e0a\u3002<\/li>\n<\/ul>\n<p><em>\u5e76\u4e0d\u662f\u6240\u6709\u7a0b\u5e8f\u90fd\u662fScriptable\uff08\u53ef\u811a\u672c\u63a7\u5236\uff09\u7684\uff0c\u5173\u4e8e\u662f\u5426\u53ef\u811a\u672c\u63a7\u5236\uff0c\u8bf7\u8bb0\u4f4f\u4e00\u70b9---\u53ea\u8981\u80fd\u591f\u7528\u4e0a\u9762\u4ecb\u7ecd\u7684\u65b9\u6cd5\u6210\u529f\u6253\u5f00\u5b57\u5178\u7684\u5e94\u7528\u7a0b\u5e8f\u90fd\u662f\u53ef\u4ee5\u811a\u672c\u63a7\u5236\u7684\uff0c\u53cd\u4e4b\u4ea6\u7136\u3002 \u5982\u679c\u8bd5\u56fe\u6253\u5f00\u67d0\u5e94\u7528\u7a0b\u5e8f\u7684AppleScript\u5b57\u5178\u65f6\u5f97\u5230\u4e0b\u56fe\u6240\u793a\u7684\u9519\u8bef\uff0c\u5219\u8bf4\u660e\u8be5\u7a0b\u5e8f\u4e0d\u662fScriptable\u7684\u3002<\/em><\/p>\n<h2>\u8bfb\u61c2AppleScript\u5b57\u5178<\/h2>\n<p><img decoding=\"async\" src=\"http:\/\/i4.buimg.com\/567571\/ad812309a03a92c3.png\" alt=\"\" \/><\/p>\n<p>AppleScript\u5b57\u5178\u7a97\u53e3\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u559c\u597d\u6765\u51b3\u5b9a\u5b83\u7684\u6837\u5f0f\uff08\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6ca1\u6709\u5de6\u4fa7\u7684\u7d22\u5f15\u5170\uff0c\u9700\u8981\u901a\u8fc7\u62d6\u53f3\u4fa7\u4e2d\u95f4\u7684\u5206\u5272\u7ebf\u6765\u8c03\u51fa\uff09\u3002<br \/>\n<strong>\u7279\u522b\u63d0\u9192\uff1a\u4e00\u65e6\u786e\u5b9a\u4e86\u81ea\u5df1\u559c\u6b22\u7684\u5e03\u5c40\uff0c\u70b9\u51fb\u201c\u7a97\u53e3\u201d\u83dc\u5355\u4e2d\u7684\u201c\u5b58\u50a8\u4e3a\u9ed8\u8ba4\u201d\uff0c\u8fdb\u884c\u4fdd\u5b58\u3002<\/strong><\/p>\n<h3>\u5173\u4e8e\u7b26\u53f7<\/h3>\n<p>AppleScript\u4e3b\u8981\u4f7f\u7528\u4e0b\u9762\u51e0\u4e2a\u56fe\u6807\u6765\u533a\u522b\u5173\u952e\u5b57\uff1a<br \/>\n<img decoding=\"async\" src=\"http:\/\/i2.buimg.com\/567571\/e8b03e3f1f2a01f0.png\" alt=\"\" \/><\/p>\n<h3>\u7406\u89e3\u5b57\u5178\u7684\u5185\u5bb9<\/h3>\n<p>\u8fd9\u91cc\u4ec5\u4ec5\u4ecb\u7ecd\u6700\u91cd\u8981\u7684\u90e8\u5206---\u7406\u89e3\u547d\u4ee4\u3002 \u9996\u5148\u6765\u6982\u8981\u4e0b\u5982\u4f55\u9605\u8bfb\uff1a<strong>\u9ed1\u4f53\u5b57<\/strong>\u662f\u5173\u952e\u5b57\uff0c\u5373\u5fc5\u987b\u4e00\u5b57\u4e0d\u5dee\u7684\u7167\u6253\uff0c\u5982\u679c\u5e26\u6709[]\u5219\u662f\u53ef\u4ee5\u7701\u7565\u7684\u3002 \u5728<strong>\u9ed1\u4f53\u5b57\u540e\u9762\u3001\u5192\u53f7\u524d\u9762\u7684\u6b63\u5e38\u4f53\u6587\u5b57<\/strong>\u662f\u5fc5\u987b\u8981\u6dfb\u52a0\u7684\u53c2\u6570\u7c7b\u578b\uff0c<strong>\u5192\u53f7\u540e\u9762<\/strong>\u8bf4\u660e\u53c2\u6570\u5177\u4f53\u5e94\u8be5\u662f\u4ec0\u4e48\u3002 \u4ee5make\u547d\u4ee4\u4e3a\u4f8b\uff0c\u9010\u884c\u5206\u6790\uff1a<\/p>\n<blockquote><p><strong>make<\/strong>\u00a0v : Make a new element<\/p><\/blockquote>\n<p>\u7b2c\u4e00\u884c\u8bf4\u660e\u8bcd\u6027\uff08v\u8868\u793a\u52a8\u8bcd\uff0c\u548c\u82f1\u6587\u5b57\u5178\u4e00\u6837\uff09\u548c\u5177\u4f53\u89e3\u91ca\u201c\u521b\u5efa\u4e00\u4e2a\u65b0\u5143\u7d20\u201d \u4ee5\u4e0b\u5f00\u59cb\u5c31\u662f\u5b8c\u6574\u7684\u547d\u4ee4\u8bed\u53e5\u6240\u5e94\u8be5\uff08\u6216\u53ef\u4ee5\uff09\u542b\u6709\u7684\u5185\u5bb9<\/p>\n<blockquote><p><strong>make<\/strong><\/p><\/blockquote>\n<p>\u9996\u5148\u662f\u5173\u952e\u5b57make\uff0c\u5fc5\u987b\u5148\u6253make\uff01<\/p>\n<blockquote><p><strong>new<\/strong>\u00a0type : the class of the new element<\/p><\/blockquote>\n<p>\u5fc5\u987b\u8981\u6709\u5173\u952e\u5b57new\uff0c\u5e76\u4e14\u540e\u63a5\u53c2\u6570type\uff1a\u6240\u8981\u521b\u5efa\u5143\u7d20\u7684\u7c7b\u578b\u3002\u5192\u53f7\u540e\u9762\u662f\u5bf9\u524d\u9762type\u7684\u5177\u4f53\u89e3\u91ca\u3002<\/p>\n<blockquote><p><strong>at<\/strong>\u00a0location specifier : the location at which to insert the element<\/p><\/blockquote>\n<p>\u5fc5\u987b\u8981\u6709\u5173\u952e\u5b57at\uff0c\u5e76\u4e14\u540e\u63a5location specifier\u7c7b\u578b\u7684\u53c2\u6570\uff1a\u5143\u7d20\u8981\u521b\u5efa\u7684\u4f4d\u7f6e<\/p>\n<blockquote><p>[<strong>to<\/strong>\u00a0specifier] : when creating an alias file,the original item to create an alias to or when creating a file viewer window,the target of the window<\/p><\/blockquote>\n<p>\u53ef\u9009\u5173\u952e\u5b57to\uff0c\u5982\u7528\u6b64\u5173\u952e\u5b57\u5fc5\u987b\u540e\u63a5\u53c2\u6570specifier\u3002<\/p>\n<blockquote><p>[<strong>with properties<\/strong>\u00a0record] : the initial values for the properties of the element<br \/>\n\u2192 specifier : to the new object(s)<\/p><\/blockquote>\n<p>\u53ef\u9009\u5173\u952e\u5b57with properties\uff0c\u540e\u63a5Record\u7c7b\u578b\u7684\u53c2\u6570\u3002<\/p>\n<h4>\u6700\u540e\u6211\u4eec\u770b\u4e00\u4e0bmake\u547d\u4ee4\u7684\u5b9e\u6218<\/h4>\n<pre><code>tell application \"Finder\"\r\n \u00a0 \u00a0make new folder at desktop\r\n \u00a0 \u00a0--\u6700\u7cbe\u7b80\u7684\u65b9\u5f0f\uff0c\u4e0d\u80fd\u6bd4\u8fd9\u4e2a\u8fd8\u5c11\u4efb\u4f55\u4e00\u9879\r\n \u00a0 \u00a0--\u5176\u4e2dmake\u4e3a\u547d\u4ee4\uff0cnew\u548cat\u4e3a\u5fc5\u5907\u5173\u952e\u5b57\u53c2\u6570\uff0cfolder\u5c5e\u4e8etype\uff0cdesktop\u5c5e\u4e8elocation specifier\r\n \u00a0 \u00a0--\u6b64\u8bed\u53e5\u5728\u684c\u9762\u4e0a\u5efa\u7acb\u4e86\u4e00\u4e2a\u672a\u547d\u540d\u7684\u6587\u4ef6\u5939\r\n\r\n \u00a0 \u00a0make new folder at desktop with properties {name:\"AppleScript\"}\r\n \u00a0 \u00a0--\u52a0\u4e0a\u4e86\u53ef\u9009\u53c2\u6570\uff0c\u662fRecord\u7c7b\u578b\u7684\u3002\r\n \u00a0 \u00a0--\u6b64\u8bed\u53e5\u5728\u684c\u9762\u4e0a\u5efa\u7acb\u4e86\u4e00\u4e2a\u540d\u79f0\u4e3a\u201cAppleScript\u201d\u7684\u6587\u4ef6\u5939\u3002\r\nend tell<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6253\u5f00\u7279\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684AppleScript\u5b57\u5178 \u6253&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.carnica.cn\/index.php?rest_route=\/wp\/v2\/posts\/15"}],"collection":[{"href":"https:\/\/www.carnica.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.carnica.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.carnica.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.carnica.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15"}],"version-history":[{"count":3,"href":"https:\/\/www.carnica.cn\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":23,"href":"https:\/\/www.carnica.cn\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions\/23"}],"wp:attachment":[{"href":"https:\/\/www.carnica.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.carnica.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.carnica.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}