SRL Archive - S.M.A.R.T. Bugs and Improvements.

TypeSend is not working right..


Black Hat

2007-11-25 20:46:09

It seems that when my script uses TypeSend, it types something but seems to not press "enter"

How come?

not i am using SCAR 3.12e


- NVM I fixed the problem.. i did something wrong when rewriting the text.scar

Bobarkinator

2007-11-25 22:12:26

If anyone else has the problem then this seems to be the fix
procedure TypeSend(Text: string);
var
i: Integer;
Shift: Boolean;
begin
{$IfDef SMART}
Shift:= True;// Put in so I didn't get hints at start of script
i:= 0;// Same reason as above.
SmartSendKeys(Text + Chr(10));
{$Else}
for i := 1 to Length(Text) do
begin
Shift := (Text[i] = ':') or (Text[i] = '!') or (Text[i] = '+') or
(Text[i] = '?') or (Text[i] = '<') or (Text[i] = '>') or
(Text[i] = '@') or (Text[i] = '#') or (Text[i] = '$') or
(Text[i] = '&') or (Text[i] = '%') or (Text[i] = '*');
if (Text[i] = '_') then
Text[i]:= ' ';
if (Shift) then
begin
KeyDown(VK_Shift);
Wait(5 + Random(20));
end;
TypeByte(GetKeyCode(Text[i]));
if (Shift) then
begin
KeyUp(VK_Shift);
Wait(5 + Random(20));
end;
Wait(50 + Random(120));
end;
Wait(200 + Random(500));
TypeByte(13);
{$EndIf}
end;


You must have {$Define SMART} at the top of SMART.scar