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 


Cheat Engine Forum Index
PostGo back to topic
mgr.inz.Player
I post too much
Reputation: 218
Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri May 11, 2018 3:03 pm    Post subject:

Much easier method is to convert from "LFM file format" to Lua by hand. I made it many times...

Open your form with FormDesigner, then save it as LFM file. You can open LFM file with any text editor.

A form with button will produce something like this:

Code:
object UDF2: TCEForm
  Left = 288
  Height = 240
  Top = 195
  Width = 320
  Caption = 'UDF2'
  ClientHeight = 240
  ClientWidth = 320
  object CEButton1: TCEButton
    Left = 125
    Height = 25
    Top = 91
    Width = 75
    Caption = 'CEButton1'
    TabOrder = 0
  end
end


And I convert it by hand (using text editor with MultiCaret feature can help a lot) to something like this:
Code:
  UDF2 = createForm()
  UDF2.Left = 288
  UDF2.Height = 240
  UDF2.Top = 195
  UDF2.Width = 320
  UDF2.Caption = 'UDF2'
  UDF2.ClientHeight = 240
  UDF2.ClientWidth = 320
 
 
  CEButton1 = createButton(UDF2)
  CEButton1.Left = 125
  CEButton1.Height = 25
  CEButton1.Top = 91
  CEButton1.Width = 75
  CEButton1.Caption = 'CEButton1'
  CEButton1.TabOrder = 0


Of course, there are some limitations. For example, default FORM created with Lua, has few properties set differently than default FORM made with FormDesigner.

So, after "converting from LFM to Lua", I had to always add those lines:
Code:
  UDF2.BorderIcons = '[biSystemMenu,biMinimize,biMaximize]'
  UDF2.BorderStyle = 'bsSizeable'



Because Lua created forms have those, BorderIcons set to [biSystemMenu, biMinimize] and BorderStyle set to bsSingle, set as default.
_________________
Dark Souls II Item Swap and Item List
My Borderlands2 tables

Recent CheatEngine builds
Back to top
View user's profile Send private message MSN Messenger
Post reviews:   Approve 2
Author Review
TheyCallMeTim13
Review: Approve
Post reference:
ReviewPosted: Fri May 11, 2018 3:39 pm


Back to top
View user's profile Send private message Visit poster's website
ByTransient
Review: Approve
Post reference:
ReviewPosted: Fri Apr 30, 2021 10:00 am


Back to top
View user's profile Send private message
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites