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 


Have problems with scripts

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

Joined: 15 Feb 2019
Posts: 24

PostPosted: Tue Feb 26, 2019 1:55 pm    Post subject: Have problems with scripts Reply with quote

function CEPanel3OnClick (sender)
UDF1.CEPanel3.Color = "clBlack"
end

I WANNA DO WHEN I CLICKED AGAIN I WANNA CHANGE COLOR WHAT SHOULD I DO?

----------------------------------------------------------------------------------------------------------------------------------

function CECheckbox1OnChange (sender)
UDF1.CELabel1.Font.Color = "clLime"
end

I DID IT BUT FONT COLOR NOT CHANGING WHAT CAN I DO HELP ME PLS
Back to top
View user's profile Send private message AIM Address
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1532

PostPosted: Tue Feb 26, 2019 2:40 pm    Post subject: Reply with quote

Use the color number instead of the color names. Wink
Here is a forum suitable for color samples:
@Corroder Lua Extension: https://forum.cheatengine.org/viewtopic.php?t=606790

Code:
form = createForm(true)
form.Position = poDesktopCenter
form.Width = 320
form.Height = 240

p1 = createPanel(form)
p1.Height = 240
p1.Left = 0
p1.Top = 0
p1.Width = 320
p1.Color=0x000000

p1.OnClick = function()
if p1.Color==0x000000 then
p1.Color=0x07ff07 --clLime
else
p1.Color=0x000000
end
end

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Yanagod
Newbie cheater
Reputation: 0

Joined: 15 Feb 2019
Posts: 24

PostPosted: Wed Feb 27, 2019 6:30 am    Post subject: Like that? Reply with quote

function CEPanel1OnClick (sender)
UDF1.CELabel1.Font.Color= '0x0x07ff07'
end

Like that?
Back to top
View user's profile Send private message AIM Address
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1532

PostPosted: Wed Feb 27, 2019 11:10 am    Post subject: Re: Like that? Reply with quote

Yanagod wrote:
function CEPanel1OnClick (sender)
UDF1.CELabel1.Font.Color= '0x0x07ff07'
end

Like that?



no '0x0x07ff07' end '0x07ff07'


Code:
p1.OnClick = function () ---function CEPanel1OnClick(sender)
if p1.Color == 0x000000, then
p1.Color = 0x07ff07 - clLime  --UDF1.CEPanel1.Color=0x07ff07
else
p1.Color = 0x000000
end
end


--------------------------------------
In the form editing event:
Don't forget to give "OnClick" command. Wink

Code:
function CEPanel1OnClick(sender)
UDF1.CEPanel1.Color=0x07ff07
end

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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