//直接转换对应键盘码
function InputChar(str: string): Boolean;
var
i: integer;
c: byte;
begin
for i := 1 to Length(str) do
begin
c := VkKeyScan(str[i]) and 255; // 输入文字
keybd_event(c, 0, 0, 0);
keybd_event(c, 0, KEYEVENTF_KEYUP, 0);
end;
end;
keybd_event
最新推荐文章于 2024-08-26 09:20:36 发布