Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with keybd_event

Status
Not open for further replies.

sebastiannielsen

Programmer
Jun 1, 2003
25
SE
Im trying to send keyevents to my server:
Code:
$sendkbd = Win32::API->new('user32.dll', 'keybd_event', 'NNNN', 'V');

if ($kbd) {
@dta = split("",$kbd);
foreach $k (@dta) {
$e = ord($k);
$sendkbd->Call($e, 0, 0, 0);
$sendkbd->Call($e, 0, 2, 0);
}
}

but when im testing in notepad, the current date are pasted when i enter the word "test" in the variable $kbd.
This means the keybd_event is pressing the F5 key.
I want the keybd_event to type the text in the $kbd variable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top