{"id":12176,"date":"2014-06-19T22:48:51","date_gmt":"2014-06-19T13:48:51","guid":{"rendered":"http:\/\/oichinote.com\/plus\/?p=12176"},"modified":"2016-06-08T01:03:00","modified_gmt":"2016-06-07T16:03:00","slug":"gather-files-whose-kind-is-png-on-applescript","status":"publish","type":"post","link":"https:\/\/oichinote.com\/plus\/2014\/06\/gather-files-whose-kind-is-png-on-applescript.html","title":{"rendered":"AppleScript\u3067\u30d5\u30a9\u30eb\u30c0\u968e\u5c64\u4ee5\u4e0b\u3059\u3079\u3066\u306e\u6307\u5b9a\u7a2e\u985e\u306e\u30d5\u30a1\u30a4\u30eb\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u301c\u6307\u5b9akind\u6551\u51fa\u4f5c\u6226"},"content":{"rendered":"<p>AppleScript\u3067\u3001\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u968e\u5c64\u4ee5\u4e0b(\u4e0b\u4f4d\u30d5\u30a9\u30eb\u30c0\u3082\u542b\u3080)\u306b\u5165\u3063\u3066\u3044\u308b\u3001\u3059\u3079\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30b9\u30c8(alias\u306e\u30ea\u30b9\u30c8)\u3092\u53d6\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<ol>\n<li>&#8220;System Events&#8221;\u3067\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u53d6\u5f97<\/li>\n<li>kind of &#8230;\u3067\u6307\u5b9a\u3057\u305f\u7a2e\u985e\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u9332<\/li>\n<li>&#8220;System Events&#8221;\u3067\u30d5\u30a9\u30eb\u30c0\u4e00\u89a7\u53d6\u5f97<\/li>\n<li>\u305d\u308c\u305e\u308c\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u4ed8\u3044\u3066\u3001\u518d\u8d77\u7684\u306b\u540c\u3058\u4e8b\u3092\u7e70\u308a\u8fd4\u3059<\/li>\n<\/ol>\n<p>\u6b21\u306e\u4f8b\u306e\u5834\u5408\u3001png\u5f62\u5f0f\u306e\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"hljs\"><code class=\"applescript\">(* Gather files whose are &quot;kdTyp&quot;\r\n * Copyright (c) 2014 webmaster@oichinote.com\r\n * Created on 2014-06-19\r\n * Licence is GPL2\r\n *)\r\n\r\nglobal kdList\r\nglobal kdType\r\nset kdList to {}\r\nset kdType to &quot;PNG \u30a4\u30e1\u30fc\u30b8&quot;\r\n\r\nset startFolder to choose folder\r\ngatherKind(startFolder)\r\ndisplay dialog length of kdList\r\n\r\n-- Gather all files whose kind is kdType to kdList\r\non gatherKind(startFolder)\r\n\t-- get all files\r\n\ttell application &quot;System Events&quot;\r\n\t\tset allFiles to every file of startFolder\r\n\tend tell\r\n\t\r\n\t-- get files of kdType\r\n\trepeat with aFile in allFiles\r\n\t\t-- set name_of_file to (name of aFile)\r\n\t\tif kind of aFile is equal to kdType then\r\n\t\t\tset end of kdList to (aFile as alias)\r\n\t\tend if\r\n\tend repeat\r\n\t\r\n\t-- get all folders\r\n\ttell application &quot;System Events&quot;\r\n\t\tset newFolders to every folder of startFolder\r\n\tend tell\r\n\t\r\n\t-- recuresive call\r\n\trepeat with aFolder in newFolders\r\n\t\tgatherKind(aFolder)\r\n\tend repeat\r\nend gatherKind\r\n<\/code><\/pre>\n<p>\u898b\u3064\u304b\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u3001alias\u5f62\u5f0f\u3067\u3069\u3093\u3069\u3093\u8ffd\u52a0\u3057\u3066\u884c\u304d\u307e\u3059\u3002alias\u3068\u306f\u3001\u591a\u5206CNID\u306e\u4e8b\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u6700\u521d\u3001&amp;\u6f14\u7b97\u5b50\u3067\u30ea\u30b9\u30c8\u306e\u8ffd\u52a0\u3092\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001&#8221;end of &#8230;&#8221;\u3092\u4f7f\u3063\u305f\u65b9\u304c\u901f\u3044\u3068\u3001\u6b21\u306e\u30da\u30fc\u30b8\u306b\u66f8\u304b\u308c\u3066\u3044\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/tonbi.jp\/AppleScript\/Tips\/List\/AddDelete.html\" target=\"_blank\">\u9cf6\u5d8b\u5de5\u623f \/ AppleScript \/ Tips \/ \u30ea\u30b9\u30c8\u9805\u76ee\u306e\u8ffd\u52a0\u30fb\u524a\u9664<\/a><\/li>\n<\/ul>\n<p>\u78ba\u304b\u306b\u901f\u304f\u306a\u308a\u307e\u3057\u305f! \u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u30ea\u30b9\u30c8\u306b\u306f\u3001[]\u5f62\u5f0f\u3082\u3042\u308b\u3068\u8a00\u3046\u4e8b\u3067\u3001\u3053\u3061\u3089\u3082\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u305d\u3046\u3057\u305f\u3089\u300110\u5206\u4ee5\u4e0a\u7d4c\u904e\u3057\u3066\u3082\u7d42\u4e86\u3057\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<th>\u624b\u6cd5<\/th>\n<th>1\u56de\u76ee<\/th>\n<th>2\u56de\u76ee<\/th>\n<th>3\u56de\u76ee<\/th>\n<th>\u5e73\u5747<\/th>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">&#8220;&amp;&#8221;<\/td>\n<td style=\"text-align: center;\">17,328.2\u30df\u30ea\u79d2<\/td>\n<td style=\"text-align: center;\">22,366.8\u30df\u30ea\u79d2<\/td>\n<td style=\"text-align: center;\">27,884.6\u30df\u30ea\u79d2<\/td>\n<td style=\"text-align: center;\">22,526.5\u30df\u30ea\u79d2<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">end of<\/td>\n<td style=\"text-align: center;\">15,524.6\u30df\u30ea\u79d2<\/td>\n<td style=\"text-align: center;\">18,604.0\u30df\u30ea\u79d2<\/td>\n<td style=\"text-align: center;\">21,778.2\u30df\u30ea\u79d2<\/td>\n<td style=\"text-align: center;\">18,635.6\u30df\u30ea\u79d2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3053\u306e\u5b9f\u9a13\u306b\u306f\u3001\u7d046,000\u500b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30b9\u30c8\u30a2\u30c3\u30d7\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/oichinote.com\/plus\/files\/2014\/06\/20140619applescript-gather.png\" alt=\"\u30d5\u30a1\u30a4\u30eb\u30ea\u30b9\u30c8\u53d6\u5f97\" width=\"480\" height=\"210\" class=\"alignnone size-full wp-image-12186\" srcset=\"https:\/\/oichinote.com\/plus\/files\/2014\/06\/20140619applescript-gather.png 480w, https:\/\/oichinote.com\/plus\/files\/2014\/06\/20140619applescript-gather-150x66.png 150w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>\u6642\u9593\u8a08\u6e2c\u306b\u306f\u6b21\u306e\u30b9\u30af\u30ea\u30d7\u30c6\u30a3\u30f3\u30b0\u6a5f\u80fd\u62e1\u5f35\u3092\u4f7f\u3044\u307e\u3057\u305f\u3002\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u5f8c\u3001\u53f3\u30af\u30ea\u30c3\u30af\u3067\u300c\u958b\u304f\u300d\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/www.script-factory.net\/software\/OSAX\/LapTime\/index.html\" target=\"_blank\">LapTime<\/a><\/li>\n<\/ul>\n<p>\u307e\u305f\u3001\u30ea\u30b9\u30c8\u30a2\u30af\u30bb\u30b9\u306e\u9ad8\u901f\u5316\u624b\u6cd5\u306b\u4ed8\u3044\u3066\u3082\u3001\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u3061\u3089\u306f\u3001\u30ea\u30b9\u30c8\u3092\u4f5c\u308b\u6642\u3067\u306f\u306a\u304f\u3001\u30a2\u30af\u30bb\u30b9\u3059\u308b\u6642\u306e\u9ad8\u901f\u5316\u3067\u3059\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/www.script-factory.net\/monologue\/FastDataOperation\/index.xhtml\" target=\"_blank\">Script factory : AppleScript \u3067\u30c7\u30fc\u30bf\u9ad8\u901f\u51e6\u7406<\/a><\/li>\n<\/ul>\n<p>AppleScript\u3068\u8a00\u3048\u3070\u3001\u6b21\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306b\u975e\u5e38\u306b\u591a\u304f\u306e\u60c5\u5831\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u5b9a\u306e\u7a2e\u985e\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u96c6\u3081\u308b\u52b9\u7387\u7684\u306a\u3084\u308a\u65b9\u304c\u63b2\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/piyocast.com\/as\/archives\/795\" target=\"_blank\">AS Hole\uff08AppleScript\u306e\u7a74\uff09 By Piyomaru Software \u00bb \u6307\u5b9a\u30d5\u30a9\u30eb\u30c0\u5185\u306e\u6307\u5b9a\u7a2e\u5225\uff08kind\uff09\u306e\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u3092\u53d6\u5f97 \u00bb Blog Archive<\/a><\/li>\n<\/ul>\n<p>\u4f7f\u3048\u308b\u306e\u304b? \u79c1\u306b? \u3053\u3053\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u308b\u30c6\u30af\u30cb\u30c3\u30af\u306f\u9ad8\u5c1a\u3059\u304e\u3066\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u79c1\u306b\u306f\u4f7f\u3044\u3053\u306a\u305b\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AppleScript\u3067\u3001\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u968e\u5c64\u4ee5\u4e0b(\u4e0b\u4f4d\u30d5\u30a9\u30eb\u30c0\u3082\u542b\u3080)\u306b\u5165\u3063\u3066\u3044\u308b\u3001\u3059\u3079\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30b9\u30c8(alias\u306e\u30ea\u30b9\u30c8)\u3092\u53d6\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002 &#8220;System Events&#8221;\u3067\u30d5\u30a1\u30a4\u30eb\u4e00 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":12186,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"\u65b0\u3057\u3044\u8a18\u4e8b\u300eAppleScript\u3067\u30d5\u30a9\u30eb\u30c0\u968e\u5c64\u4ee5\u4e0b\u3059\u3079\u3066\u306e\u6307\u5b9a\u7a2e\u985e\u306e\u30d5\u30a1\u30a4\u30eb\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u301c\u6307\u5b9akind\u6551\u51fa\u4f5c\u6226\u300f\u3092\u6295\u7a3f\u3057\u307e\u3057\u305f\u3002\u8aad\u3093\u3067\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[63,34],"tags":[],"class_list":["post-12176","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-applescript","category-mac"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/oichinote.com\/plus\/files\/2014\/06\/20140619applescript-gather.png","jetpack-related-posts":[{"id":11806,"url":"https:\/\/oichinote.com\/plus\/2014\/05\/set-background-picture-of-finder-by-applescript.html","url_meta":{"origin":12176,"position":0},"title":"Finder\u306ebackground picture\u3092\u8a2d\u5b9a\u3059\u308bAppleScript","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2014\u5e745\u670814\u65e5","format":false,"excerpt":"\u5148\u65e5\u3001HAT\u3055\u3093\u3068twitter\u3067\u3084\u308a\u53d6\u308a\u3057\u3066\u3044\u3066\u3001Finder\u306ebackground (\u80cc\u666f)\u306b\u753b\u2026","rel":"","context":"AppleScript","block_context":{"text":"AppleScript","link":"https:\/\/oichinote.com\/plus\/category\/applescript"},"img":{"alt_text":"\u30d5\u30a1\u30a4\u30f3\u30c0\u306e\u80cc\u666f\u753b\u50cf","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2014\/05\/20140514finder-background.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":11837,"url":"https:\/\/oichinote.com\/plus\/2014\/05\/restudy-applescript.html","url_meta":{"origin":12176,"position":1},"title":"AppleScript\u518d\u52c9\u5f37","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2014\u5e745\u670816\u65e5","format":false,"excerpt":"\u6700\u8fd1\u3001\u6b21\u306eAppleScript\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002 Finder\u306ebackground pictur\u2026","rel":"","context":"AppleScript","block_context":{"text":"AppleScript","link":"https:\/\/oichinote.com\/plus\/category\/applescript"},"img":{"alt_text":"\u62e1\u5f35\u5b50\u53d6\u308a\u51fa\u3057\u7d50\u679c","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2014\/05\/20140516file-extentions.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":12209,"url":"https:\/\/oichinote.com\/plus\/2014\/06\/improbe-my-applescript-with-record.html","url_meta":{"origin":12176,"position":2},"title":"AppleScript\u6539\u826f\u301c\u300c\u3060\u3093\u3060\u3093\u300d\u305d\u3057\u3066\u300c\u304a\u304a\u304d\u306b\u300d","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2014\u5e746\u670822\u65e5","format":false,"excerpt":"\u4ee5\u524d\u3001\u6b21\u306e\u8a18\u4e8b\u3067AppleScript\u3092\u66f8\u3044\u3066\u3001AppleScript\u306e\u52c9\u5f37\u3092\u3057\u307e\u3057\u305f\u3002 Apple\u2026","rel":"","context":"AppleScript","block_context":{"text":"AppleScript","link":"https:\/\/oichinote.com\/plus\/category\/applescript"},"img":{"alt_text":"\u7a76\u6975\u306e\u9078\u629e","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2014\/06\/20140622select-manakana.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":16961,"url":"https:\/\/oichinote.com\/plus\/2016\/01\/crayon-syntax-highlighter.html","url_meta":{"origin":12176,"position":3},"title":"\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u8868\u793a\u3092Crayon Syntax Highlighter\u306b\u4e57\u308a\u63db\u3048\u307e\u3057\u305f","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2016\u5e741\u670826\u65e5","format":false,"excerpt":"\u30d6\u30ed\u30b0\u4e2d\u306b\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306a\u3069\u3092\u6574\u5f62\u3057\u3066\u8868\u793a\u3055\u305b\u308b\u6642\u3001Syntax Highlighter\u2026","rel":"","context":"AppleScript","block_context":{"text":"AppleScript","link":"https:\/\/oichinote.com\/plus\/category\/applescript"},"img":{"alt_text":"Search Regex\u3067crayon\u306b\u7f6e\u304d\u63db\u3048","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2016\/01\/20160126search-regex.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1776,"url":"https:\/\/oichinote.com\/plus\/2010\/11\/ubuntu-1004ne-2.html","url_meta":{"origin":12176,"position":4},"title":"Ubuntu 10.04\u306bnetatalk 2.2alpha2\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb(\u30d0\u30b0\u5bfe\u5fdc)[\u8ffd\u8a18\u3042\u308a]","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2010\u5e7411\u670817\u65e5","format":false,"excerpt":"HAT\u3055\u3093\u304b\u3089\u3001\u30d0\u30b0\u5bfe\u7b56\u30d1\u30c3\u30c1\u3092\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002\u30d1\u30c3\u30c1\u3092\u5f53\u3066\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u305f\u3002 \u73fe\u5728\u306en\u2026","rel":"","context":"netatalk","block_context":{"text":"netatalk","link":"https:\/\/oichinote.com\/plus\/category\/netatalk"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16825,"url":"https:\/\/oichinote.com\/plus\/2016\/01\/cannot-mount-synced-folder-on-vagrant.html","url_meta":{"origin":12176,"position":5},"title":"Vagrant\u3067\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u3092\u30de\u30a6\u30f3\u30c8\u3067\u304d\u306a\u304b\u3063\u305f","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2016\u5e741\u670820\u65e5","format":false,"excerpt":"Vagrant\u4e0a\u306eVCCW\u3092\u4f7f\u3063\u3066\u3001WordPress\u306e\u30c6\u30b9\u30c8\u74b0\u5883\u306b\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002 VCCW\u3067Wor\u2026","rel":"","context":"Mac","block_context":{"text":"Mac","link":"https:\/\/oichinote.com\/plus\/category\/mac"},"img":{"alt_text":"VCCW mounted","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2016\/01\/20160120vccw-mounted.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/posts\/12176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/comments?post=12176"}],"version-history":[{"count":11,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/posts\/12176\/revisions"}],"predecessor-version":[{"id":17957,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/posts\/12176\/revisions\/17957"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/media\/12186"}],"wp:attachment":[{"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/media?parent=12176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/categories?post=12176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/tags?post=12176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}