Jump to content

Recommended Posts

Posted

$sTitle = WinGetTitle($hWin)

AutoIt will take a handle in place of the title string to specify a window.

:)

OH! I had no idea! I never saw anything about that in the help! Thank you!

A decision is a powerful thing
Posted

And I'm the first person to use the hwnd of a window instead of the title...Titles are mutable and can change. The hwnd does not.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Posted

And I'm the first person to use the hwnd of a window instead of the title...Titles are mutable and can change. The hwnd does not.

oh absolutely that's a part of the reason why I'm wanting to use them

A decision is a powerful thing
Posted

You don't have to do that to use handles, but you do if you want to use "[CLASS:]" style attributes.

:)

PsaltyDS, that's what I was understanding too.
A decision is a powerful thing
  • Moderators
Posted

but you do if you want to use "[CLASS:]" style attributes.

:)

Only if you are using the old ways classname=#32770 versus [CLASS:#32770]

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Only if you are using the old ways classname=#32770 versus [CLASS:#32770]

Did not realize that...

I'm done! Go'n home for the day! Learned my new thing for day!

Run("notepad.exe")
$i = 0
Do
    Sleep(20)
    $hWin = WinGetHandle("[CLASS:Notepad; TITLE:Untitled - Notepad]")
    $i += 1
Until IsHWnd($hWin)
MsgBox(64, "Test", "Got handle in " & $i & " tries.")
WinClose($hWin)
$hWin = 0

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
  • Moderators
Posted

Did not realize that...

I'm done! Go'n home for the day! Learned my new thing for day!

Run("notepad.exe")
$i = 0
Do
    Sleep(20)
    $hWin = WinGetHandle("[CLASS:Notepad; TITLE:Untitled - Notepad]")
    $i += 1
Until IsHWnd($hWin)
MsgBox(64, "Test", "Got handle in " & $i & " tries.")
WinClose($hWin)
$hWin = 0

:)

I only found out by someone pointing it out to me the other day... guess I missed the "You don't have to anymore post" as well.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Meh, I guess I'm old hat then.

I still set advanced, just in case...and I get the benefits of option 2 when I need to match titles.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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
  • Recently Browsing   0 members

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