Jump to content
  • 0

Getting List Items in Script


BaldiGT

Question

Script ended:
{ -- table(cfcd1b3)
[1] = { -- table(2fc0370)
['address'] = 0xbef6fc04,
['flags'] = 4, -- gg.TYPE_DWORD
['freeze'] = false,
['freezeType'] = 0, -- gg.FREEZE_NORMAL
['name'] = 'ID - Rush',
['value'] = -1019895808,
},
[2] = { -- table(42adf6e)
['address'] = 0xbef6fc0c,
['flags'] = 4, -- gg.TYPE_DWORD
['freeze'] = false,
['freezeType'] = 0, -- gg.FREEZE_NORMAL
['name'] = 'ID - Magic',
['value'] = -1019890352,
},
}

Exit.



How to copytext a value from table [2]?
When im trying to copy with this code

local h = gg.getListItems()
gg.copyText(h[2].value)

its just copy the first value -1019895808,

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

6 minutes ago, BadCase said:

which fields are you trying to copy?

[2] = { -- table(42adf6e)
['address'] = 0xbef6fc0c,
['flags'] = 4, -- gg.TYPE_DWORD
['freeze'] = false,
['freezeType'] = 0, -- gg.FREEZE_NORMAL
['name'] = 'ID - Magic',
['value'] = -1019890352,
},

 

The value -1019890352,

Im not use a table just add them into saved list items, im using

h = gg.getResults(1)

h[1].name = "example"

h[1].address = "bla bla bla"

gg.addListItems(h)

I want to add the address to saved list items and also i want to copy the value from that address

Link to comment
Share on other sites

2 hours ago, BaldiGT said:

local h = gg.getListItems()
gg.copyText(h[2].value)

its just copy the first value -1019895808,

I think there may be an extra value above them in saved list.thats why you try copy h[2].value but script copied first value. Try print and check the result.

h= gg.getListItems() print(h)

 

2 hours ago, BaldiGT said:

Script ended:
{ -- table(cfcd1b3)
[1] = { -- table(2fc0370)
['address'] = 0xbef6fc04,
['flags'] = 4, -- gg.TYPE_DWORD
['freeze'] = false,
['freezeType'] = 0, -- gg.FREEZE_NORMAL
['name'] = 'ID - Rush',
['value'] = -1019895808,
},
[2] = { -- table(42adf6e)
['address'] = 0xbef6fc0c,
['flags'] = 4, -- gg.TYPE_DWORD
['freeze'] = false,
['freezeType'] = 0, -- gg.FREEZE_NORMAL
['name'] = 'ID - Magic',
['value'] = -1019890352,
},
}

You have set the names. You can also copy value by checking names. iterate table.

Link to comment
Share on other sites

10 hours ago, Lover1500 said:

I think there may be an extra value above them in saved list.thats why you try copy h[2].value but script copied first value. Try print and check the result.

h= gg.getListItems() print(h)

 

You have set the names. You can also copy value by checking names. iterate table.

Sometimes i got the value from table [1] and [2] is same,

The value is not writen on the h[2].value because i have not use that value, but if i put gg.getListItems(h) gg.searchNumber(h[2].value) and then gg.copyText(h[2].value) its work, but i dont want to use gg.searchNumber,

I want to know how to get a data list from different table

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.