Jump to content

eliboy

Members
  • Posts

    4
  • Joined

  • Last visited

About eliboy

  • Birthday 08/05/1979

Profile Information

  • Location
    Utah
  • WWW
    http://www.ebpsolutions.com

eliboy's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I really like this function, but when I used it the first control wasn't showing up in the array. I found that it was being overwritten at the end of the function when $aReturn[0][0] is being set to the number of controls. To fix this $iAdd should be initialized to 1, so you get the number of controls plus 1 (for the first element of the array which is the count). Therefore, if you have 17 controls then your array is 18 long, the first element (0) is the count, and each control is an element that follows. I have posted the updated function below. Func _WinGetCtrlInfo($hWin) If IsString($hWin) Then $hWin = WinGetHandle($hWin) $iAdd = 1 Local $sClassList = WinGetClassList($hWin), $iAdd, $aDLL, $sHold Local $aSplitClass = StringSplit(StringTrimRight($sClassList, 1), @LF), $aReturn[1][2] For $iCount = $aSplitClass[0] To 1 Step - 1 Local $nCount = 0 While 1 $nCount += 1 If ControlGetHandle($hWin, '', $aSplitClass[$iCount] & $nCount) = '' Then ExitLoop If Not StringInStr(Chr(1) & $sHold, Chr(1) & $aSplitClass[$iCount] & $nCount & Chr(1)) Then $sHold &= $aSplitClass[$iCount] & $nCount & Chr(1) $iAdd += 1 ReDim $aReturn[$iAdd][2] $aReturn[$iAdd - 1][0] = $aSplitClass[$iCount] & $nCount $aDLL = DllCall('User32.dll', 'int', 'GetDlgCtrlID', 'hwnd', _ ControlGetHandle($hWin, '', $aSplitClass[$iCount] & $nCount)) If @error = 0 Then $aReturn[$iAdd - 1][1] = $aDLL[0] Else $aReturn[$iAdd - 1][1] = '' EndIf EndIf WEnd Next $aReturn[0][0] = $iAdd - 1 Return $aReturn EndFunc
  2. Is there a mailing list for Auto3Lib updates that I can sign up for?
  3. Thanks, I downloaded the latest AutoIt and it's working perfectly. Stellar library, Paul, thanks!
  4. I'm getting the same error message (of course in English) when using A3LScreenCap.au3: _API_GetCursorInfo: Invalid access to memory location. Platform is Windows XP. Any suggestions?
×
×
  • Create New...