Neron Posted January 15, 2012 Share Posted January 15, 2012 It Is possible to send client key combinations? Like CTRL + A ? Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted January 15, 2012 Share Posted January 15, 2012 (edited) i would assume using these to functions check for if one is true then check the other and do a if statement using the and operator. heres some functions : 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 IsKeyDown(C: Char): Boolean; Checks if the given key is down. Example: if(IsKeyDown('a'))then Writeln('You have pressed "a". Congratulations!'); Heres the code i write to Test: procedure Checkkeys; Begin if (IsFunctionKeyDown(1) and IsKeyDown('a')) then Writeln('Both Keys Are Down!') else Writeln('Still Lookin For Keys!'); end; Here is Function i wrote, Simple and to the point Function Keys 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 Checkkeys(FuncKey: Byte; C: Char; WaitTime: Integer):boolean; Var T: Integer; Begin T := GetSystemTime + WaitTime repeat if (IsFunctionKeyDown(FuncKey) and IsKeyDown(C)) then result := True else result := False; until (T < GetSystemTime) or (result = True); end; Example : begin if CheckKeys(1,'a', 5000) = true then//This will check for the keys for 5 seconds then exit; writeln('Keys pressed') // Or something more usefule like terminate Script else Writeln('Keks Not Pressed'); end. Edited January 15, 2012 by shadowrecon Quote Link to comment Share on other sites More sharing options...
FHannes Posted January 15, 2012 Share Posted January 15, 2012 He wants to send keys not detect them... Try this: KeyDown(VK_CONTROL); KeyDown(GetKeyCode('a')); Wait(250); KeyUp(GetKeyCode('a')); KeyUp(VK_CONTROL); Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted January 15, 2012 Share Posted January 15, 2012 He wants to send keys not detect them... Try this: KeyDown(VK_CONTROL); KeyDown(GetKeyCode('a')); Wait(250); KeyUp(GetKeyCode('a')); KeyUp(VK_CONTROL); you would be correct, did not read that correctly, i just skimmed it then went to work lol. still a useful function for something... Quote Link to comment Share on other sites More sharing options...
Wanted Posted January 15, 2012 Share Posted January 15, 2012 http://forums.scar-divi.com/showthread.php?454-Sendkey-help&highlight=CTRL Quote Link to comment Share on other sites More sharing options...
Neron Posted January 15, 2012 Author Share Posted January 15, 2012 (edited) Thanks! Work Perfect! Another one: Is there inversed function of GetKeyCode like : CharFromKeyCode(code : byte) :char but not this #65 is 'a' need for randomize string Edited January 15, 2012 by Neron Quote Link to comment Share on other sites More sharing options...
FHannes Posted January 15, 2012 Share Posted January 15, 2012 Not exactly, but I don't see why you'd ever need that... Quote Link to comment Share on other sites More sharing options...
Neron Posted January 16, 2012 Author Share Posted January 16, 2012 need for obfuscator to randomname functions and variables Forget this Question. I find solution. I will use md5 function Quote Link to comment Share on other sites More sharing options...