Sign in to follow this  
Followers 0
layer

Coverting WindowHandle to Title?

5 posts in this topic

I was just wondering if there is a way to find out the title of a "Window Handle"... Like when I do:

$hWnd = WinGetHandle("Windows Media Player")
MsgBox(4096, "DEBUG", $hWnd)

Any way to convert the handle to a title? :D

Thanks!! :)


FootbaG

Share this post


Link to post
Share on other sites



I was just wondering if there is a way to find out the title of a "Window Handle"... Like when I do:

$hWnd = WinGetHandle("Windows Media Player")
MsgBox(4096, "DEBUG", $hWnd)

Any way to convert the handle to a title?  :D

Thanks!!  :)

<{POST_SNAPBACK}>

I wonder if the helpfile has a WinGetTitle function, hmm...

Share this post


Link to post
Share on other sites

No joke Valik, I swear I tried that yesterday, and it didn't work, maybe I typed it incorrectly... Thanks anyways...


FootbaG

Share this post


Link to post
Share on other sites

Have you tried the Function WinList()?

It return the title and hWnd back to an array.

Hope this help... :)


[font="Arial"]Thanks[/font]
If @error = me Then $sorry
Else
   Do
      $clarifyMe
   Until $meClear
EndIF
MsgBox(0,"Special Message!","Special Thanks to " & $allHadReplied,$Forever)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Try this....

Opt("WinTitleMatchMode", 2);match partial title
Run("notepad")
WinWait("Notepad")

$hwnd = WinGetHandle("Notepad")
$title = WinGetTitle($hwnd)

If $hwnd < 0 Then
    MsgBox(4096,"Error","Invalid window handle.... WinGetHandle must have failed")
Else
    MsgBox(4096,"Title is", $title)
EndIf
Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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