PDA

View Full Version : MyPlayer.login failed



kakadudl
04-18-2016, 03:32 PM
Hello!

I want to inform you that with the latest update, login function is broken. It will write V where should be @ in the username place.

27342

Turpinator
04-18-2016, 04:00 PM
https://github.com/KyleHunter/OSR-Reflection/commit/88deea97adf7595d79c1f72d889d15dc74417e61

Shouldnt have changed anything in the typing functions...
So try it again? and then once more.

kakadudl
04-18-2016, 05:01 PM
Don't really know what that link is about. I tried it running many times on different computer and it's always making the same mistake.

Turpinator
04-18-2016, 05:10 PM
Not to mention that the last update to the actual code of reflection was at least 2 months ago...

kakadudl
04-18-2016, 05:22 PM
What's that about then? :)

27343

Kyle
04-18-2016, 06:00 PM
What's that about then? :)

27343

That was to force update the hooks, no code was changed

kakadudl
04-19-2016, 03:00 PM
That was to force update the hooks, no code was changed

Oh ok I see. Do you maybe know what could be the problem about that? :)

Kyle
04-19-2016, 03:20 PM
Not a clue. Seems to just be on your end, I tried it and it works for me

27347

kakadudl
04-20-2016, 01:26 PM
Not a clue. Seems to just be on your end, I tried it and it works for me

27347

Could you please post your TReflectionLogin.EnterDetails(Username, Password: String) procedure please? So I can see if It's different. I tried using it and I think here lies the problem. I also tried sending with SendKeys(...) and it worked :)

Turpinator
04-20-2016, 02:25 PM
Works fine for me.
Procedure TReflectionLogin.EnterDetails(Username, Password: String);
var
Clear: array [0..1] of Boolean;
Timeout: UInt64 := GetTickCount64 + Random(7500, 8000);
begin
Clear[Login_LoginBox_Byte] := CountColor(Login_Text_White, Login_LoginBox.X1,
Login_LoginBox.Y1, Login_LoginBox.X2,
Login_LoginBox.Y2);

Clear[Login_PasswordBox_Byte] := CountColor(Login_Text_White,
Login_PasswordBox.X1,
Login_PasswordBox.Y1,
Login_PasswordBox.X2,
Login_PasswordBox.Y2);

if (Reflect.Login.GetCursor <> Login_LoginBox_Byte) then
Reflect.Login.SetCursor(Login_LoginBox_Byte);
if (Clear[Login_LoginBox_Byte]) then
while (CountColor(Login_Text_White, Login_LoginBox.X1, Login_LoginBox.Y1, Login_LoginBox.X2, Login_LoginBox.Y2) > 5) and (Timeout > GetTickCount64) do
begin
Reflect.Keyboard.Send('{backspace}');
Wait(Random(30, 120));
end;
Reflect.Keyboard.Send(Username);
if (Reflect.Login.GetCursor <> Login_PasswordBox_Byte) then
Reflect.Login.SetCursor(Login_PasswordBox_Byte);
if (Clear[Login_PasswordBox_Byte]) then
while (CountColor(Login_Text_White, Login_PasswordBox.X1,
Login_PasswordBox.Y1, Login_PasswordBox.X2,
Login_PasswordBox.Y2) > 5) and (Timeout > GetTickCount64) do

begin
Reflect.Keyboard.Send('{backspace}');
Wait(Random(30, 120));
end;
Reflect.Keyboard.Send(Password+'{enter}');
Wait(1000+Random(500));
end;
i doubt this is /really/ what you want though.

maybe its this?
procedure TReflectionKeyboard.Send(Text: string);
var
Button, TextArray: tStringArray;
ButtonIndex, Presses: Integer;
begin
Text := Self.format(Text);
TextArray := MultiBetween(Text,'{','}');
for ButtonIndex to High(TextArray) do
begin
Button := Explode(' ', TextArray[ButtonIndex]);
if Length(Button) = 1 then
Self.Press(StrToInt(Button[0]))
else
Self.Press(StrToInt(Button[0]), Button[1])
end;
end;

kakadudl
04-20-2016, 09:20 PM
Works fine for me.
Procedure TReflectionLogin.EnterDetails(Username, Password: String);
var
Clear: array [0..1] of Boolean;
Timeout: UInt64 := GetTickCount64 + Random(7500, 8000);
begin
Clear[Login_LoginBox_Byte] := CountColor(Login_Text_White, Login_LoginBox.X1,
Login_LoginBox.Y1, Login_LoginBox.X2,
Login_LoginBox.Y2);

Clear[Login_PasswordBox_Byte] := CountColor(Login_Text_White,
Login_PasswordBox.X1,
Login_PasswordBox.Y1,
Login_PasswordBox.X2,
Login_PasswordBox.Y2);

if (Reflect.Login.GetCursor <> Login_LoginBox_Byte) then
Reflect.Login.SetCursor(Login_LoginBox_Byte);
if (Clear[Login_LoginBox_Byte]) then
while (CountColor(Login_Text_White, Login_LoginBox.X1, Login_LoginBox.Y1, Login_LoginBox.X2, Login_LoginBox.Y2) > 5) and (Timeout > GetTickCount64) do
begin
Reflect.Keyboard.Send('{backspace}');
Wait(Random(30, 120));
end;
Reflect.Keyboard.Send(Username);
if (Reflect.Login.GetCursor <> Login_PasswordBox_Byte) then
Reflect.Login.SetCursor(Login_PasswordBox_Byte);
if (Clear[Login_PasswordBox_Byte]) then
while (CountColor(Login_Text_White, Login_PasswordBox.X1,
Login_PasswordBox.Y1, Login_PasswordBox.X2,
Login_PasswordBox.Y2) > 5) and (Timeout > GetTickCount64) do

begin
Reflect.Keyboard.Send('{backspace}');
Wait(Random(30, 120));
end;
Reflect.Keyboard.Send(Password+'{enter}');
Wait(1000+Random(500));
end;
i doubt this is /really/ what you want though.

maybe its this?
procedure TReflectionKeyboard.Send(Text: string);
var
Button, TextArray: tStringArray;
ButtonIndex, Presses: Integer;
begin
Text := Self.format(Text);
TextArray := MultiBetween(Text,'{','}');
for ButtonIndex to High(TextArray) do
begin
Button := Explode(' ', TextArray[ButtonIndex]);
if Length(Button) = 1 then
Self.Press(StrToInt(Button[0]))
else
Self.Press(StrToInt(Button[0]), Button[1])
end;
end;

Thanks, will look into it soon. Second one is the one I want yeah :)

I just swapped Reflect.Keyboard.Send(Username) for SendKeys for now

Kyle
04-20-2016, 10:56 PM
Obscurity; Any thoughts?

kristi
04-21-2016, 09:01 AM
I'm guessing it has to do with Simba using keycodes from an english keyboard or something. I had the same problem with sendKeys using " instead of @, I found a temporary fix by switching to an english keyboard layout.