Da 0wner
2009-02-18 20:49:54
iType
A quick procedure I made that types text.
Parameters:
Text: The text you wish to type.
WaitTime: The time to wait in between characters
Return: True if you want to press return after the text is entered.
Script:
Example:
Credits:
Baked0420: Testing :).
Notes:
You can change the WaitTimes in the procedure if you want…
Credit me if you want, not really needed but appreciated :p.
Bugs:
None :D.
A quick procedure I made that types text.
Parameters:
Text: The text you wish to type.
WaitTime: The time to wait in between characters
Return: True if you want to press return after the text is entered.
Script:
{*******************************************************************************
procedure iType(Text : string; WaitTime : integer; Return : boolean);
By: Da 0wner
Description: Types text...
*******************************************************************************}
procedure iType(Text : string; WaitTime : integer; Return : boolean);
var
i: integer;
s : string;
begin
s := '~!@#$%^&*()_+ABCDEFGHIJKLMNOPQRSTUVWXYZ{}|:"<>?';
for i := 1 to Length(Text) do
begin
if pos(Text[i], s) > 0 then
begin
KeyDown(VK_SHIFT);
Wait(WaitTime + Random(40));
end;
KeyDown(GetKeyCode(Text[i]));
Wait(WaitTime + Random(30));
KeyUp(GetKeyCode(Text[i]));
Wait(WaitTime + Random(30));
if pos(Text[i], s) > 0 then
KeyUp(VK_SHIFT);
end;
if not Return then
exit;
Wait(10 + Random(30));
KeyDown(VK_RETURN);
Wait(10 + Random(30));
KeyUp(VK_RETURN);
end;
Example:
iType('Hello, my name is Kyle. I have $4,000 dollars. I know that isn''t much but it''s all I have xD!', 25, true);
Credits:
Baked0420: Testing :).
Notes:
You can change the WaitTimes in the procedure if you want…
Credit me if you want, not really needed but appreciated :p.
Bugs:
None :D.