Hi, this is a problem thats frustrated me for a while.
I need to figure out how to script SCAR to send a key (anything, but in this case the keys 's' 'd' and 'a') and then hold it down, until I tell SCAR to release it.
I've never been able to do this because I can't figure out what the help file is talking about when it explains these commands:
As far as I can tell I need to use GetKeyCode to find out the Byte value of the key's that I want to press, but I can't figure out the syntax of that command.procedure KeyDown(Key: Byte); - simulates pushing a key.
procedure KeyUp(Key: Byte); - simulates releasing a key.
procedure KeyDownSilent(Key: Byte); - simulates pushing a key in silent mode.
procedure KeyUpSilent(Key: Byte); - simulates releasing a key in silent mode.
function GetKeyCode(Key: Char): Byte; - get keyboard code of a character.
I essentially need it to work like this:
where "Byte:a" would put the Byte value for the 'a' key into an integer variable (in this case 'x').Code:GetKeyCode(Key: a)Byte: x;
I'm sure I'm just missing something really easy, but this has been troubling me for some time now. I would greatly appreciate any light you can shed on this matter for me.


Reply With Quote








