Difference between revisions of "Lua:findWindow"

From Cheat Engine
Jump to navigation Jump to search
(Created page with "<p><b>findWindow(classname OPTIONAL, caption OPTIONAL)</b>: windowhandle - Finds a window with the given classname and/or windowname</p> <p>https://docs.microsoft.com/en-us/wi...")
 
(Add extra example)
 
Line 3: Line 3:
 
<pre>
 
<pre>
 
print( findWindow("WTWindow", "Game") )
 
print( findWindow("WTWindow", "Game") )
 +
</pre>
 +
<p>
 +
Because classname is optional, this will also work:
 +
</p>
 +
<pre>
 +
print(findWindow(null, "Cheat Engine 7.4"))
 +
 
</pre>
 
</pre>

Latest revision as of 08:10, 9 July 2023

findWindow(classname OPTIONAL, caption OPTIONAL): windowhandle - Finds a window with the given classname and/or windowname

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-findwindowa

print( findWindow("WTWindow", "Game") )

Because classname is optional, this will also work:

 print(findWindow(null, "Cheat Engine 7.4"))