-
Contributor
GlueXML AccountLogin frames
I have trouble getting AccountLogin frames by their names. Currently i'm using very hackish way to get required frames at login screen to be able to log in after dc.
I looked up for specific names here BlizzardInterfaceCode/AccountLogin.lua at master . tomrus88/BlizzardInterfaceCode . GitHub
For example:
AccountLogin.UI.AccountEditBox
AccountLogin.UI.PasswordEditBox
I can detect these frames by ObjectType (Button, EditBox), but i can't get them by name which is what i want.
The way i read names:
Code:
public string Name => Memory.ReadString(Memory.Read<IntPtr>(BaseAddress + Core.WowOffsets.CSimpleFrame_GetName), Encoding.UTF8);
//Core.WowOffsets.CSimpleFrame_GetName => 0x20
But for these specific frames pointer is zero.
There's a frame with a name AccountLogin it has 1 child object which is AccountLogin.UI, however it doesn't have any children objects.
My tool is external, so i can't use lua for my purposes.
Any clues?
-
Established Member
The first thing you need to solve is the parsing of uiframe, including sub controls such as button and editbox.
Then write a CE script to dump all currently visible UI controls to view inheritance relationships and addresses.
Finally, use IDA to find the interfaces such as set editbox text and click button to realize automatic login.
-
Contributor
I have reversed everything i need to able to interact with framescript objects such as CSimple frames. The vftable index for getting names for every frame object is the same.
It works for every frame in the game, except for AccountLogin frames, this pointer is zero.
I have the ability to detect required frames such as AccountLogin.UI.PasswordEditBox, AccountLogin.UI.LoginButton and etc. without getting the names, but it would be nice to have the ability to get them by name.
-
Established Member
there are no control named AccountLogin.UI.PasswordEditBox, AccountLogin.UI.LoginButton.
try to find lable text of control is "account" and "password" it's parent is the editbox control.
-
Contributor
There are look here BlizzardInterfaceCode/AccountLogin.lua at master . tomrus88/BlizzardInterfaceCode . GitHub
And here they are in the game's frame object list
No names though, that's what i'm trying to figure out.
-
AccountLogin.UI should be this one, no?
It contains 5 child frames, and the editboxes you are looking for. I don't know what your issue is with name lookups, but I would assume you could simply select the controls you need via index, ie.
Code:
var accountLoginUI = Frames["AccountLogin"].Children[0] as Frame;
var editboxes = accountLoginUI.Children.Where(child => child.Type == ControlType.Editbox);
var accountLogin = (EditBox) editboxes.ElementAt(0);
var accountPassword = (EditBox) editboxes.ElementAt(1);
Even this is consistent since the last rewrite of the login lua code (5+ years ago.)
-
Post Thanks / Like - 1 Thanks
Sacred (1 members gave Thanks to Jadd for this useful post)
-
Contributor
Yeah, i've been doing it just like that as i mentioned in the first post about my hackish way. Well i guess this is the only way, but thanks anyway. Also apparently my child/region stuff was messed up, i got it right now.
I still find it strange why these frames don't have names, any clues?
Last edited by Sacred; 09-27-2021 at 08:29 AM.
-
Originally Posted by
Sacred
I still find it strange why these frames don't have names, any clues?
Not sure, never looked into the structure of CSimpleFrame. If I had to guess, it's because they're local variables and cannot be referred to by name outside of the script it was declared in. Their names are probably stored elsewhere or optimized away. But again, that's just a guess.