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 


PageControl1.ActivePage.name Do not work

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

Joined: 08 Oct 2020
Posts: 68

PostPosted: Sat Jul 23, 2022 5:05 pm    Post subject: PageControl1.ActivePage.name Do not work Reply with quote

sorry for my bad English
I open this link
https://wiki.cheatengine.org/index.php?title=Lua:Class:PageControl
and try
Quote:
ActivePage : TabSheet
Contains the currently selected tab.

but somehow it does not work,
what I try to get is: get active tab name

Note:
-the tab order in my script may be changed based on condition

thank you, have a nice day
Back to top
View user's profile Send private message
mece
Newbie cheater
Reputation: 2

Joined: 29 Jun 2014
Posts: 17

PostPosted: Sat Jul 23, 2022 6:07 pm    Post subject: Reply with quote

The following code works for me in my table.
Code:
print(CEFormTeleporter.CEPageControlTeleporter.ActivePage.Caption)



More info can be found at celua.txt
Back to top
View user's profile Send private message
kucingkembar
Advanced Cheater
Reputation: 0

Joined: 08 Oct 2020
Posts: 68

PostPosted: Sat Jul 23, 2022 6:29 pm    Post subject: Reply with quote

ok, this is quite silly,
Code:
if TheForm then
   TheForm.destroy()
end
ThePageControl= CreatePageControl(TheForm)
FirstTab = ThePageControl.addTab()
FirstTab.name = "first" --this line
SecondTab = ThePageControl.addTab()
SecondTab.name = "Second" --this line
ThePageControl.TabIndex = 0
print(ThePageControl.ActivePage.Caption)


I misunderstood "FirstTab" as the Tab name, it turns out you need to add ".name" to FirstTab to rename it as the default is blank,
it is quite embarrassing for me, I am very sorry

and thank you mece for the reply
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