Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/07/2013 in all areas

  1. This one is a special one for you UEZ. I could not replicate the error...Everything works perfect. L&H animated.au3
    1 point
  2. Yes, but as jchd also said, if you don't open it first, autoit will have to look through a list of already loaded dll files to see if it is open and retrieve a handle to it each time you call it.
    1 point
  3. user32.dll is one of the system DLLs which are always loaded for AFAIK every process, at least those doing significant work. Here the only difference will be to parse the DLL path, look it up in the list of loaded DLLs and retrieving the handle it has (gory details skipped). That means almost nothing.
    1 point
  4. busyman, Both you and ksr000 seem very keen on adnanbaloch's posts. Would you care to explain why you both use the same IP? M23
    1 point
  5. Right. Au3Info shows something different. Maybe it's something I'm not aware of . Nah!. That's the WindowClass, the control class is Chrome_RenderWidgetHostHWND Maybe there is some difference what _WindowFromPoint and what _ChildWindowFromPointEx returns Check this out #include <WinAPI.au3> #include <Misc.au3> ;Works for Minimized Hidden and disabled Windows $hWinMain = WinGetHandle("[CLASS:Chrome_WidgetWin_1]") $tPoint = DllStructCreate($tagPoint) DllStructSetData($tPoint, 1, 5) DllStructSetData($tPoint, 2, 71) ;Proceed further when LMouse is pressed While _IsPressed("01") = 0 Sleep(10) ;Use this to activate the Google Chrome WEnd $hLabel = _WinAPI_WindowFromPoint($tPoint) ;_ChildWindowFromPointEx($hWinMain, 5, 71) MsgBox(64, "Result:", StringFormat("hWnd: %s\nClass: %s", $hLabel, _WinAPI_GetClassName($hLabel))) Func _ChildWindowFromPointEx($hWnd, $iX, $iY, $iFlags = 0) Local $Ret = DllCall('user32.dll', 'hwnd', 'ChildWindowFromPointEx', 'hwnd', $hWnd, 'int', $iX, 'int', $iY, 'uint', $iFlags) If @error Then Return SetError(1, 0, 0) EndIf Return $Ret[0] EndFunc ;==>_ChildWindowFromPointEx _WindowFromPoint returns what is shown in Au3Info but thats different from what _ChildWindowFromPointEx returns. Strange. Edit: This Link should help http://blogs.msdn.com/b/oldnewthing/archive/2010/12/30/10110077.aspx Finally found the Solution #include <WinAPI.au3> #include <Constants.au3> ;Works for Minimized Hidden and disabled Windows $hWinMain = WinGetHandle("[CLASS:Chrome_WidgetWin_1]") $hLabel = _WindowFromPointEx($hWinMain, 5, 71) ;Its Slow but works :) MsgBox(64, "Result:", StringFormat("hWnd: %s\nClass: %s", $hLabel, _WinAPI_GetClassName($hLabel))) Func _WindowFromPointEx($hWnd, $iX, $iY) Local $Ret = DllCall('user32.dll', 'hwnd', 'ChildWindowFromPoint', 'hwnd', $hWnd, 'int', $iX, 'int', $iY) If @error Then Return SetError(1, 0, 0) EndIf Return _WinAPI_GetWindow($Ret[0], $GW_CHILD) EndFunc ;==>_ChildWindowFromPointEx
    1 point
×
×
  • Create New...