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 


CE Scripting

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

Joined: 30 Jul 2010
Posts: 65

PostPosted: Sat Oct 20, 2012 9:15 pm    Post subject: CE Scripting Reply with quote

When developing a script in Cheat Engine's auto assembler, is it possible to call a Window API? For an example

[enable]
alloc(FindWindow,123)
...
FindWindow:
push ... (parameter 1 - ClassName)
push ... (parameter 2 - WindowName)
call User32.FindWindowA

[disable]
...
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 473

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

PostPosted: Sun Oct 21, 2012 12:29 am    Post subject: This post has 1 review(s) Reply with quote

Yes, exactly like that, but you must push the variables in the opposite direction , first param2, then param1, then the call
_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Gwinx
Advanced Cheater
Reputation: 0

Joined: 30 Jul 2010
Posts: 65

PostPosted: Sun Oct 21, 2012 4:25 pm    Post subject: Reply with quote

Dark Byte wrote:
Yes, exactly like that, but you must push the variables in the opposite direction , first param2, then param1, then the call


Thanks. But for some reason, when I call user32.FindWindowA it says something like, "user32.FindWindowA this instruction can't be compiled". Is it a bug? :0
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 473

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

PostPosted: Sun Oct 21, 2012 5:22 pm    Post subject: Reply with quote

the following script orks fine for me:
Code:

[enable]
alloc(FindWindow, 4096)
FindWindow:
push 0
push 0
call User32.FindWindowA

[disable]


Just make sure you have targeted a process when editing the script

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Gwinx
Advanced Cheater
Reputation: 0

Joined: 30 Jul 2010
Posts: 65

PostPosted: Wed Oct 24, 2012 5:53 pm    Post subject: Reply with quote

Dark Byte wrote:
the following script orks fine for me:
Code:

[enable]
alloc(FindWindow, 4096)
FindWindow:
push 0
push 0
call User32.FindWindowA

[disable]


Just make sure you have targeted a process when editing the script


You solved my problem, thank you! Smile I love you.
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 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