D
deng_changhao
Unregistered / Unconfirmed
GUEST, unregistred user!
大家好首先谢谢各位能看本贴子我的问题是这样的我现在要用程序实现一个类似于外挂的小程序前提是这样的: 当前屏幕上显示的是另一个软件(这个不是我做的),这个软件处于最大化状态,上面有 文本的输入框(需要输入文字) 、有需要数字的文本框、还有几个按钮。这个程序要实现的功能就是 用代码实现 在当前屏幕上(当前窗口上)的文本框中输入文字、数字、字母,最后点击按钮。下面是我移动鼠标、输入数字、输入字母的程序
//打开百度页面 SetCursorPos(530,50); mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0); mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); keybd_event($57,0,0,0); keybd_event($57,0,KEYEVENTF_KEYUP,0); //w keybd_event($57,0,0,0); keybd_event($57,0,KEYEVENTF_KEYUP,0); //w keybd_event($57,0,0,0); keybd_event($57,0,KEYEVENTF_KEYUP,0); //w keybd_event($6E,0,0,0); keybd_event($6E,0,KEYEVENTF_KEYUP,0); //. keybd_event($42,0,0,0); keybd_event($42,0,KEYEVENTF_KEYUP,0); //b keybd_event($41,0,0,0); keybd_event($41,0,KEYEVENTF_KEYUP,0); //a keybd_event($49,0,0,0); keybd_event($49,0,KEYEVENTF_KEYUP,0); //i keybd_event($44,0,0,0); keybd_event($44,0,KEYEVENTF_KEYUP,0); //d keybd_event($55,0,0,0); keybd_event($55,0,KEYEVENTF_KEYUP,0); //u keybd_event($6E,0,0,0); keybd_event($6E,0,KEYEVENTF_KEYUP,0); //. keybd_event($43,0,0,0); keybd_event($43,0,KEYEVENTF_KEYUP,0); //c keybd_event($4F,0,0,0); keybd_event($4F,0,KEYEVENTF_KEYUP,0); //o keybd_event($4D,0,0,0); keybd_event($4D,0,KEYEVENTF_KEYUP,0); //m keybd_event($0D,0,0,0); keybd_event($0D,0,KEYEVENTF_KEYUP,0); //回车 keybd_event($0D,0,0,0); keybd_event($0D,0,KEYEVENTF_KEYUP,0); //回车 //查询13940110893这个电话号码 sleep(1000); SetCursorPos(320,290); mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0); mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); keybd_event($31,0,0,0); keybd_event($31,0,KEYEVENTF_KEYUP,0); keybd_event($33,0,0,0); keybd_event($33,0,KEYEVENTF_KEYUP,0); keybd_event($39,0,0,0); keybd_event($39,0,KEYEVENTF_KEYUP,0); keybd_event($34,0,0,0); keybd_event($34,0,KEYEVENTF_KEYUP,0); keybd_event($30,0,0,0); keybd_event($30,0,KEYEVENTF_KEYUP,0); keybd_event($31,0,0,0); keybd_event($31,0,KEYEVENTF_KEYUP,0); keybd_event($31,0,0,0); keybd_event($31,0,KEYEVENTF_KEYUP,0); keybd_event($30,0,0,0); keybd_event($30,0,KEYEVENTF_KEYUP,0); keybd_event($38,0,0,0); keybd_event($38,0,KEYEVENTF_KEYUP,0); keybd_event($39,0,0,0); keybd_event($39,0,KEYEVENTF_KEYUP,0); keybd_event($33,0,0,0); keybd_event($33,0,KEYEVENTF_KEYUP,0); keybd_event($0D,0,KEYEVENTF_KEYUP,0); //回车 keybd_event($0D,0,0,0); keybd_event($0D,0,KEYEVENTF_KEYUP,0); //回车这输入的数字、字母、及回车的 代码 现在就差怎么才能实现程序输入文字了 [red]要做的过程是这样的(还没有实现)[/red] 从数据库中取出要输入到文本框里的文字然后根据需要将这些文字输入到 那个文本框中 不知道大家有没有 什么办法能做到这些。希望大家帮助我一下,如果有资料希望大家留言也可以发送到我的邮箱里 邮箱:358435769@qq.com
代码: