Jump to content

Recommended Posts

Posted

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
Posted

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...
Posted

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

FootbaG
Posted

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)
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!

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
×
×
  • Create New...