So for the last few days I've been raking my brain...
I downloaded all the newest java, simba, SRL/OSR, TRS/Walker etc as per the guide.
And i thought it would be a good idea to take a look at the log-in code in the guides,
and also in other peoples scripts. To get an idea of how i'm meant to be writing it.
But it seems no matter what i do, or whos script i use it doesn't work.
Mean it'll load Smart, but i cant declare player with all the login info.
The only way that i've been able to log on automatically is to use PInput and KInput include,
by Kasi, and send my information after clickmouse xy.
I'm combining 3 scripts just to get one working, could anyone point me to a fix please. My code below;
Opens Smart client
program new;
{$define SMART} //If not using SMART, then comment this line out
{$I SRL/OSR.simba}
{$I RSWalker/Walker.simba}
begin
clearDebug();
srl.Setup([]);
end.
Grabs client PID
program new;
{$include PInput/PInput.simba}
procedure Stop();
begin
PInput.Shutdown(); // Make sure you shutdown PInput
end;
begin
PInput.Setup(); // Setup PInput. Grabs the PID of the target window.
PInput.OverrideSimba := false; // Don't override Simba Mouse and Keyboard functions
PInput.MoveMouse(580, 230);
PInput.HoldMouse(580, 230, mouse_Left);
PInput.MoveMouse(700, 400);
sleep(10);
Stop();
end.
end.
Uses client PID and logs on using clicks and keysends etc
// You need to write PID number below once you have grabbed it.
// And You Also Need To Type In your Details.
program new;
{$include PInput/PInput.simba}
function WritePID: Integer;
begin
Result := ; // Write Obtained PID Number here.
end;
function WriteUserName: String;
begin
Result := ""; // Write UserName here.
end;
function WritePassword: String;
begin
Result := ""; // Write Password here.
end;
procedure Stop();
begin
PInput.Shutdown();
end;
procedure Login();
begin
PInput.Setup([(WritePID)]);
PInput.MoveMouse(0,454, 288);
PInput.ClickMouse(0,454,288,1);
sleep(3000);
PInput.SendKeys(0,(WriteUserName),100,100);
sleep(2000);
PInput_PressKey((WritePID),13);
sleep(2000);
PInput.SendKeys(0,(WritePassword),100,100);
sleep(2000);
PInput.ClickMouse(0,311,316,1);
sleep(5000);
PInput.ClickMouse(0,397,355,1);
end;
begin
Login();
Stop();
end.
Any help is appreciated, thank you