{"id":1327,"date":"2019-03-20T17:25:11","date_gmt":"2019-03-20T08:25:11","guid":{"rendered":"https:\/\/yuis-programming.com\/?p=1327"},"modified":"2021-10-16T12:15:30","modified_gmt":"2021-10-16T03:15:30","slug":"bash%e3%81%a8ahk%e3%81%a7%e6%95%b0%e7%a7%92%e3%81%94%e3%81%a8%e3%81%ab%e3%82%ad%e3%83%bc%e3%82%92%e3%82%bf%e3%82%a4%e3%83%97%e3%81%99%e3%82%8b%e4%bd%9c%e6%a5%ad%e3%82%92%e6%95%b0%e5%9b%9e%e7%b9%b0","status":"publish","type":"post","link":"https:\/\/yuis-programming.com\/?p=1327","title":{"rendered":"Bash\u3068ahk\u3067\u6570\u79d2\u3054\u3068\u306b\u30ad\u30fc\u3092\u30bf\u30a4\u30d7\u3059\u308b\u4f5c\u696d\u3092\u6570\u56de\u7e70\u308a\u8fd4\u3059\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"<p>Linux\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u8a00\u8a9e\u306eBash\u3068Windows\u306e\u81ea\u52d5\u5316\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9eAutohotkey\u3067\u3001\u6570\u79d2\u3054\u3068\u306b\u30ad\u30fc\u3092\u30bf\u30a4\u30d7\u3059\u308b\u4f5c\u696d\u3092\u6570\u56de\u7e70\u308a\u8fd4\u3059\u7c21\u5358\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<pre><code># intervalsendkey [sec] [times] [key(home|end|printscreen,etc)]\n# e.g. intervalsendkey 3 20 \"end\"\nintervalsendkey(){\n\necho \"N: Push '$3' each $1 sec by $2 times.\"\necho \"N: Are you ready?\"\n\nsecs=$((5))\nwhile [ $secs -gt 0 ]; do\n   echo -ne \"$secs\\033[0K\\r\"\n   sleep 1\n   : $((secs--))\ndone # bash count down\n\ncat &lt;&lt; EOT &gt; \/mnt\/c\/_tmp\/tmp.ahk\nsend, {$3}\nEOT\n\nx=$2\nwhile [ $x -gt 0 ];\ndo\n    psl ahk C:\/_tmp\/tmp.ahk\n  sleep $1\n  x=$(($x-1))\ndone\n\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u8a00\u8a9e\u306eBash\u3068Windows\u306e\u81ea\u52d5\u5316\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9eAutohotkey\u3067\u3001\u6570\u79d2\u3054 [&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-lp","_links":{"self":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/1327"}],"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=1327"}],"version-history":[{"count":2,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/1327\/revisions"}],"predecessor-version":[{"id":2941,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/1327\/revisions\/2941"}],"wp:attachment":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}