|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Freiza Grandmaster Cheater Reputation: 22
Joined: 28 Jun 2010 Posts: 662
|
Posted: Sat Mar 10, 2012 1:03 pm Post subject: How to do this in lua? |
|
|
Sorry I couldn't think of a suitable topic for this.
Code: |
f.checkbox2=checkboxes(f.form,10,30)
f.checkbox3=checkboxes(f.form,10,50)
f.checkbox4=checkboxes(f.form,10,70)
f.checkbox5=checkboxes(f.form,10,90) |
I want to perform above effect using for loop how to do that.
Code: |
m=10
for i=1,4 do
f.checkbox..i+1=checkbox(f.form,10,m)
m=m+10
end |
This code is not working. Even using paranthesis like f.(checkbox..1+1) gives me error
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8517 Location: 127.0.0.1
|
Posted: Sat Mar 10, 2012 1:24 pm Post subject: |
|
|
You could do something like this:
Code: |
local form = createForm( true );
local checkBoxes = {};
checkBoxes[1] = createCheckBox( form );
checkBoxes[2] = createCheckBox( form );
checkBoxes[3] = createCheckBox( form );
checkBoxes[4] = createCheckBox( form );
checkBoxes[5] = createCheckBox( form );
for x = 1, #checkBoxes do
control_setCaption( checkBoxes[x], "This is checkbox " .. tostring( x ) );
control_setPosition( checkBoxes[x], 10, x * 20 )
end
|
_________________
- Retired. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|