View previous topic :: View next topic |
Author |
Message |
Moonbluelegend How do I cheat? Reputation: 0
Joined: 09 Feb 2013 Posts: 5
|
Posted: Sat Feb 09, 2013 12:06 am Post subject: [help] about set CEEdit |
|
|
if i want
Code: |
control_setCaption(CE_CEEdit1,"1")
control_setCaption(CE_CEEdit2,"2")
control_setCaption(CE_CEEdit3,"3")
control_setCaption(CE_CEEdit4,"4")
.
.
.
.
control_setCaption(CE_CEEdit100,"100")
|
how can i do ? |
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Sat Feb 09, 2013 1:05 am Post subject: |
|
|
What do you want to do? I really didn't understand you...
What you wrote is working fine.. _________________
|
|
Back to top |
|
|
Moonbluelegend How do I cheat? Reputation: 0
Joined: 09 Feb 2013 Posts: 5
|
Posted: Sat Feb 09, 2013 1:10 am Post subject: |
|
|
Flashacking wrote: | What do you want to do? I really didn't understand you...
What you wrote is working fine.. |
i want to use for write
for i=1,100 do
control_setCaption(CE_Edit1~100,i)
end |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sat Feb 09, 2013 3:08 am Post subject: |
|
|
Place those edits inside an Panel and then get then enumerate through the components in the panel object(component_getComponentCount and component_getComponent) and call control_setCaption for those components.
or just create an array with references to the objects once and reuse it each time
Code: |
edits={}
edits[1]=CE_CEEdit1
edits[2]=CE_CEEdit2
edits[3]=CE_CEEdit3
....
edits[10000000000]=CE_CEEdit10000000000
....
for i=1,10000000000 do
control_setCaption(edits[i],i)
end
|
_________________
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 |
|
|
Moonbluelegend How do I cheat? Reputation: 0
Joined: 09 Feb 2013 Posts: 5
|
Posted: Sat Feb 09, 2013 10:59 am Post subject: |
|
|
Dark Byte wrote: | Place those edits inside an Panel and then get then enumerate through the components in the panel object(component_getComponentCount and component_getComponent) and call control_setCaption for those components.
|
Thanks !
Code: |
editnameid=0
function CEButton1Click(sender)
for i=0,component_getComponentCount(CE)-1 do
if checkEditName(i) then
control_setCaption(component_getComponent(CE,i),editnameid)
end
end
end
function checkEditName(num)
local temp={}
for myi=1,100 do
temp[myi]=myi
end
for myj=1,#temp do
if component_getName(component_getComponent(CE,num))=="CEEdit"..temp[myj] then
editnameid=myj
return true
end
end
return false
end
|
|
|
Back to top |
|
|
|