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
++METHOS
I post too much
Reputation: 92
Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Feb 04, 2022 12:41 pm    Post subject:

Thank you very much.

Sorry that it took so long to reply, but I could not get the OnMouseDown to work as intended, no matter what I tried.

This works, though:

Code:
--handy helper function
function forEachAndFutureForm(classname, func)
  local i
  for i=0,getFormCount()-1 do
    local f
    f=getForm(i)
    if f.ClassName==classname then
      func(f)
    end
  end

  registerFormAddNotification(function(f)
    if classname==f.ClassName then
      f.registerFirstShowCallback(function()
        func(f)
      end)
    end
  end)
end


forEachAndFutureForm('TfrmAutoInject',function(f)
  b=createButton(f)
  b.Caption='Add to Table'
  b.OnClick=f.Assigntocurrentcheattable1.OnClick
  b.OnMouseUp=f.Close
  b.parent=f.Panel3
  b.SetHeight(30)
  b.SetWidth(130)
  b.AutoSize=false
  b.AnchorSideLeft.Control=f.btnExecute
  b.AnchorSideLeft.Side=asrRight

  b.AnchorSideTop.Control=f.btnExecute
  b.AnchorSideTop.Side=asrTop

  end)


Thanks, again.
Back to top
View user's profile Send private message
Post reviews:   Approve 1
Author Review
LeFiXER
Review: Approve
Post reference:
ReviewPosted: Fri Feb 04, 2022 12:45 pm

Glad you got it working.
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