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 


How to obtain function name?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Tue Apr 23, 2013 6:43 pm    Post subject: How to obtain function name? Reply with quote

Hey Dark Byte,
How can I obtain the function names?
Like when you edit the form via C.E, and going to event tab, it displays all available functions.
How can I do the same?
I want to obtain it, display in Combo Box for this script
http://forum.cheatengine.org/viewtopic.php?p=5470519#5470519

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Apr 24, 2013 1:58 am    Post subject: Reply with quote

Ce does it by parsing through the lua script looking for " function .... (" and then take the name from that.
In lua i think do this to get ALL the function names that are defined:
Code:

for i,f in pairs(_G) do
  if type(f)=='function' then
    print(i)
  end
end

(you will find it's not that useful)

_________________
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
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Wed Apr 24, 2013 5:50 am    Post subject: Reply with quote

If we tweak it they way we want, it'll be useful =).
Thanks.
What I want to do is, to create an Listbox, display all the functions user has made (without C.E predefined functions), and let user set for it an hotkey =).

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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