Hi there,
is there a way to figure out whats the ID or Index the current Memory Record?
I know i can use getAddressList().getMemoryRecordByDescription() and so on...
Afaik every Memory Record has a underlaying ID and Index.
Is there a way to get those more or less direct ?
Thanks for useful suggestions
Get ID or Index of current Memory Record
-
- Expert Cheater
- Posts: 229
- Joined: Mon Aug 06, 2018 6:00 pm
- Reputation: 198
Re: Get ID or Index of current Memory Record
getAddressList().getMemoryRecordByDescription(‘description’).ID or .IndexS1N74X wrote: ↑Mon Apr 15, 2024 11:39 amHi there,
is there a way to figure out whats the ID or Index the current Memory Record?
I know i can use getAddressList().getMemoryRecordByDescription() and so on...
Afaik every Memory Record has a underlaying ID and Index.
Is there a way to get those more or less direct ?
Thanks for useful suggestions
[Link]
Re: Get ID or Index of current Memory Record
[/quote]
getAddressList().getMemoryRecordByDescription(‘description’).ID or .Index
[/quote]
Thx for your reply but thats exatctly not the way i need to get the ID or the Index
The Memerc Name or Description can change. The ID is afaik uniqe
getAddressList().getMemoryRecordByDescription(‘description’).ID or .Index
[/quote]
Thx for your reply but thats exatctly not the way i need to get the ID or the Index
The Memerc Name or Description can change. The ID is afaik uniqe
-
- Expert Cheater
- Posts: 229
- Joined: Mon Aug 06, 2018 6:00 pm
- Reputation: 198
Re: Get ID or Index of current Memory Record
Does it. Thximjustmaxie wrote: ↑Mon Apr 15, 2024 1:53 pmgetAddressList().SelectedRecord.ID or getAddressList().SelectedRecord.Index
Re: Get ID or Index of current Memory Record
Aah sh.....S1N74X wrote: ↑Mon Apr 15, 2024 2:00 pmDoes it. Thximjustmaxie wrote: ↑Mon Apr 15, 2024 1:53 pmgetAddressList().SelectedRecord.ID or getAddressList().SelectedRecord.Index
Selected == Activated
So the result doesnt match if you activate more than one script
Thx anyway
-
- Expert Cheater
- Posts: 229
- Joined: Mon Aug 06, 2018 6:00 pm
- Reputation: 198
Re: Get ID or Index of current Memory Record
Use a for loop on the AddressList and do compares if the AddressList[/i].Selected == true or AddressList[/i].Active == true or not, and do what you want to do afterwards.S1N74X wrote: ↑Mon Apr 15, 2024 2:10 pmAah sh.....S1N74X wrote: ↑Mon Apr 15, 2024 2:00 pmDoes it. Thximjustmaxie wrote: ↑Mon Apr 15, 2024 1:53 pm
getAddressList().SelectedRecord.ID or getAddressList().SelectedRecord.Index
Selected == Activated
So the result doesnt match if you activate more than one script
Thx anyway
Code: Select all
local al = getAddressList()
for i=0,al.Count-1 do
if al[i].Selected == true then
-- code here
end
-- or
if al[i].Active == true then
-- code here
end
end
Re: Get ID or Index of current Memory Record
^^ or: myMr = al.getMemoryRecordByID(ID)
(i never/rarely work with 'byDescr...' since i tend to a) rearrange/rename my entries in due time b) copy/pasting from another table keeps thàt ID (unless it already exists in current table)
(i never/rarely work with 'byDescr...' since i tend to a) rearrange/rename my entries in due time b) copy/pasting from another table keeps thàt ID (unless it already exists in current table)
Who is online
Users browsing this forum: No registered users