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 


Get window height and width function
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1549

PostPosted: Fri Jan 10, 2020 6:20 am    Post subject: Reply with quote

Maybe you tried that. But there may be different options.
1) Make sure the application is on the Desktop.
2) Try testing without wildcard.


Code:
a = 'Need for Speed™ Rivals'
b = 'Need for Speed Rivals'
a = b
--print(nil,b)

x=findWindow(nil,b)



Screenshot_9.jpg
 Description:
 Filesize:  23.98 KB
 Viewed:  1345 Time(s)

Screenshot_9.jpg



_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Antoshick
Advanced Cheater
Reputation: 0

Joined: 02 Nov 2018
Posts: 56

PostPosted: Fri Jan 10, 2020 7:02 am    Post subject: Reply with quote

Aylin wrote:
Maybe you tried that. But there may be different options.
1) Make sure the application is on the Desktop.
2) Try testing without wildcard.


Code:
a = 'Need for Speed™ Rivals'
b = 'Need for Speed Rivals'
a = b
--print(nil,b)

x=findWindow(nil,b)


Not work.
With using caption as i understand this Need for Speed game not want work with CE. But as we have another way to get it handle, it's not very important.
Back to top
View user's profile Send private message
Antoshick
Advanced Cheater
Reputation: 0

Joined: 02 Nov 2018
Posts: 56

PostPosted: Tue Jan 14, 2020 7:31 am    Post subject: Reply with quote

I trying to get height and width of window by using assembler and winapi GetWindowRect, but it not work.

Where i can read about in what registers i must put handle and pointer to save values.

For getting mouse x,y i found that in RCX
Code:
mov rcx,point
call GetCursorPos


I just want to inject AA script to place in memory where beging default calling winapi GetCursorPos
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
Goto page Previous  1, 2
Page 2 of 2

 
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