{"id":194,"date":"2024-07-09T20:29:18","date_gmt":"2024-07-09T12:29:18","guid":{"rendered":"https:\/\/www.blogfuyu.wiki\/?p=194"},"modified":"2024-07-09T23:08:59","modified_gmt":"2024-07-09T15:08:59","slug":"%e6%b0%94%e6%ad%bb%e9%aa%97%e5%ad%90-%e8%87%aa%e5%8a%a8%e5%8c%96%e5%8f%91%e9%80%81%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/www.blogfuyu.wiki\/index.php\/2024\/07\/09\/%e6%b0%94%e6%ad%bb%e9%aa%97%e5%ad%90-%e8%87%aa%e5%8a%a8%e5%8c%96%e5%8f%91%e9%80%81%e7%a8%8b%e5%ba%8f\/","title":{"rendered":"\u6c14\u6b7b\u9a97\u5b50\u2014\u2014\u81ea\u52a8\u5316\u53d1\u9001\u7a0b\u5e8f"},"content":{"rendered":"\n<p>\u55f7\u55f7\u55f7\u597d\u4e45\u6ca1\u53d1\u6587\u7ae0\u4e86 <span class=\"heimu\" title=\"\u4f60\u77e5\u9053\u7684\u592a\u591a\u4e86\"><s>\u53cd\u6b63\u6ca1\u4eba\u770b<\/s><\/span><\/p>\n\n\n\n<p>\u5c31\u662f\u6211\u5728\u524d\u51e0\u5929\u6211\u7684\u5916\u516c\u6536\u5230\u4e86\u4e00\u4e2a\u5feb\u9012\uff0c\u5728\u67e5\u770b\u65f6\u53d1\u73b0\u4e86\u8fd9\u4e2a\u4e1c\u897f\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"753\" height=\"1024\" src=\"https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526007-\u5fae\u4fe1\u56fe\u7247_20240709195303-753x1024.jpg\" alt=\"\" class=\"wp-image-195\" style=\"width:283px;height:auto\" srcset=\"https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526007-\u5fae\u4fe1\u56fe\u7247_20240709195303-753x1024.jpg 753w, https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526007-\u5fae\u4fe1\u56fe\u7247_20240709195303-220x300.jpg 220w, https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526007-\u5fae\u4fe1\u56fe\u7247_20240709195303-768x1045.jpg 768w, https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526007-\u5fae\u4fe1\u56fe\u7247_20240709195303-1129x1536.jpg 1129w, https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526007-\u5fae\u4fe1\u56fe\u7247_20240709195303.jpg 1411w\" sizes=\"auto, (max-width: 753px) 100vw, 753px\" \/><\/figure>\n\n\n\n<p>\u6211\u4e00\u773c\u4e01\u771f\u770b\u51fa\u6765\u8fd9\u662f\u8bc8\u9a97\u3001<\/p>\n\n\n\n<p>\u5728\u8bbf\u95ee\u4e86\u4e0a\u9762\u7684\u94fe\u63a5\u540e\u6211\u5f97\u5230\u4e86\u8fd9\u6837\u7684\u4e00\u4e2a\u754c\u9762\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"835\" height=\"1015\" src=\"https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526330-image.png\" alt=\"\" class=\"wp-image-196\" style=\"width:355px;height:auto\" srcset=\"https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526330-image.png 835w, https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526330-image-247x300.png 247w, https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720526330-image-768x934.png 768w\" sizes=\"auto, (max-width: 835px) 100vw, 835px\" \/><\/figure>\n\n\n\n<p>ps:\u8fd9\u4e2a\u4e0a\u976212315\u662f\u9a97\u5b50<\/p>\n\n\n\n<p>ww\u6211ping\u4e86\u8fd9\u4e2a\u7f51\u7ad9\uff0c\u53d1\u73b0ip\u5c45\u7136\u662f\u7f8e\u56fd\u7684couldfiles\uff01<\/p>\n\n\n\n<p>\u9a97\u5b50\u662f\u8fd9\u4e48\u89e3\u91ca\u7684<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"744\" src=\"https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720537650-image.png\" alt=\"\" class=\"wp-image-204\" style=\"width:348px;height:auto\" srcset=\"https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720537650-image.png 550w, https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720537650-image-222x300.png 222w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/figure>\n\n\n\n<p>\u300a\u8d70\u5411\u56fd\u9645\u5316\u300b<\/p>\n\n\n\n<p>\u8fd9\u4e2a\u5e73\u53f0\u6ca1\u6709\u4efb\u4f55\u7684\u53cd\u673a\u5668\u4eba\u7684\u63aa\u65bd\uff0c\u6211\u6700\u8fd1\u53c8\u5b66\u4e60\u4e86python\u7684pyautogui\u6765\u6a21\u62df\u64cd\u4f5c\uff0c\u6211\u5c31\u60f3\u5982\u679c\u6211\u5199\u4e00\u4e2a\u57fa\u4e8epyautogui\u7684\u7a0b\u5e8f\u4e0d\u662f\u53ef\u4ee5\u81ea\u52a8\u70e6\u6b7b\u9a97\u5b50\u4e86\uff1f<\/p>\n\n\n\n<p>\u5f00\u641e<\/p>\n\n\n\n<p>\u9996\u5148\u6211\u5199\u4e86\u4e00\u4e2a\u7a0b\u5e8f\u6765\u68c0\u6d4b\u6211\u9f20\u6807\u7684\u5750\u6807<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pyautogui\nwhile True:\n    print(pyautogui.position())<\/code><\/pre>\n\n\n\n<p>\u5f97\u5230\u5750\u6807\u540e\u6211\u6839\u636e\u6211\u7684\u53d1\u9001\u4e60\u60ef\u5199\u4e86\u4ee3\u7801\uff0c\u7ed3\u679c\u53d1\u73b0pyautogui\u7684pyautogui.write\u51fd\u6570\u4e0d\u80fd\u8f93\u5165\u4e2d\u6587qwq<\/p>\n\n\n\n<p>\u7136\u540e\u6211\u7528\u4e86pypinyin\u5e93\u5199\u4e86\u4e00\u4e2a\u51fd\u6570\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def hanzi_to_pinyin(input_text):\n    result = &#91;]\n    for char in input_text:\n        if char.isdigit():\n            # \u5982\u679c\u662f\u6570\u5b57\uff0c\u5219\u76f4\u63a5\u6dfb\u52a0\u5230\u7ed3\u679c\u5217\u8868\u4e2d\n            result.append(char)\n        else:\n            # \u4f7f\u7528 pinyin() \u51fd\u6570\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u5217\u8868\n            # Style.NORMAL\uff1a\u8f93\u51fa\u5e26\u6709\u97f3\u6807\u7684\u62fc\u97f3\uff0c\u4e0d\u5e26\u58f0\u8c03\n            pinyin_list = pinyin(char, style=Style.NORMAL, heteronym=False)\n            # \u5c06\u62fc\u97f3\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u62fc\u97f3\u7247\u6bb5\u63d0\u53d6\u51fa\u6765\uff0c\u5e76\u7528\u7a7a\u683c\u8fde\u63a5\u6210\u5b57\u7b26\u4e32\n            pinyin_str = ' '.join(&#91;item&#91;0] for item in pinyin_list])\n            result.append(pinyin_str)\n    \n    # \u5c06\u7ed3\u679c\u5217\u8868\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\n    return ''.join(result)<\/code><\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u628a\u7528\u6237\u8f93\u5165\u7684\u4e2d\u6587\u8f6c\u6362\u6210\u62fc\u97f3\uff0c\u5728\u6a21\u62df\u8f93\u5165\u7684\u65f6\u5019\u628a\u8f93\u5165\u6cd5\u6539\u4e3a\u4e2d\u6587\u5c31\u53ef\u4ee5\u628a\u62fc\u97f3\u8f6c\u6210\u4e2d\u6587<\/p>\n\n\n\n<p><span class=\"heimu\" title=\"\u4f60\u77e5\u9053\u7684\u592a\u591a\u4e86\">\u771f\u7684\u5c31\u662f\u4e00\u4e2a\u79bb\u8c31\u7684\u89e3\u51b3\u65b9\u6cd5\u554a<\/span><\/p>\n\n\n\n<p>\u4f60\u5c31\u8bf4\u80fd\u4e0d\u80fd\u7528\u5427<\/p>\n\n\n\n<p>\u4e0b\u9762\u662f\u5b8c\u6574\u7684\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\u7533\u660e\uff1a\u8bf7\u52ff\u5c06\u672c\u7a0b\u5e8f\u7528\u4e8e\u975e\u6cd5\u7528\u9014 \u5982\u679c\u5c06\u672c\u7a0b\u5e8f\u7528\u4e8e\u975e\u6cd5\u7528\u9014\u8d23\u4efb\u4e0e\u6211\u65e0\u5173\nimport pyautogui\nprint('pyautogui\u5bfc\u5165\u6210\u529f')\nimport time\nprint('time\u5bfc\u5165\u6210\u529f')\nfrom pypinyin import pinyin, Style\nprint('pypinyin\u5bfc\u5165\u6210\u529f')\ntimes = 1#\u7edf\u8ba1\u6b21\u6570\n\ndef hanzi_to_pinyin(input_text):\n    result = &#91;]\n    for char in input_text:\n        if char.isdigit():\n            # \u5982\u679c\u662f\u6570\u5b57\uff0c\u5219\u76f4\u63a5\u6dfb\u52a0\u5230\u7ed3\u679c\u5217\u8868\u4e2d\n            result.append(char)\n        else:\n            # \u4f7f\u7528 pinyin() \u51fd\u6570\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u5217\u8868\n            # Style.NORMAL\uff1a\u8f93\u51fa\u5e26\u6709\u97f3\u6807\u7684\u62fc\u97f3\uff0c\u4e0d\u5e26\u58f0\u8c03\n            pinyin_list = pinyin(char, style=Style.NORMAL, heteronym=False)\n            # \u5c06\u62fc\u97f3\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u62fc\u97f3\u7247\u6bb5\u63d0\u53d6\u51fa\u6765\uff0c\u5e76\u7528\u7a7a\u683c\u8fde\u63a5\u6210\u5b57\u7b26\u4e32\n            pinyin_str = ' '.join(&#91;item&#91;0] for item in pinyin_list])\n            result.append(pinyin_str)\n    \n    # \u5c06\u7ed3\u679c\u5217\u8868\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\n    return ''.join(result)\n\ndef watting(a):#\u7b49\u5f85\n    print('--\u7b49\u5f85', a, '\u79d2')\n    time.sleep(a) \ndef f5():#\u5237\u65b0\u7f51\u9875\n    pyautogui.click(119, 71)\n    print('\u70b9\u51fb119\uff0c17 \u5237\u65b0\u7f51\u9875')\ndef click(x,y):#\u70b9\u51fb\n    pyautogui.click(x, y)\n    print('\u70b9\u51fb',x,y)\n\nif __name__ == \"__main__\":\n    print('---------\u6c14\u6b7b\u8bc8\u9a97\u7a0b\u5e8f \u7248\u672cv 0.0.2---------')\n    print('\u66f4\u65b0\u65e5\u5fd7\uff1a\\n1.\u52a0\u5165\u4e86\u5e93\u5bfc\u5165\u63d0\u793a\\n2.\u4f18\u5316\u90e8\u5206\u4ee3\u7801\\n3.\u52a0\u5165\u4e86\u81ea\u52a8\u53d1\u9001\u56fe\u7247\u7684\u529f\u80fd\\n4.\u63d0\u4f9b\u53d1\u9001\u8bb0\u6b21\\n')\n    input_text = input('\u8f70\u70b8\u7684\u5185\u5bb9\uff1a')\n    c =input('\u8f70\u70b8\u7684\u5185\u5bb9\u662f\u5426\u542b\u662f\u82f1\u6587(\u662f=0 ,\u4e0d\u662f=1)')\n    d = input('\u662f\u5426\u9700\u8981\u8fdb\u884c\u56fe\u7247\u53d1\u9001(\u662f=0 ,\u4e0d\u662f=1)')\n    pinyin_result = hanzi_to_pinyin(input_text)\n    watting(1)\n    print('\u7a0b\u5e8f\u5373\u5c06\u5f00\u59cb\u8fd0\u884c')\n    watting(10)\n    print('\u5f00\u59cb')\n    watting(1)\n    f5()\n    watting(6)\n    click(350, 1193)\n    #pyautogui.click(350, 1193)\n    watting(0.25)\n    #pyautogui.click(350, 1193)\n    #print('\u70b9\u51fb350, 1193')\n    while True:\n        print('---------\u6267\u884c\u6b21\u6570\uff1a',times,'---------')\n        pyautogui.write(pinyin_result, interval=0.1)\n        print('\u5199\u4e0b', '\u2018', pinyin_result, '\u2018')\n        watting(0.001)\n        if c != 0:\n        \n            pyautogui.keyDown('1')\n            watting(0.2)\n            pyautogui.keyUp('1')\n    \n        \n        pyautogui.keyDown('Enter')\n\n        watting(0.2)\n        pyautogui.keyUp('Enter')\n\n        if d != 0:\n            f5()\n            watting(7)\n            click(275,1294)\n            #pyautogui.click(275,1294)\n            watting(1)\n            click(831,327)\n            #pyautogui.click(831,327)\n            watting(0.5)\n            click(831,327)\n            #pyautogui.click(831,327)\n            watting(1)\n            click(471,486)\n            #pyautogui.click(471,486)\n            watting(0.5)\n            click(1022,744)\n            #pyautogui.click(1022,744)\n            watting(1)\n\n\n        click(350,1193)\n        times +=1\n        #pyautogui.click(350, 1193)\n        #print('\u70b9\u51fb350, 1193')\n\n<\/code><\/pre>\n\n\n\n<p>\u4e0b\u9762\u662f\u6267\u884c\u6548\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"720\" style=\"aspect-ratio: 1144 \/ 720;\" width=\"1144\" controls src=\"https:\/\/www.blogfuyu.wiki\/wp-content\/uploads\/2024\/07\/1720527992-7\u67089\u65e5-1.mp4\"><\/video><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u55f7\u55f7\u55f7\u597d\u4e45\u6ca1\u53d1\u6587\u7ae0\u4e86 \u53cd\u6b63\u6ca1\u4eba\u770b \u5c31\u662f\u6211\u5728\u524d\u51e0\u5929\u6211\u7684\u5916\u516c\u6536\u5230\u4e86\u4e00\u4e2a\u5feb\u9012\uff0c\u5728\u67e5\u770b\u65f6\u53d1\u73b0\u4e86\u8fd9\u4e2a\u4e1c\u897f\uff1a \u6211\u4e00\u773c\u4e01\u771f\u770b\u51fa\u6765\u8fd9\u662f\u8bc8\u9a97\u3001 \u5728\u8bbf &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-194","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/posts\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":4,"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/posts\/194\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/posts\/194\/revisions\/205"}],"wp:attachment":[{"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/media?parent=194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/categories?post=194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blogfuyu.wiki\/index.php\/wp-json\/wp\/v2\/tags?post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}