Jump to content

Coverting WindowHandle to Title?


Recommended Posts

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
Link to comment
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...
Link to comment
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)
Link to comment
Share on other sites

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!
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...