{"id":225071,"date":"2020-11-26T16:15:48","date_gmt":"2020-11-26T08:15:48","guid":{"rendered":"http:\/\/4563.org\/?p=225071"},"modified":"2020-11-26T16:15:48","modified_gmt":"2020-11-26T08:15:48","slug":"%e6%b1%82%e5%8a%a9-pyautogui-%e4%b8%8d%e5%90%8c%e5%b1%8f%e5%b9%95%e5%88%86%e8%be%a8%e7%8e%87%e8%99%95%e7%90%86","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=225071","title":{"rendered":"[\u6c42\u52a9] Pyautogui \u4e0d\u540c\u5c4f\u5e55\u5206\u8fa8\u7387\u8655\u7406"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  [\u6c42\u52a9] Pyautogui \u4e0d\u540c\u5c4f\u5e55\u5206\u8fa8\u7387\u8655\u7406               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : stone000 <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        Pyautogui \u4e0d\u540c\u5c4f\u5e55\u5206\u8fa8\u7387\u6211\u662f\u7528\u4ee5\u4e0b\u65b9\u6cd5,\u4f46\u662f\u7d50\u679c\u4e0d\u51c6,\u9084\u6709\u5176\u4ed6\u65b9\u6cd5\u55ce?<br \/>\u5148\u7372\u53d6\u7576\u524d\u5c4f\u5e55\u5206\u8fa8\u7387,\u518d\u8ddf\u539f\u59cb 1440*900 \u5c0d\u6bd4,\u6c42\u51fa\u76f8\u61c9\u6bd4\u4f8b,\u7136\u5f8c\u6240\u6709\u7528\u5230\u5750\u6a19\u7684\u5730\u65b9\u4e58\u4ee5\u9019\u500b\u6bd4\u4f8b<\/p>\n<p>import pyautogui as ag<br \/>import time<br \/>import os<\/p>\n<p>while True:<br \/> oldX, oldY = ag.position()<br \/> time.sleep(0.3)<br \/> nowX, nowY = ag.position()<\/p>\n<p> if nowX!=oldX or nowY!=oldY:<br \/> os.system(&#8216;cls&#8217;)<br \/> print(nowX,nowY)      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>1<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4548222\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u5b9a\u4f4d\u90fd\u662f\u4ee5\u56fe\u641c\u5750\u6807, \u53ea\u8981\u4fdd\u8bc1\u7f29\u653e\u6bd4\u4e00\u81f4\u5c31\u6ca1\u51fa\u8fc7\u95ee\u9898, \u5076\u5c14\u8981\u52a0\u4e2a\u5bb9\u9519\u7387&#8230; \u53ea\u8981\u7528\u9664\u6cd5\u80af\u5b9a\u6709\u8bef\u5dee<\/p>\n<p>\u65e9\u5e74\u95f4\u7528 ahk, \u73b0\u5728 pyautogui \u4e5f\u7528\u8fc7(\u4f3c\u4e4e\u5c31\u662f\u622a\u56fe\u5728\u5185\u5b58\u91cc pillow \u5b9a\u4f4d)<\/p>\n<p>\u76f4\u63a5\u770b\u4f60\u4ee3\u7801\u5b9e\u5728\u6ca1\u770b\u51fa\u6765\u4f60\u8981\u505a\u5565                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>[\u6c42\u52a9] Pyautogui \u4e0d\u540c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/225071"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=225071"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/225071\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=225071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=225071"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=225071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}