Oct 3, 2012, 5:42 AM
Post #1 of 4
Input simultaniously in perl and txt
I seriously can't find out how to do this, first i'll give you the sample code:
#sascii - show ASCII values for keypresses
print "Press keys to see their ASCII values. Use Ctrl-C to quit.\n"
$char = ReadKey (0);
last unless defined $char;
printf("Hex: %x\n", ord($char), ord($char));
If you make this a .pl program you'll see that when the program is started you get a hex value in return for every key you press... so for example push the spacebar and hex=20. But that is only if you push the spacebar in the cmd (anyway I use it from the cmd). But I wan't to use it from a notepad / wordpad / MSword file.
Open notepad (automated by starting up the program)
return to cmd
and see output + hex values
Really hope you can help me, its the last touch on my program