Sign in to follow this  
Followers 0
McGod

Ways of getting a Windowname

6 posts in this topic

Because the program I'm dealing with has it's name change alot. Could I use the PID from the Run command to get the window name?

IE:

$pid=Run ( "notepad.exe" )

Getwindowname ( $pid )

Func Getwindowname ( $pid )

;;

;;

;;

EndFunc

What would go in the ;;

Share this post


Link to post
Share on other sites



Yea it does, could i just use that?

Share this post


Link to post
Share on other sites

Check out my http://www.autoitscript.com/fileman/users/Helge/udfs.htm#processgethwnd, which does exactly what you want ! :D

Share this post


Link to post
Share on other sites

I used

AutoItSetOption("WinTitleMatchMode", 4)

$windowname = WinGetTitle("ClassName=Diablo II","")

And I now have the hwnd, pid, process name and window title.

TY you can close

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0