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 


Change Lua Script Syntax Highlighting Colors

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

Joined: 21 Jan 2019
Posts: 27

PostPosted: Thu May 09, 2019 8:46 am    Post subject: Change Lua Script Syntax Highlighting Colors Reply with quote

how to change Lua Script Syntax Highlighting Colors?
with lua or ce source
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Thu May 09, 2019 8:52 am    Post subject: Reply with quote

luasyntax.pas

or in lua:
Code:

s=getLuaEngine().mScript
s.HighLighter.StringAttri.Foreground='0x00ff00'
--etc...


It has the following attributes
Code:

    CommentAttri
    IdentifierAttri
    KeyAttri
    LuaMStringAttri
    NumberAttri
    SpaceAttri
    StringAttri


and each attribute has the following published items:
Code:

    Background: TColor
    Foreground: TColor
    FrameColor: TColor
    FrameStyle: TSynLineStyle
    FrameEdges: TSynFrameEdges
    Style: TFontStyles
    StyleMask: TFontStyles

_________________
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
Nighthawyun
Cheater
Reputation: 0

Joined: 21 Jan 2019
Posts: 27

PostPosted: Thu May 09, 2019 8:53 am    Post subject: Reply with quote

nonono i mean
Lua script (not lua english) highlights
Back to top
View user's profile Send private message
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Thu May 09, 2019 11:35 am    Post subject: Reply with quote

Nighthawyun wrote:
nonono i mean
Lua script (not lua english) highlights

LuaSyntax.pas

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Thu May 09, 2019 11:56 am    Post subject: Reply with quote

same, but then use some more code to get the luascript form
Code:

if LuaScriptForm==nil then
  for i=1,getFormCount()-1 do
    local f=getForm(i)
    if f.ClassName=='TfrmAutoInject' then
      if f.ScriptMode=='smLua' then
        LuaScriptForm=f
      end
    end
  end
end

if LuaScriptForm then
  LuaScriptForm.assemblescreen.HighLighter.StringAttri.Foreground='0x00ff00'
end


and then just change any attribute you like

_________________
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
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