SlimShady Posted February 3, 2005 Posted February 3, 2005 I can't make the edit box editable. See the following script. $AutoItHandle = 0 Do $AutoItHandle = AutoItHandle() Until $AutoItHandle <> 0 WinSetState($AutoItHandle, "", @SW_SHOW) WinActivate($AutoItHandle, "") WinSetState($AutoItHandle, "", @SW_DISABLE) WinSetState($AutoItHandle, "", @SW_ENABLE) ControlHide($AutoItHandle, "", "Edit1") ControlShow($AutoItHandle, "", "Edit1") ControlDisable($AutoItHandle, "", "Edit1") ControlEnable($AutoItHandle, "", "Edit1") While 1 Sleep(1000) WEnd Func AutoItHandle() Local $handle Local $CurAutoItName = AutoItWinGetTitle() Local $val = @ScriptName & (@YDAY + @SEC + 2) AutoItWinSetTitle($val) $handle = WinGetHandle($val) AutoItWinSetTitle($CurAutoItName) Return $handle EndFunc
CyberSlug Posted February 3, 2005 Posted February 3, 2005 The EditBox has the ES_READONLY style according to WinSpy++, but even removing that style does nothing Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
SlimShady Posted February 3, 2005 Author Posted February 3, 2005 (edited) Too bad Edited February 3, 2005 by SlimShady
SlimShady Posted February 14, 2005 Author Posted February 14, 2005 (edited) I found the solution $AutoItHandle = 0 Do $AutoItHandle = AutoItHandle() Until $AutoItHandle <> 0 WinSetState($AutoItHandle, "", @SW_SHOW) WinActivate($AutoItHandle, "") $EM_SETREADONLY = 0x00CF $val = DllCall("user32.dll", "int", "SendMessage", _ "hwnd", ControlGetHandle($AutoItHandle, "", "Edit1"), _ "int", $EM_SETREADONLY, _ "int", 0, _ "int", 0) While 1 Sleep(1000) WEnd Func AutoItHandle() Local $handle Local $CurAutoItName = AutoItWinGetTitle() Local $val = @ScriptName & (@YDAY + @SEC + 2) AutoItWinSetTitle($val) $handle = WinGetHandle($val) AutoItWinSetTitle($CurAutoItName) Return $handle EndFunc Edited February 14, 2005 by SlimShady
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