| View previous topic :: View next topic |
| Author |
Message |
MMM-304 Expert Cheater
Reputation: 0
Joined: 17 Aug 2020 Posts: 170 Location: Milkey Way
|
Posted: Tue Sep 01, 2020 9:45 am Post subject: Change Bookmarks using Lua |
|
|
I need help with this!
When we set a bookmark in Dissassembler Form, it cahnges the caption which can be accessed as:
| Code: | a = getMemoryViewForm().MenuItem23
for i=0,a.Count-1 do
b = a.Item[i].Caption
c = b:find(':')
if c then
d = b:sub(c+2,b:len())
print(d)
end
end |
but if we try to change the bookmark Caption like this:
| Code: | a = getMemoryViewForm().MenuItem23
b = a.Item[0].Caption
print(b)
a.Item[0].Caption = 'Bookmark 0: Tutorial-x86_64.exe+2BAA'
|
It does not effect the actual bookmark location. in fact in MenuItem24 which is Goto bookmarks the Caption remains the same (old one)
It means that the real bookmark location is not dependent on the Caption.
What I want to ask is how can I get the real BM location and change it using Lua instead of Set/Unset Bookmark
|
|
| Back to top |
|
 |
MMM-304 Expert Cheater
Reputation: 0
Joined: 17 Aug 2020 Posts: 170 Location: Milkey Way
|
Posted: Wed Sep 02, 2020 11:31 am Post subject: |
|
|
| @Dark Byte Please help
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 472
Joined: 09 May 2003 Posts: 25867 Location: The netherlands
|
Posted: Wed Sep 02, 2020 2:00 pm Post subject: |
|
|
it's not exported
but you can use this code to set bookmark 0 (same for the other ones)
| Code: |
local mv=getMemoryViewForm()
local oldaddress=mv.DisassemblerView.SelectedAddress
local oldtop=mv.DisassemblerView.TopAddress
mv.DisassemblerView.SelectedAddress=0x12345678
getMemoryViewForm().miSetBookmark0.DoClick()
mv.DisassemblerView.TopAddress=oldtop
mv.DisassemblerView.SelectedAddress=oldaddress
|
to get the address, try parsing the caption
_________________
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: 170 Location: Milkey Way
|
Posted: Wed Sep 02, 2020 8:22 pm Post subject: |
|
|
but its not using module addresses its just using normal addresses. How can I make
| Code: | | mv.DisassemblerView.SelectedAddress=0x12345678 |
to
| Code: | | mv.DisassemblerView.SelectedAddress='module+offset' |
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 472
Joined: 09 May 2003 Posts: 25867 Location: The netherlands
|
Posted: Wed Sep 02, 2020 11:28 pm Post subject: |
|
|
use getAddress
_________________
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: 170 Location: Milkey Way
|
Posted: Thu Sep 03, 2020 1:51 am Post subject: |
|
|
u mean like this
| Code: | local mv=getMemoryViewForm()
local oldaddress=mv.DisassemblerView.SelectedAddress2
local oldtop=mv.DisassemblerView.TopAddress
a = getAddress(oldaddress)
print(oldaddress)
print(a) |
didnt work.it prints the same (without module+offset)
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 472
Joined: 09 May 2003 Posts: 25867 Location: The netherlands
|
Posted: Thu Sep 03, 2020 2:00 am Post subject: |
|
|
if you want to print out the address in string format use getNameFromAddress
_________________
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: 170 Location: Milkey Way
|
Posted: Thu Sep 03, 2020 4:12 am Post subject: |
|
|
| Thank u Dark Byte. ill work with this and hopefully there will be no problem
|
|
| Back to top |
|
 |
|