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 


Animated Form or Childs

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Tue Mar 10, 2020 11:18 am    Post subject: Animated Form or Childs Reply with quote

I try to use window user32.AnimateWindow and just work fine.

Example code:

Code:
AnimateWindowFlags =
{
    AW_HOR_POSITIVE = 0x00000001,
    AW_HOR_NEGATIVE = 0x00000002,
    AW_VER_POSITIVE = 0x00000004,
    AW_VER_NEGATIVE = 0x00000008,
    AW_CENTER = 0x00000010,
    AW_HIDE = 0x00010000,
    AW_ACTIVATE = 0x00020000,
    AW_SLIDE = 0x00040000,
    AW_BLEND =0x00080000
}

function animatedObject(hwnd, time, AnimateWindowFlags)
  return executeCodeLocalEx('user32.AnimateWindow', hwnd, time, AnimateWindowFlags)
end

f1 = createForm()

b1 = createButton(f1)
b1.setPosition(10,10)
b1.Caption = 'b1'

b2 = createButton(f1)
b2.setPosition(100,10)
b2.Caption = 'b2'

pnl = createPanel(f1)
pnl.Top = 50
pnl.Width = f1.Width
pnl.Height = f1.Height-50
pnl.Color = 4578200
pnl.Caption = 'This is CE Panel'

b1.OnClick = function()
animatedObject(pnl.handle, 1000, 0x00040000 | 0x00000010 | 0x00010000)
end

b2.OnClick = function()
animatedObject(pnl.handle, 1000, 0x00000002 | 0x00040000 | 0x00010000)
end


The code above is work, but if I use keys from AnimateWindowFlags table, example:

Code:
animatedObject(pnl.handle, 1000, AnimateWindowFlags[AW_SLIDE] | AnimateWindowFlags[AW_CENTER] |AnimateWindowFlags[AW_HIDE])


I got error : attempt to perform bitwise operation on a nil value (field '?')'.
Where is the mistakes?. Is it because of Lua doesn't have enumerates type or something else?.

EDIT:
Nvm, solve it. It because wrong syntaxes:

Code:
animatedObject(pnl.handle, 1000, AnimateWindowFlags.AW_SLIDE | AnimateWindowFlags.AW_CENTER | AnimateWindowFlags.AW_HIDE)

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
GREATBULLET
How do I cheat?
Reputation: 0

Joined: 02 Apr 2020
Posts: 4

PostPosted: Sun Apr 19, 2020 11:13 am    Post subject: Reply with quote

Evil or Very Mad Evil or Very Mad Evil or Very Mad Evil or Very Mad Evil or Very Mad Evil or Very Mad Evil or Very Mad Evil or Very Mad i am very mad i was trying it and i lost my trainer that i was working on because ce stopped responding i hate youuuu RIP 8 hours of work Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun Apr 19, 2020 2:40 pm    Post subject: Reply with quote

Who is made a mistake?. The original topic was aks for a solution and I have solved it by myself. That doesn't mean for everybody to try, so, guess who is need to blame. Ah...I see the answer! Surprised
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
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