Log in

View Full Version : TypeSend in SMART



ZephyrsFury
09-30-2010, 06:48 AM
I'm sure many people would have had the same problem, but:


TypeSendEx('Hi! How''s it going?.....,,,,,"" :::;;;;', False);


Gives this result: (See chat box)

http://img683.imageshack.us/img683/8348/85535909.png

Punctuation symbols tend to be missed or typed incorrectly.

Now I'm just wondering why this happens? And how I could edit TypeSend to work fully with SMART. I have tried SmartSendKeys which overrides SendKey's in Simba and SCAR but its too human-like/slow for my purposes.

So basically, is there a way to type symbols properly and close to instantly in SMART without having to edit SmartSendKey's source.

weequ
09-30-2010, 07:34 AM
So basically, is there a way to type close to instantly in SMART without having to edit SmartSendKey's source.I thougt you already knew how to do it according to our msn convercations.
procedure SendKeys2(S: String);
var
I: Integer;
begin
for I := 1 to High(S) do
begin
if Pos(S[I], 'ABCDEFGHIJKLMNOPQRSTUVWXYZOÄÖ'+'!"#¤%&/()=?*:;_>½') > 0 then KeyDown(VK_SHIFT);
if Pos(S[I], '@£$€{[]}\µ|') > 0 then
begin
KeyDown(VK_CONTROL);
KeyDown(VK_MENU);
end;
KeyDown(GetKeyCode(S[I]));
KeyUp(GetKeyCode(S[I]));
KeyUp(VK_SHIFT);
KeyUp(VK_CONTROL);
KeyUp(VK_MENU);
end;
end;
It doesn't however solve the first problem. I have the exact same problem.

ZephyrsFury
09-30-2010, 07:42 AM
I don't have problems with typing instantly or typing symbols properly when done separately. I do have problems with typing instantly and typing symbols properly at the same time.

Sorry, didn't make myself clear.

Timer
09-30-2010, 06:44 PM
This is what I use in my Clan Chat Bot.
I know you asked for it long ago.

procedure CatchCommands; forward;
procedure TypeByte2(k: Char; UseSend: Boolean);
begin
if (UseSend) then
begin
SendKeys(k);
end else
begin
KeyDown(GetKeyCode(k));
Wait(1);
KeyUp(GetKeyCode(k));
Wait(2);
end;
end;

procedure TypeSend22Ex2(Text: string; PressEnter: Boolean);
var
S, SS: string;
I, L: Integer;
Shift, Shiftt: Boolean;
begin
S:= '~!@#$%^&*()_+{}|:"<>?-=[]\;'',./';
SS := 'QWERTYUIOPASDFGHJKLZXCVBNM';
L := Length(Text);
for I := 1 to L do
begin
Shiftt := (Pos(Text[i], SS) > 0);
if (Shiftt) then
KeyDown(VK_SHIFT);
Shift := (Pos(Text[i], S) > 0);
if (Shift) then
begin
if (Text[I] = '`') then
Wait(2500) else
TypeByte2(Text[I], True);
Inc(I);
if (I > Length(Text)) then Break;
end;
if (I <= Length(Text)) then
begin
if (Text[I] = '`') then
Wait(2500) else
TypeByte2(Text[I], False);
end;
if (Shiftt) then
KeyUp(VK_SHIFT);
end;
if (PressEnter) then
TypeByte2(Chr(10), False);
if (Shiftt) then
KeyUp(VK_SHIFT);
Wait(2500);
CatchCommands;
end;

procedure TypeSend2(Text: string);
begin
if (StopTalking) then Exit;
SendKeys('/');
Wait(100);
TypeSend22Ex2(Text, True);
end;

It could be cleaner, but that's an old version. Work from it. :p

ZephyrsFury
10-01-2010, 12:30 AM
Timer, thanks. I've seen that function though, it uses SmartSendKeys on symbols which slows the typing down. I was curious as to whether there was another way without the using SmartSendKeys.

Timer
10-01-2010, 04:06 PM
Timer, thanks. I've seen that function though, it uses SmartSendKeys on symbols which slows the typing down. I was curious as to whether there was another way without the using SmartSendKeys.

Oh, dunno. I'd have to look into it.
And yeah, I forgot you got a leak of my Clan Chat Bot. [mad face]
At least you don't have the latest version though. :p The one you got was months old from the day you obtained it.