{"id":1758,"date":"2017-10-12T17:19:05","date_gmt":"2017-10-12T08:19:05","guid":{"rendered":"http:\/\/hajimete-program.com\/blog\/?p=1758"},"modified":"2017-10-12T17:19:05","modified_gmt":"2017-10-12T08:19:05","slug":"python3-6%e3%81%a7%e3%83%a1%e3%83%a2%e5%b8%b3%e8%b5%b7%e5%8b%95%e3%81%97%e3%81%a6%e3%80%81%e7%a7%bb%e5%8b%95%e3%81%a8%e3%83%aa%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92%e3%81%99%e3%82%8b%e3%82%b5%e3%83%b3","status":"publish","type":"post","link":"https:\/\/hajimete-program.com\/blog\/2017\/10\/12\/python3-6%e3%81%a7%e3%83%a1%e3%83%a2%e5%b8%b3%e8%b5%b7%e5%8b%95%e3%81%97%e3%81%a6%e3%80%81%e7%a7%bb%e5%8b%95%e3%81%a8%e3%83%aa%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92%e3%81%99%e3%82%8b%e3%82%b5%e3%83%b3\/","title":{"rendered":"Python3.6\u3067\u30e1\u30e2\u5e33\u8d77\u52d5\u3057\u3066\u3001\u79fb\u52d5\u3068\u30ea\u30b5\u30a4\u30ba\u3092\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"<p>Python3\u3067\u306fpywin32\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u3046\u3068\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u64cd\u4f5c\u304c\u3067\u304d\u307e\u3059\u3002pywin32\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u307f\u3067\u52d5\u4f5c\u3057\u307e\u3059\u304c\u3001PyCharm\u3067\u30a4\u30f3\u30dd\u30fc\u30c8\u6587\u306b\u30a8\u30e9\u30fc\u304c\u3067\u307e\u3057\u305f\u3002\u305d\u306e\u305f\u3081win32gui\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3053\u306e\u30a8\u30e9\u30fc\u3082\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li>pip install pywin32<\/li>\n<li>pip install win32gui<\/li>\n<\/ul>\n<p>\u307e\u305a\u306fPopen\u95a2\u6570\u3067\u3001\u30b5\u30d6\u30d7\u30ed\u30bb\u30b9\u3068\u3057\u3066\u30e1\u30e2\u5e33\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002\u8d77\u52d5\u3057\u305f\u30a2\u30d7\u30ea\u306f\u30d5\u30a9\u30a2\u30b0\u30e9\u30a6\u30f3\u30c9\u306b\u304f\u308b\u306e\u3067\u3001Win32API\u306eGetForegroundWindow\u95a2\u6570\u3067\u3001\u30a6\u30a3\u30f3\u30c9\u30a6\u30cf\u30f3\u30c9\u30eb(=ID\u756a\u53f7\u306e\u3088\u3046\u306a\u3082\u306e)\u3092\u53d6\u5f97\u3057\u3001MoveWindow\u95a2\u6570\u306b\u3001\u3053\u306eID\u3068\u3001XY\u5ea7\u6a19\u3001\u7e26\u5e45\u3001\u6a2a\u5e45\u3092\u6e21\u3057\u3001\u79fb\u52d5\u3068\u30ea\u30b5\u30a4\u30ba\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001subprocess\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u306f\u3001poll\u3067\u30b5\u30d6\u30d7\u30ed\u30bb\u30b9\u306e\u751f\u5b58\u78ba\u8a8d\u304c\u3067\u304d\u3001wait\u95a2\u6570\u3067\u30b5\u30d6\u30d7\u30ed\u30bb\u30b9\u304c\u7d42\u4e86\u3059\u308b\u307e\u3067\u5f85\u6a5f\u3067\u304d\u307e\u3059\u3002\u4eca\u56de\u306f\u30e1\u30e2\u5e33\u304c\u9589\u3058\u308b\u307e\u3067\u3053\u306ePython\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u52d5\u4f5c\u3057\u3066\u3044\u3066\u3001\u30e1\u30e2\u5e33\u304c\u9589\u3058\u305f\u3089\u3001done.\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u8868\u793a\u3057\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/dev001hajipro\/89092284ab31a0db5933065ace397650.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/dev001hajipro\/89092284ab31a0db5933065ace397650\">Gist<\/a>.<\/noscript><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Python3\u3067\u306fpywin32\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u3046\u3068\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u64cd\u4f5c\u304c\u3067\u304d\u307e\u3059\u3002pywin32\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u307f\u3067\u52d5\u4f5c\u3057\u307e\u3059\u304c\u3001PyCharm\u3067\u30a4\u30f3\u30dd\u30fc\u30c8\u6587\u306b\u30a8\u30e9\u30fc\u304c\u3067\u307e\u3057\u305f\u3002\u305d\u306e\u305f\u3081win32gui\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3053\u306e\u30a8 &hellip; <a href=\"https:\/\/hajimete-program.com\/blog\/2017\/10\/12\/python3-6%e3%81%a7%e3%83%a1%e3%83%a2%e5%b8%b3%e8%b5%b7%e5%8b%95%e3%81%97%e3%81%a6%e3%80%81%e7%a7%bb%e5%8b%95%e3%81%a8%e3%83%aa%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92%e3%81%99%e3%82%8b%e3%82%b5%e3%83%b3\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Python3.6\u3067\u30e1\u30e2\u5e33\u8d77\u52d5\u3057\u3066\u3001\u79fb\u52d5\u3068\u30ea\u30b5\u30a4\u30ba\u3092\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[122],"tags":[],"class_list":["post-1758","post","type-post","status-publish","format-standard","hentry","category-python"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/posts\/1758","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/comments?post=1758"}],"version-history":[{"count":1,"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/posts\/1758\/revisions"}],"predecessor-version":[{"id":1759,"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/posts\/1758\/revisions\/1759"}],"wp:attachment":[{"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/media?parent=1758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/categories?post=1758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hajimete-program.com\/blog\/wp-json\/wp\/v2\/tags?post=1758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}