mexico Posted January 3, 2019 Posted January 3, 2019 Especially I have the problema with the function _GUICtrlEditGetSel() and _GUICtrlEditReplaceSel, the functions doesn't works. I download this sample. #include <GUIConstants.au3> #include <GuiEdit.au3> Func Copy($contenuto) $a_sel = _GUICtrlEditGetSel($contenuto) Local $WholeEdit = GUICtrlRead($contenuto) Local $Trim = StringLeft(StringTrimLeft($WholeEdit, $a_sel[1]), $a_sel[2] - $a_sel[1]) Return $Trim EndFunc $Form1 = GUICreate("Editor", 445, 326, 259, 177) $contenuto = GUICtrlCreateEdit("", 72, 32, 297, 185) GUICtrlSetData(-1, "Select text and press BOLD") $bold = GUICtrlCreateButton("bold", 80, 232, 65, 25, 0) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $bold $Cur_Sel = Copy($contenuto) $Mod_Sel = "<b>" & $Cur_Sel & "</b>" _GUICtrlEditReplaceSel($contenuto, TRUE, $Mod_Sel) EndSwitch WEnd When I run the code, I get an error, How can I solve the next error?: "C:\AutoIt\sample\code1.au3"(5,43) : error: _GUICtrlEditGetSel(): undefined function. I was trying reinstall Autoit, Sctie but always is the same error. My OS is Windows 10 64 bits. Thanks
Developers Jos Posted January 3, 2019 Developers Posted January 3, 2019 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team 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.
Developers Jos Posted January 3, 2019 Developers Posted January 3, 2019 Do you mean these UDF's?: #include <GuiEdit.au3> _GUICtrlEdit_GetSel _GUICtrlEdit_ReplaceSel Jos 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.
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