1
16cy
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure mylogin(user:string;password:string);<br>var<br>u,p:integer;<br>i:Byte;<br>begin<br>u:=length(user);<br>p:=length(password);<br>for u := 1 to u do<br> begin<br> i:=byte(user);<br> keybd_event(i,mapvirtualkey(i,0),0,0);<br> keybd_event(i,mapvirtualkey(i,0),keyeventf_keyup,0);<br> sleep(50);<br> end;<br>end;<br><br>这段程序不能正常按键,mapvirtualkey(i,0)的硬件扫描码老是出错,可是我把i用具体的数字代替又可以正常按键。如:<br>procedure mylogin(user:string;password:string);<br>var<br>u,p:integer;<br>i:Byte;<br>begin<br>u:=length(user);<br>p:=length(password);<br>for u := 1 to u do<br> begin<br> keybd_event(u,mapvirtualkey(u,0),0,0);<br> sleep(10);<br> keybd_event(u,mapvirtualkey(u,0),keyeventf_keyup,0);<br> sleep(50);<br> end;<br>end;<br>这段程序又是正常的,我晕,有高手吗,帮我分析一下,在线等。