Jump to content
Sign in to follow this  
LarryDalooza

Child Window Checksum

Recommended Posts

LarryDalooza

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.