XTensionX Posted May 28, 2011 Share 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 Link to comment Share on other sites More sharing options...
UEZ Posted May 28, 2011 Share 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Zedna Posted May 28, 2011 Share 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 Link to comment Share on other sites More sharing options...
XTensionX Posted May 29, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now