Jump to content
Sign in to follow this  
McGod

Ways of getting a Windowname

Recommended Posts

McGod

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
McGod

Yea it does, could i just use that?

Share this post


Link to post
Share on other sites
Helge

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
McGod

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.