{"id":783,"date":"2021-12-08T13:33:00","date_gmt":"2021-12-08T13:33:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=783"},"modified":"2021-12-08T13:33:00","modified_gmt":"2021-12-08T13:33:00","slug":"783","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2021\/12\/08\/783\/","title":{"rendered":"\u81ea\u5df1\u5199\u4e86\u4e2a\u865a\u62df\u952e\u76d8\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765VNC\u65f6\u8f93\u5165\u5bc6\u7801\u548c\u957f\u547d\u4ee4"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/12\/3165532830.webp\" alt=\"VNC_KEYS.webp\" title=\"VNC_KEYS.webp\"><br \/>\u81ea\u5df1\u5199\u4e86\u4e2a\u865a\u62df\u952e\u76d8\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765VNC\u65f6\u8f93\u5165\u5bc6\u7801\u548c\u957f\u547d\u4ee4<\/p>\n<p>\u5728 DD windows \u65f6 \u7c98\u8d34\u5c31\u7528\uff0c\u65b9\u4fbf\u4e0d\u5bb9\u6613\u641e\u9519\u4e86\uff0c\u767b\u9646\u65f6\u8f93\u5165\u957f\u5bc6\u7801\u4e5f\u53ef\u4ee5\u4f7f\u7528<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/12\/1931188946.gif\" alt=\"GIF.gif\" title=\"GIF.gif\"><\/p>\n<h3>\u4e0b\u8f7d\u6e90\u7801\uff0c\u5efa\u7acb\u6216\u4fee\u6539\u5feb\u6377\u65b9\u5f0f <code>\u865a\u62df\u952e\u76d8\u8f93\u5165<\/code><\/h3>\n<pre><code>#  C:UsersvipAppDataLocalProgramsPythonPython38pythonw.exe  vitual_keys.py\n\n# \u8d77\u59cb\u4f4d\u7f6e  %cd%<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/12\/430858462.png\" alt=\"\u5feb\u6377\u65b9\u5f0f.png\" title=\"\u5feb\u6377\u65b9\u5f0f.png\"><\/p>\n<pre><code># \u4e2d\u6587\u8fd9\u4e2a\u53ea\u662f\u5feb\u6377\u65b9\u5f0f\n# \u9700\u8981\u5148\u5b89\u88c5 Python \u548c pywin32\u5e93\n# pip install pywin32\n\n# \u4fee\u6539\u5feb\u6377\u65b9\u5f0f\u4e3a\u5b9e\u9645Python\u5b89\u88c5\u8def\u5f84\n# \u6216\u8005\u91cd\u65b0\u5efa\u7acb\u5feb\u6377\u65b9\u5f0f<\/code><\/pre>\n<h2>\u6e90\u7801\u4e0b\u8f7d <a href=\"https:\/\/github.com\/hongwenjun\/srgb\/tree\/master\/vitual_keys\">https:\/\/github.com\/hongwenjun\/srgb\/tree\/master\/vitual_keys<\/a><\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/12\/2089807561.png\" alt=\"code.png\" title=\"code.png\"><\/p>\n<pre><code># \u9700\u8981\u5148\u5b89\u88c5 Python \u548c pywin32\u5e93\n# pip install pywin32\nimport sys\nimport win32clipboard as w\nfrom keymap import *\n\n# \u526a\u8d34\u677f\u5904\u7406\u51fd\u6570 getText setText\ndef getText():\n    w.OpenClipboard()\n    d = w.GetClipboardData(win32con.CF_TEXT)\n    w.CloseClipboard()\n    return(d).decode('gbk')\n\ndef setText(aString):\n    w.OpenClipboard()\n    w.EmptyClipboard()\n    w.SetClipboardText(aString)\n    w.CloseClipboard()\n\n# \u628a\u526a\u8d34\u677f\u91cc\u7684\u6587\u672c\uff0c\u865a\u62df\u952e\u76d8\u65b9\u5f0f\u5355\u4e2a\u8f93\u5165\u5f53\u524d\u7a97\u53e3\ntext = getText()\nwin32api.MessageBox(0, text, \"\u70b9\u51fb\u786e\u5b9a\u540e\uff0c\u526a\u8d34\u677f\u5185\u5bb9\u5c06\u57283\u79d2\u540e\u53d1\u9001\u5230\u6307\u5b9a\u7684\u7a97\u53e3\", win32con.MB_OK | win32con.MB_ICONWARNING)\ntext = text.replace('', '').replace('    ', '    ')\nfor i in text:\n    if ord(i) &gt; 255 :\n       win32api.MessageBox(0, '\u53d1\u9001\u6587\u672c\u53ea\u80fd ASCII \u5b57\u7b26', \"\u53d1\u9001\u6587\u672c\u53ea\u80fd ASCII \u5b57\u7b26\", win32con.MB_OK | win32con.MB_ICONWARNING)\n       sys.exit(1)\n\n#  \u526a\u8d34\u677f\u5185\u5bb9\u5c06\u57283\u79d2\u540e\u53d1\u9001\u5230\u6307\u5b9a\u7684\u7a97\u53e3 \u53d1\u9001\u6587\u672c\u53ea\u80fd ASCII \u5b57\u7b26\ntime.sleep(3)\ntyper(string=text)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u5df1\u5199\u4e86\u4e2a\u865a\u62df\u952e\u76d8\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765VNC\u65f6\u8f93\u5165\u5bc6\u7801\u548c\u957f\u547d\u4ee4 \u5728 DD windows \u65f6 \u7c98\u8d34\u5c31\u7528\uff0c\u65b9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[45],"class_list":["post-783","post","type-post","status-publish","format-standard","hentry","category-learn","tag-python"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=783"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/783\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}