SCARcoder
2010-01-15 00:35:23
Hi, sorry if this has been asked before, but is there any function that detects keyboard inputs? Something so when I have the script running and I press the up arrow, it automatically moves my mouse or something similar. Thanks in advance.
[php]
function IsMouseButtonDown(LeftButton: Boolean): Boolean;
If LeftButton is true, then it checks if the left mouse button is down.
If LeftButton is false, checks if the right mouse button is down.
function IsFunctionKeyDown(Key: Byte): Boolean;
Checks if the given function key is down.
Meanings of Key:
0: SHIFT
1: CONTROL
2: ALT
3: LEFT SHIFT
4: LEFT CONTROL
5: LEFT ALT
6: RIGHT SHIFT
7: RIGHT CONTROL
8: RIGHT ALT
function IsFKeyDown(Num: Byte): Boolean;
Num = 1..12. Checks if F1, F2, … F11 or F12 key is down corresponding to Num.
function IsArrowDown(Num: Byte): Boolean;
Checks if arrow key is down. Num corresponds to 0 = up, 1 = right, 2 = down, 3 = left.
function IsKeyDown(C: Char): Boolean;
Checks if the given key is down.
Example:
if(IsKeyDown('a'))then
Writeln('You have pressed "a". Congratulations!');
function IsNumpadKeyDown(Key: Byte): Boolean;
Checks if the entered numpad key is down (you just enter a digit).[/php]
Press F1 while SCAR is focused.
SCARcoder
2010-01-15 01:09:33
Thanks, this is going to help me a lot.