Jump to content

Child Window Checksum


LarryDalooza
 Share

Recommended Posts

I needed a way, besides "static text" to identify a window. I created a "checksum" function that creates a checksum from WinGetClassList. I would be glad to have someone improve on it.

Func ChildhWndChksum($hWnd)
    Local $n,$l
    Local $buffer = StringSplit(StringTrimRight(WinGetClassList($hWnd),1),@LF)
    Local $ckSum = $buffer[0]
    For $n = 1 to $buffer[0]
        $ckSum += StringLen($buffer[$n])
        $ckSum += Asc(StringLeft($buffer[$n],1))
        $ckSum += Asc(StringRight($buffer[$n],1))
    Next
    Return $ckSum
EndFunc

After I record the title and checksum of a window... to later find the window I use WinList() on the title and cycle through checking the checksums for match.

anyway... hope that made sense.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

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