for enter login, password
const
VK_BACK: cardinal = $8;
VK_TAB: cardinal = $9;
VK_RETURN: cardinal = $D;
login: string = 'YOUR LOGIN';
password: string = 'YOUR PASSWORD';
delayTime: cardinal = 2000;
//--
procedure clear;
var
i: integer;
begin
for i:=0 to 32 do
engine.useKey(VK_BACK);
end;
//--
var
i: integer;
begin
clear;
engine.enterText(login);
delay(delayTime);
engine.useKey(VK_TAB);
delay(delayTime);
engine.enterText(password);
for i:=0 to 3 do
begin
delay(delayTime);
engine.useKey(VK_RETURN);
end;
end.
and open l2
function ShellExecuteW(hwnd: integer; lpOperation, lpFile, lpParameters, lpDirectory: PChar; nShowCmd: integer): integer; stdcall; external 'Shell32.dll';
begin
ShellExecuteW(0, 'open', 'l2.exe', nil, 'C:\Program Files (x86)\l2\system', 0);
end.
hope it helps, gl