|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
cancandodo Advanced Cheater Reputation: 0
Joined: 09 Mar 2012 Posts: 62
|
Posted: Thu Jun 30, 2022 4:27 pm Post subject: how to set(change) all control by simple code? |
|
|
Code: |
if (CETrainer.CEEdit1) then CETrainer.CEEdit1.font.Size=11 end
if (CETrainer.CEEdit2) then CETrainer.CEEdit2.font.Size=11 end
if (CETrainer.CEEdit3) then CETrainer.CEEdit3.font.Size=11 end
if (CETrainer.CEEdit4) then CETrainer.CEEdit4.font.Size=11 end
if (CETrainer.CEEdit5) then CETrainer.CEEdit5.font.Size=11 end
if (CETrainer.CEEdit6) then CETrainer.CEEdit6.font.Size=11 end
if (CETrainer.CEEdit7) then CETrainer.CEEdit7.font.Size=11 end
if (CETrainer.CEEdit8) then CETrainer.CEEdit8.font.Size=11 end
if (CETrainer.CEEdit9) then CETrainer.CEEdit9.font.Size=11 end
.....
if (CETrainer.CEEdit100) then CETrainer.CEEdit100.font.Size=11 end
end
|
it work correct
but
Code: |
for i=0,100 do
if (CETrainer.CEEditi) then CETrainer.CEEditi.font.Size=11 end
end
|
Code: |
for i=0,100 do
if (table.concat({"CETrainer.CEButton",i})) then table.concat({"CETrainer.CEButton",i}).font.Size=11 end
end
|
Code: |
for i=0,100 do
if (CETrainer.CEEdit[i]) then CETrainer.CEEdit[i].font.Size=11 end
end
|
they work failed
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4300
|
Posted: Thu Jun 30, 2022 5:37 pm Post subject: |
|
|
Code: | local t = {
v1 = 'a',
v2 = 'b',
v3 = 'c',
v4 = 'd',
}
for i = 1,4 do
print(t['v' .. i])
end |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
cancandodo Advanced Cheater Reputation: 0
Joined: 09 Mar 2012 Posts: 62
|
Posted: Thu Jun 30, 2022 6:14 pm Post subject: |
|
|
ParkourPenguin wrote: | Code: | local t = {
v1 = 'a',
v2 = 'b',
v3 = 'c',
v4 = 'd',
}
for i = 1,4 do
print(t['v' .. i])
end |
|
tks,but it's Not available,i have more than 1000 controls(edit,button,listbox,label,panel,checkbox,checklisk)needs to set font size,height,width.
if i write code for each control,the codes will be too long
so i need a simple code to set all control(if this control exist)'s font size,height,width
for now
i can only write 1000 lines codes to set my 1000 controls's font size,height,width
too trouble....
|
|
Back to top |
|
|
cooleko Grandmaster Cheater Reputation: 11
Joined: 04 May 2016 Posts: 717
|
Posted: Thu Jun 30, 2022 7:16 pm Post subject: |
|
|
I can't answer your desired question, but if there isn't a default setting you can do it manually, just write a script to generate the text, and copy and paste the text into your code.
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Thu Jun 30, 2022 8:59 pm Post subject: |
|
|
Something like this?
Code: | for i=CETrainer.ComponentCount-1,0,-1 do
local x=CETrainer.Component[i]
if (x.ClassName=='TCEEdit') then
x.font.Size=11
end
end |
or
Code: | for i=CETrainer.ComponentCount-1,0,-1 do
local x=CETrainer.Component[i]
if (x.ClassName=='TCEEdit') and (x.Name = "CEEdit"..i) then
x.font.Size=11
end
end |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
cancandodo Advanced Cheater Reputation: 0
Joined: 09 Mar 2012 Posts: 62
|
Posted: Wed Jul 06, 2022 9:43 pm Post subject: |
|
|
Corroder wrote: | Something like this?
Code: | for i=CETrainer.ComponentCount-1,0,-1 do
local x=CETrainer.Component[i]
if (x.ClassName=='TCEEdit') then
x.font.Size=11
end
end |
or
Code: | for i=CETrainer.ComponentCount-1,0,-1 do
local x=CETrainer.Component[i]
if (x.ClassName=='TCEEdit') and (x.Name = "CEEdit"..i) then
x.font.Size=11
end
end |
|
tks,it work correct!but i edit this code like this
for i=0,CETrainer.ComponentCount-1 do
CETrainer.Component[i].font.Size=15
end
|
|
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
|
|