{"id":692,"date":"2018-06-21T21:08:40","date_gmt":"2018-06-21T12:08:40","guid":{"rendered":"https:\/\/yuis-programming.com\/?p=692"},"modified":"2018-06-13T18:08:51","modified_gmt":"2018-06-13T09:08:51","slug":"windows-10%e3%81%a7%e3%80%8c%e3%82%a6%e3%82%a7%e3%83%96%e3%82%ab%e3%83%a1%e3%83%a9%e3%81%8c%e5%8b%95%e4%bd%9c%e6%a4%9c%e7%9f%a5%e3%81%97%e3%81%9f%e3%82%89%e8%ad%a6%e5%91%8a%e9%9f%b3%e3%82%92%e9%b3%b4","status":"publish","type":"post","link":"https:\/\/yuis-programming.com\/?p=692","title":{"rendered":"Windows 10\u3067\u300c\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u304c\u52d5\u4f5c\u691c\u77e5\u3057\u305f\u3089\u8b66\u544a\u97f3\u3092\u9cf4\u3089\u3059\u300d"},"content":{"rendered":"<p>WSL + contacam + autohotkey\u3067\u3001Windows 10\u3067&#8221;\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u304c\u52d5\u4f5c\u691c\u77e5\u3057\u305f\u3089\u8b66\u544a\u97f3\u3092\u9cf4\u3089\u3059&#8221;\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3057\u3066\u307f\u305f\u3002<\/p>\n<p>\u74b0\u5883\uff1awindows 10 ; WSL<\/p>\n<p>\u3084\u3063\u3066\u308b\u3053\u3068\uff1a<br \/>\ncontacam\u3067\u64ae\u5f71\u3057\u3001\u52d5\u4f5c\u691c\u77e5\u3057\u3066\u52d5\u753b\u3092\u30d5\u30a9\u30eb\u30c0A\u3078\u4fdd\u5b58\u3002<br \/>\nBash\u3067\u30d5\u30a9\u30eb\u30c0A\u306e\u5909\u66f4\u3092\u76e3\u8996\u3057\u3001\u691c\u77e5\u3057\u305f\u3089Autohotkey\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d77\u52d5<br \/>\nautohotkey\u3067\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3092\u8d77\u52d5\u3057\u305f\u308a\u30df\u30e5\u30fc\u30c8\uff0f\u97f3\u91cf\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3057\u305f\u308a\u3002<\/p>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#i\"><span class=\"toc_number toc_depth_1\">1<\/span> \u30b7\u30b9\u30c6\u30e0\u69cb\u6210<\/a><ul><li><a href=\"#i-2\"><span class=\"toc_number toc_depth_2\">1.1<\/span> \u30d5\u30a9\u30eb\u30c0\uff0f\u30d5\u30a1\u30a4\u30eb\u69cb\u6210<\/a><\/li><li><a href=\"#i-3\"><span class=\"toc_number toc_depth_2\">1.2<\/span> \u305d\u306e\u4ed6\u306e\u5909\u6570<\/a><\/li><li><a href=\"#i-4\"><span class=\"toc_number toc_depth_2\">1.3<\/span> \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/a><\/li><\/ul><\/li><li><a href=\"#i-5\"><span class=\"toc_number toc_depth_1\">2<\/span> \u4f7f\u3044\u65b9<\/a><\/li><\/ul><\/div>\n<h2><span id=\"i\">\u30b7\u30b9\u30c6\u30e0\u69cb\u6210<\/span><\/h2>\n<h3><span id=\"i-2\">\u30d5\u30a9\u30eb\u30c0\uff0f\u30d5\u30a1\u30a4\u30eb\u69cb\u6210<\/span><\/h3>\n<ul>\n<li>&#8220;C:\\pg\\run_bash_automatically\\1s_detect_changes_in_a_directory_contacam.sh&#8221;<\/li>\n<li>&#8220;C:\\pg\\detect_changes\\detect_changes_in_a_directory_contacam.sh&#8221;<\/li>\n<li>&#8220;C:\\pg\\detect_changes\\cmd_contacam.sh&#8221;<\/li>\n<li>C:\\pg\\detect_changes&#95;meta<\/li>\n<li>&#8220;C:\\pg\\autohotkey\\sound_warn.ahk&#8221;<\/li>\n<\/ul>\n<h3><span id=\"i-3\">\u305d\u306e\u4ed6\u306e\u5909\u6570<\/span><\/h3>\n<ul>\n<li>&#8220;C:\\ContaCam\\Logicool HD Pro Webcam C920\\2018&#8221;:contacam\u306e\u64ae\u5f71\u52d5\u753b\u306e\u4fdd\u5b58\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u89aa\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3002\u4f7f\u7528\u3059\u308b\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306b\u3088\u3063\u3066\u3053\u306e\u30d1\u30b9\u306f\u5909\u308f\u308b\u3002<\/li>\n<li>&#8220;C:\\google_drive&#95;musics\\HIKAKIN.wav&#8221;:autohotkey\u3067\u8d77\u52d5\u3059\u308b\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3002youtube\u3067\u3082\u53ef\u80fd\u3002<\/li>\n<\/ul>\n<h3><span id=\"i-4\">\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/span><\/h3>\n<p>&#8220;C:\\pg\\run_bash_automatically\\1s_detect_changes_in_a_directory_contacam.sh&#8221;<\/p>\n<pre><code>while [ 1=0 ]\ndo\n  sleep 1\n  echo \"running...\"\n  . \"\/mnt\/c\/pg\/detect_changes\/detect_changes_in_a_directory_contacam.sh\"\ndone\n\n<\/code><\/pre>\n<p>&#8220;C:\\pg\\detect_changes\\detect_changes_in_a_directory_contacam.sh&#8221;<\/p>\n<pre><code>DIR_TO_CHECK='\/mnt\/c\/ContaCam\/Logicool HD Pro Webcam C920\/2018'\n# PATH_TO_EXCLUDE=\"\/mnt\/c\/pg\/detect_changes\/_meta*\"\n\nOLD_SUM_FILE='\/mnt\/c\/pg\/detect_changes\/_meta\/old_sum_contacam.txt'\n\nif [ -e $OLD_SUM_FILE ]\nthen\n    OLD_SUM=`cat $OLD_SUM_FILE`\nelse\n    OLD_SUM=\"nothing\"\nfi\n\nNEW_SUM=`find \"$DIR_TO_CHECK\"\/* \\! -path \"$PATH_TO_EXCLUDE\"  -print0| xargs -0 du -b --time --exclude=$PATH_TO_EXCLUDE | sort -k4,4 | sha1sum | awk '{print $1}'`\n\nif [ \"$OLD_SUM\" != \"$NEW_SUM\" ]\nthen\n    echo \"Directory has changed. Do shomething!\"\n\n    . \/mnt\/c\/pg\/detect_changes\/cmd_contacam.sh &amp;\n\n    # update old sum\n    echo $NEW_SUM &gt; $OLD_SUM_FILE\nfi\n\n<\/code><\/pre>\n<p>&#8220;C:\\pg\\detect_changes\\cmd_contacam.sh&#8221;<\/p>\n<pre><code>cmd.exe \/C \"C:\\Program Files\\AutoHotkey\\AutoHotkeyU64.exe\" C:\/pg\/autohotkey\/sound_warn.ahk\n\n<\/code><\/pre>\n<p>&#8220;C:\\pg\\autohotkey\\sound_warn.ahk&#8221;<\/p>\n<pre><code><br \/>; TrayTip, sound_warn, sound warning!, 1\nsleep, 200\n\n;\u30df\u30e5\u30fc\u30c8\u306a\u3089\u30df\u30e5\u30fc\u30c8\u89e3\u9664\nSoundGet, MuteState, Master, Mute\nif ErrorLevel\n{\nMsgBox, %ErrorLevel%\nReturn\n}\nif MuteState=On\n{\nMuteState=1\n}\nif MuteState=1\n{\nSend, {Volume_Mute}\n}\n\nSoundGet, master_volume\n\n    ;\u97f3\u91cf\nSoundSet, 60\n\n; \u66f2\u3092\u6307\u5b9a\n;run, \"C:\\_musics\\flac\\EGOIST - GREATEST HITS 2011-2017 \u201cALTER EGO\u201d [FLAC 96kHz\uff0f24bit]\\11. \u540d\u524d\u306e\u306a\u3044\u602a\u7269.flac\"\n    ; youtube\n; run, \"https:\/\/www.youtube.com\/watch?v=xYVcxsuj0PI\"\nrun, \"C:\\google_drive\\_musics\\HIKAKIN.wav\"\n\n; 1\u5206\u7d4c\u904e\u3067\u81ea\u52d5\u7684\u306b\u30df\u30e5\u30fc\u30c8\u306b\u3059\u308b\uff0b\u97f3\u91cf\u3092\u623b\u3059\nsleep, 20000\n; sleep, 6000\nSoundSet, master_volume\nsleep, 200\nSend, {Volume_Mute}\n\n<\/code><\/pre>\n<h2><span id=\"i-5\">\u4f7f\u3044\u65b9<\/span><\/h2>\n<ol>\n<li>\u5b9a\u6570\uff1b\u5909\u6570\u3092\u5404\u81ea\u5909\u66f4\u3002<\/li>\n<li>contacam\u3092\u8d77\u52d5\u3001\u52d5\u4f5c\u691c\u77e5\u30e2\u30fc\u30c9\u3092\u6709\u52b9\u5316\u3002<\/li>\n<li>bash:. \/mnt\/c\/pg\/run_bash_automatically\/1s_detect_changes_in_a_directory_contacam.sh<\/li>\n<\/ol>\n<p>\u5b9f\u969b\u306b\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306e\u524d\u3067\u52d5\u3044\u3066\u307f\u3066\u3001\uff15\u79d2\u4f4d\u3057\u3066\u97f3\u304c\u306a\u3063\u305f\u3089\u6210\u529f\u3002<br \/>\n\uff15\u79d2\u5f85\u305f\u306a\u3044\u3068\u9cf4\u3089\u306a\u3044\u306e\u306f\u3061\u3087\u3063\u3068\u30a2\u30ec\u3067\u3059\u304c\u3001\u3053\u308c\u306fcontacam\u306e\u52d5\u4f5c\u691c\u77e5\u3068\u52d5\u753b\u51fa\u529b\u901f\u5ea6\u306e\u554f\u984c\u306a\u306e\u3067\u3001\u3053\u3061\u3089\u304b\u3089\u306f\u3069\u3046\u3057\u3088\u3046\u3082\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306b\u305d\u308c\u306a\u308a\u306e\u97f3\u3067\u9cf4\u3089\u3055\u306a\u3051\u308c\u3070\u3044\u3051\u306a\u3044\u306e\u3067\u3001\u30b9\u30d4\u30fc\u30ab\u30fc\u3092\u5e38\u306b\u7e4b\u3052\u3066\u304a\u304f\u3053\u3068\u3067\u3059\u3002<br \/>\n\u30a4\u30e4\u30db\u30f3\u3068\u304b\u958b\u653e\u578b\u30d8\u30c3\u30c9\u30db\u30f3\u3060\u3068\u3001\u4fb5\u5165\u8005\u3092\u30d3\u30d3\u3089\u305b\u308b\u307b\u3069\u306e\u97f3\u91cf\u306f\u51fa\u3057\u3065\u3089\u3044\u306e\u3067\u3002<\/p>\n<p>autohotkey\u3067\u81ea\u52d5\u7684\u306b\u97f3\u91cf\u3092\u3082\u3068\u306e\u97f3\u91cf\u306b\u623b\u3057\u3066\u3001\u304b\u3064\u5b9f\u884c\u5f8c\u306f\u30df\u30e5\u30fc\u30c8\u306b\u3057\u3066\u304f\u308c\u308b\u306e\u3067\u3001\u3046\u308b\u3055\u3044\u97f3\u91cf\u3067\u6d41\u3057\u3063\u3071\u306a\u3057\u306b\u306a\u308b\u3063\u3066\u3053\u3068\u3084\u3001\u5fd8\u308c\u305f\u9803\u306b\u97f3\u6d41\u3057\u3066\u5927\u97f3\u91cf\u4e8b\u6545\u3063\u3066\u3053\u3068\u3082\u306a\u3044\u3067\u3059\u3002<\/p>\n<p>&#8220;\u81ea\u52d5\u7684\u306b\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u306b\u64ae\u5f71\u52d5\u753b\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9&#8221;\u3082\u5408\u308f\u305b\u308c\u3070\u3001\u4fb5\u5165\u8005\u5bfe\u7b56\u306f\u4e07\u5168\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WSL + contacam + autohotkey\u3067\u3001Windows 10\u3067&#8221;\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u304c\u52d5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[],"acf":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8Rxwo-ba","_links":{"self":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/692"}],"collection":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=692"}],"version-history":[{"count":1,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/692\/revisions"}],"predecessor-version":[{"id":693,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/692\/revisions\/693"}],"wp:attachment":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}