poisonkiller Posted October 31, 2005 Share Posted October 31, 2005 okay... here is example, what i want to do: #include <GUIConstants.au3> #include <GUIEdit.au3> GUICreate("_GUICtrlEditSearchString", 300, 300) $MyEdit = GUICtrlCreateEdit("", 10, 10, 290, 260) $MyBut = GUICtrlCreateButton("Select", 160, 270, 50, 20) GUISetState() Do $msg = GUIGetMsg() Select Case $msg = $MyBut _SelectText($MyEdit) EndSelect Until $msg = $GUI_EVENT_CLOSE Func _SelectText($edit) _GUICtrlEditSetSel($edit, 0, 6) EndFunc But it will not select text from 0 to 6.What i should to do? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 31, 2005 Developers Share Posted October 31, 2005 Looks like the Control need the focus for this UDF to work. This is someting gafrost needs to look at but here is a workaround: Func _SelectText($edit) GUICtrlSetState($edit,$GUI_FOCUS) _GUICtrlEditSetSel ($edit, 0, 6) EndFunc ;==>_SelectText SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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