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 


ProcessMessages... How to use.

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

Joined: 19 Jul 2013
Posts: 23
Location: Cayman Islands

PostPosted: Fri Jul 19, 2013 11:01 am    Post subject: ProcessMessages... How to use. Reply with quote

Hey all,


I have been trying to get ProcessMessages() working for a bit too long now. lol

I keep getting :

attempt to call global 'ProcessMessages' (a nil value)

I honneestly don't care about it... I really want to change the font color on my buttons when activated/deactivated in my trainer, & have it actually CHANGE! lol

This is what i'm doing now:

Code:
function CEButton8Click(sender)
      control_setCaption(CETrainer_CEButton8, "SpeedHack x5")
      font_setColor(CETrainer_CEButton8, clGreen)
end



Does NOTHING. Smile

I also want the button's text to be bold, but i'm still nooby at lua's options... like clGreen for example, i don't even know if it's a valid registered color constant in lua outside of the trainer editor. Sad

_________________
Hitler... When all else fails, you'll be in the right state of mind. Jesus Saves.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jul 19, 2013 11:07 am    Post subject: Reply with quote

processMessages()

p small
r small
..
..
M big
e small



And font_setColor is font class method.


You can use this to change font properties
Code:
UDF1_CEButton1.Font.Style = '[fsBold]'

or
Code:
UDF1_CEButton1.Font.Size = 12

_________________


Last edited by mgr.inz.Player on Fri Jul 19, 2013 11:19 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
DTeCH
Newbie cheater
Reputation: 0

Joined: 19 Jul 2013
Posts: 23
Location: Cayman Islands

PostPosted: Fri Jul 19, 2013 11:18 am    Post subject: Reply with quote

mgr.inz.Player wrote:
processMessages()

p small
r small
..
..
M big
e small



And font_setColor is font class method.



Doesnt help me... I'm not fluent in lua.

I mean, once processMessages() is in the function, that error pops up when run after compile. Seems to maybe because of missing declaration, or some other thing?

Code:
And font_setColor is font class method.


No idea what that means. Remember... i said "NOOBY" Razz

Is it a class i have to declare, or otherwise import?


Anyway... I just want the button to change color, & also go bold when activated. Not really sure processMessages() is even needed.

_________________
Hitler... When all else fails, you'll be in the right state of mind. Jesus Saves.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jul 19, 2013 11:22 am    Post subject: Reply with quote

ProcessMessages() will give you attempt to call global 'ProcessMessages' (a nil value) because ProcessMessages() doesn't exist.

processMessages() works.


LUA is case-sensitive.

_________________
Back to top
View user's profile Send private message MSN Messenger
DTeCH
Newbie cheater
Reputation: 0

Joined: 19 Jul 2013
Posts: 23
Location: Cayman Islands

PostPosted: Fri Jul 19, 2013 11:26 am    Post subject: Reply with quote

oh... Unix style! Very Happy


Case sensitive.

Thanks man... really appreciate it Very Happy


ps: any ideas of how to set the bold thingy on a button in a lua button click event? Don't really want to start a new thread for it. Razz Thanks again.

_________________
Hitler... When all else fails, you'll be in the right state of mind. Jesus Saves.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jul 19, 2013 11:32 am    Post subject: Reply with quote

Code:
function CEButton8Click(sender)
  sender.Caption = "SpeedHack x5"
  sender.Font.Style = '[fsBold]'
end

Will change caption and set font style to bold.


sender is the same thing as CETrainer_CEButton8
(in this case)

_________________
Back to top
View user's profile Send private message MSN Messenger
DTeCH
Newbie cheater
Reputation: 0

Joined: 19 Jul 2013
Posts: 23
Location: Cayman Islands

PostPosted: Fri Jul 19, 2013 11:36 am    Post subject: Reply with quote

Thanks alot.

Quick response. Smile

_________________
Hitler... When all else fails, you'll be in the right state of mind. Jesus Saves.
Back to top
View user's profile Send private message AIM Address Yahoo 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