Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Can't find form made in form editor

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Popinman32
Cheater
Reputation: 0

Joined: 23 Jul 2010
Posts: 29

PostPosted: Thu Jun 16, 2011 5:16 pm    Post subject: Can't find form made in form editor Reply with quote

I'm trying to export my form, but I can't find it when I go through the form list... How can I find my form so I can export it to a file?
_________________
I had a life? O.o
I thought my job was to collect information and help, then one day hope to use it. :S
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Jun 16, 2011 7:50 pm    Post subject: Reply with quote

Is this a designed for or a form you created with createForm() ?

Anyhow, you just need the name of the form if you want to export it to a file (so doesn't even have to be in the form list)

e.g: form_saveToFile(myform, [[c:\forms\myform.frm]]);

you can then load it back using myform=createFormFromFile([[c:\forms\myform.frm]]);

_________________
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
View user's profile Send private message MSN Messenger
Popinman32
Cheater
Reputation: 0

Joined: 23 Jul 2010
Posts: 29

PostPosted: Mon Jun 20, 2011 5:22 am    Post subject: Reply with quote

Thank you, it was a designed form...

Which brings me to another question...

How do you get a child object of a form?

I have a text box and a button inside my form, since it's a script running exploit, but I can't figure out how to access them once I've re-created the form using the file. :S

I exported my form by creating it and saving it in _G.Form and somehow, the next form I created in the designer ended up being _G.Form.

_________________
I had a life? O.o
I thought my job was to collect information and help, then one day hope to use it. :S
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Mon Jun 20, 2011 6:54 am    Post subject: Reply with quote

the name of the object will be formname_objectname

even if the object is in a groupbox on a panel on top of another panel, it is still formname_objectname

so if you have a textbox named Bla in a form named originally Form123 then you can access Bla as Form123_Bla

Keep in mind that the variable of the component does not change if you decide to rename the form variable


Also, if for some reason this doesn't work or you want something else (e.g your own class-based implementation) you can use "component_findComponentByName" to find the specific objects of the form, or just bruteforcing using component_getComponentCount / component_getComponent

_________________
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
View user's profile Send private message MSN Messenger
Popinman32
Cheater
Reputation: 0

Joined: 23 Jul 2010
Posts: 29

PostPosted: Mon Jun 20, 2011 1:57 pm    Post subject: Reply with quote

Thanks again! Very Happy

I personally like the getComponentCount system, you can get a good for loop out of it. Razz

Code:

function FindChild(instance, name)
   local ChildNum = component_getComponentCount(instance)
   for i=0, ChildNum-1 do
      if component_getName(component_getComponent(instance, i)) == tostring(name) then
         return component_getComponent(instance, i)
      end
   end
   return --We didn't find our component...
end

I hope it helps SOMEONE. lol
I know it's going to be very handy...

Code:

MyForm:FindChild("ScriptBox") -- :)

_________________
I had a life? O.o
I thought my job was to collect information and help, then one day hope to use it. :S
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites