"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[9348],{8453:(e,s,n)=>{n.d(s,{R:()=>l,x:()=>a});var t=n(6540);const i={},r=t.createContext(i);function l(e){const s=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),t.createElement(r.Provider,{value:s},e.children)}},8522:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>o,contentTitle:()=>a,default:()=>u,frontMatter:()=>l,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"XXTLanControl.lua/assist/ask_text","title":"\u8bf7\u6c42\u6587\u672c\u56de\u590d (LCC.assist.ask_text)","description":"\u58f0\u660e","source":"@site/docs/XXTLanControl.lua/assist/ask_text.md","sourceDirName":"XXTLanControl.lua/assist","slug":"/XXTLanControl.lua/assist/ask_text","permalink":"/docs/XXTLanControl.lua/assist/ask_text","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":40,"frontMatter":{"sidebar_position":40},"sidebar":"tutorialSidebar","previous":{"title":"\u521b\u5efa\u5e76\u7b49\u5f85\u8bf7\u6c42 (LCC.assist.request)","permalink":"/docs/XXTLanControl.lua/assist/request"},"next":{"title":"\u8bf7\u6c42\u9009\u62e9\u5750\u6807 (LCC.assist.pick_point)","permalink":"/docs/XXTLanControl.lua/assist/pick_point"}}');var i=n(4848),r=n(8453);const l={sidebar_position:40},a="\u8bf7\u6c42\u6587\u672c\u56de\u590d (LCC.assist.ask_text)",o={},c=[{value:"\u58f0\u660e",id:"\u58f0\u660e",level:2},{value:"\u53c2\u6570",id:"\u53c2\u6570",level:2},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c",level:2},{value:"\u8bf4\u660e",id:"\u8bf4\u660e",level:2},{value:"\u793a\u4f8b",id:"\u793a\u4f8b",level:2}];function d(e){const s={a:"a",blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"\u8bf7\u6c42\u6587\u672c\u56de\u590d-lccassistask_text",children:"\u8bf7\u6c42\u6587\u672c\u56de\u590d (LCC.assist.ask_text)"})}),"\n",(0,i.jsx)(s.h2,{id:"\u58f0\u660e",children:"\u58f0\u660e"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-lua",children:"result, err, task = LCC.assist.ask_text(options)\n"})}),"\n",(0,i.jsx)(s.h2,{id:"\u53c2\u6570",children:"\u53c2\u6570"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["options",(0,i.jsx)(s.br,{}),"\n","\u8868\u7c7b\u578b\uff0c\u4eba\u5de5\u8f85\u52a9\u8bf7\u6c42\u914d\u7f6e\u3002\u5b57\u6bb5\u89c1 ",(0,i.jsx)(s.a,{href:"/docs/XXTLanControl.lua/assist/common-options",children:"\u901a\u7528\u53c2\u6570\u4e0e\u8fd4\u56de\u5bf9\u8c61"}),"\u3002\u672c\u51fd\u6570\u4f1a\u81ea\u52a8\u8bbe\u7f6e ",(0,i.jsx)(s.code,{children:'type = "text"'}),"\u3002"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"\u8fd4\u56de\u503c",children:"\u8fd4\u56de\u503c"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["result",(0,i.jsx)(s.br,{}),"\n","\u8868\u7c7b\u578b\u6216 ",(0,i.jsx)(s.code,{children:"nil"}),"\uff1b\u6210\u529f\u65f6\u901a\u5e38\u4e3a ",(0,i.jsx)(s.code,{children:'{ kind = "text-reply", text = "..." }'}),"\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["err",(0,i.jsx)(s.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\u6216 ",(0,i.jsx)(s.code,{children:"nil"}),"\uff1b\u5931\u8d25\u65f6\u8fd4\u56de\u9519\u8bef\u63cf\u8ff0\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["task",(0,i.jsx)(s.br,{}),"\n","\u8868\u7c7b\u578b\u6216 ",(0,i.jsx)(s.code,{children:"nil"}),"\uff1b\u6700\u540e\u4e00\u6b21\u4efb\u52a1\u72b6\u6001\u3002"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"\u8bf4\u660e",children:"\u8bf4\u660e"}),"\n",(0,i.jsxs)(s.blockquote,{children:["\n",(0,i.jsxs)(s.p,{children:["\u7528\u4e8e\u9a8c\u8bc1\u7801\u3001\u77ed\u4fe1\u7801\u3001\u53e3\u4ee4\u7b49\u201c\u4eba\u5de5\u7ed9\u4e00\u6bb5\u6587\u672c\uff0c\u811a\u672c\u80fd\u7ee7\u7eed\u201d\u7684\u573a\u666f\u3002",(0,i.jsx)(s.br,{}),"\n","\u4e0d\u8981\u628a\u6587\u672c\u56de\u590d\u7528\u4e8e\u201c\u7528\u6237\u8981\u5224\u65ad\u4e0b\u4e00\u6b65\u600e\u4e48\u529e\u201d\u7684\u573a\u666f\uff1b\u8fd9\u7c7b\u60c5\u51b5\u5e94\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"request_control()"}),"\u3002"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"\u793a\u4f8b",children:"\u793a\u4f8b"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-lua",children:'local result, err = LCC.assist.ask_text({\n    title = "\u8f93\u5165\u9a8c\u8bc1\u7801",\n    text = "\u8bf7\u67e5\u770b\u622a\u56fe\u4e2d\u7684\u9a8c\u8bc1\u7801\u5e76\u8f93\u5165",\n    screenshotLocalPath = XXT_SCRIPTS_PATH .. "/captcha.png",\n    timeout = 120,\n})\n\nif result then\n    sys.input_text(result.text, false)\nelse\n    nLog("\u8f85\u52a9\u5931\u8d25", err)\nend\n'})})]})}function u(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}}}]);