XTensionX 0 Posted May 28, 2011 hey, im trying to make this work with all windows type DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hwnd, "int", -8) I tried working around with it but no hope Here is what i got so far $hnd = WinGetHandle("Example") $check = "GetWindowLong" If @AutoItX64 Then $check = "GetWindowLongPtr" DllCall("user32.dll", "long", $check, "hwnd", $hwnd, "int", -8) There seems to be something wrong with my script but I cant seem to find what it is Hope someone could help me with this Share this post Link to post Share on other sites
UEZ 1,273 Posted May 28, 2011 $hnd <> $hwnd Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Share this post Link to post Share on other sites
Zedna 279 Posted May 28, 2011 From standard WinAPI UDF Func _WinAPI_GetWindowLong($hWnd, $iIndex) Local $sFuncName = "GetWindowLongW" If @AutoItX64 Then $sFuncName = "GetWindowLongPtrW" Local $aResult = DllCall("user32.dll", "long_ptr", $sFuncName, "hwnd", $hWnd, "int", $iIndex) If @error Then Return SetError(@error, @extended, 0) Return $aResult[0] EndFunc ;==>_WinAPI_GetWindowLong Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites
XTensionX 0 Posted May 29, 2011 Thanks for reply guys $hnd <> $hwnd Br, UEZ Sorry was my bad :/, i rewritten the code and left a letter :S From standard WinAPI UDF Func _WinAPI_GetWindowLong($hWnd, $iIndex) Local $sFuncName = "GetWindowLongW" If @AutoItX64 Then $sFuncName = "GetWindowLongPtrW" Local $aResult = DllCall("user32.dll", "long_ptr", $sFuncName, "hwnd", $hWnd, "int", $iIndex) If @error Then Return SetError(@error, @extended, 0) Return $aResult[0] EndFunc ;==>_WinAPI_GetWindowLong Thanks got what i wanted Share this post Link to post Share on other sites