View previous topic :: View next topic |
Author |
Message |
MMM-304 Expert Cheater Reputation: 0
Joined: 17 Aug 2020 Posts: 166 Location: Milkey Way
|
Posted: Sat Aug 14, 2021 3:18 am Post subject: Change description/value of a node in structure dissect |
|
|
How can I change the description/value of selected item/node in tvStructureView of Structure Dissect Form using lua?
I cannot access its Caption/Text like i could do if it were TListView type rather than TTreeView.
|
|
Back to top |
|
|
Skyrimfus Cheater Reputation: 1
Joined: 17 Mar 2016 Posts: 42
|
Posted: Sat Aug 14, 2021 4:55 am Post subject: |
|
|
Code: |
form.mainStruct.Element[0].Name = "Description"
form.mainStruct.Element[0].VarType = vtByte
|
|
|
Back to top |
|
|
MMM-304 Expert Cheater Reputation: 0
Joined: 17 Aug 2020 Posts: 166 Location: Milkey Way
|
Posted: Sat Aug 14, 2021 6:32 am Post subject: |
|
|
I meant selected entry that is most probably gonna be in pointers as child elements. (in higher levels)
and also i want to change values not vartype
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Aug 14, 2021 6:53 am Post subject: |
|
|
Code: |
form=enumStructureForms()[1] --or whatever you use
entry=form.tvStructureView.Selected
struct=integerToUserData(entry.Parent.Data)
structelement=struct.Element[entry.Index]
structelement.Name="This element"
--get address
offsetlist={}
while entry.Parent do
table.insert(offsetlist,1,structelement.Offset)
entry=entry.Parent
if entry.Parent then
struct=integerToUserData(entry.Parent.Data)
structelement=struct.Element[entry.Index]
end
end
for i=0,form.ColumnCount-1 do
if form.Column[i].Focused then
local address=form.Column[i].Address+offsetlist[1]
for j=2,#offsetlist do
address=readPointer(address)+offsetlist[j]
end
printf("Address=%x",address)
return
end
print("No focused column found")
end
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
MMM-304 Expert Cheater Reputation: 0
Joined: 17 Aug 2020 Posts: 166 Location: Milkey Way
|
Posted: Sat Aug 14, 2021 8:10 am Post subject: |
|
|
Thanks a lot. Wasnt aware of this part:
Code: | struct=integerToUserData(entry.Parent.Data)
structelement=struct.Element[entry.Index] |
would be so good if just .Selected gives you the data.
|
|
Back to top |
|
|
|