| View previous topic :: View next topic |
| Author |
Message |
jacky15 How do I cheat?
Reputation: 0
Joined: 09 Feb 2016 Posts: 4
|
Posted: Fri Feb 12, 2016 1:30 pm Post subject: Read information from Listbox |
|
|
| In listbox have some information. How to make so that it reads a line in listbox.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Fri Feb 12, 2016 1:48 pm Post subject: |
|
|
ListBoxObject.Items.Count returns the number of lines
ListBoxObject.Items[0] returns the first line
ListBoxObject.Items[ListBoxObject.Count-1] returns the last line
ListBoxObject.Items[ListBoxObject.ItemIndex] returns the selected line
If no line is selected ListBoxObject.ItemIndex will be -1, which is invalid, so check for that
_________________
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 |
|
 |
jacky15 How do I cheat?
Reputation: 0
Joined: 09 Feb 2016 Posts: 4
|
Posted: Sat Feb 20, 2016 4:19 am Post subject: |
|
|
Okay. thx.
How do I get the address value equal to the line number.
|
|
| Back to top |
|
 |
LastExceed Expert Cheater
Reputation: 1
Joined: 05 Nov 2014 Posts: 130
|
Posted: Sun Feb 21, 2016 5:36 am Post subject: |
|
|
| Can you explain what you are looking for a little more detailed?
|
|
| Back to top |
|
 |
jacky15 How do I cheat?
Reputation: 0
Joined: 09 Feb 2016 Posts: 4
|
Posted: Sun Feb 21, 2016 6:59 am Post subject: |
|
|
Yep, i can.
Look, let's say the game is a a list of items. There is an address. 00B51FA0.
If the value of the game is 0 then it will be in the label to write 1 line, that is nothing. If the value is 1, then 2 line - that is the key. And etc...
| Description: |
|
| Filesize: |
50.89 KB |
| Viewed: |
4882 Time(s) |

|
|
|
| Back to top |
|
 |
LastExceed Expert Cheater
Reputation: 1
Joined: 05 Nov 2014 Posts: 130
|
Posted: Sun Feb 21, 2016 7:15 am Post subject: |
|
|
So you want the label to show the ListBox line that is given by the address 00B51FA0, did I get that right?
For this you need to use a timer that constantly looks up the value of the given address. Let's assume your form, Label and ListBox are called 'UDF1', 'CELabel1' and 'CEListBox1' (the default names).
| Code: | t=createTimer()
t.OnTimer=function(sender)
UDF1.CELabel1.caption=UDF1.CEListBox1.Items[readInteger('00B51FA0')]
end
t.interval=10
t.enabled=true |
Remember that the first line in the list is line 0, NOT line 1.
Also make sure that the value of that address is never higher than the amount of items in the listbox, because if e.g. the value is 123123, it tries to find line 123123 in the listbox, which doesn't exist and therefore returns an error (or just nil, I'm not sure tbh).
|
|
| Back to top |
|
 |
jacky15 How do I cheat?
Reputation: 0
Joined: 09 Feb 2016 Posts: 4
|
Posted: Sun Feb 21, 2016 10:44 am Post subject: |
|
|
| Thank you, yes I know that counting starts from 0, it is just at hand.
|
|
| Back to top |
|
 |
|