Tankbuster Posted December 1, 2013 Share Posted December 1, 2013 (edited) Melba, I'm sorry for your suicidal tendencies.... I added your mod to my code: expandcollapse popup#include <GuiComboBox.au3> #include <GUIConstantsEx.au3> Global $iMemo for $I = 1 to 1 Example() Next Func Example() Local $hCombo ; Create GUI GUICreate("ComboBox Get Edit Text", 400, 296) $hCombo = GUICtrlCreateCombo("", 2, 2, 396, 296) $iMemo = GUICtrlCreateEdit("", 2, 32, 396, 266, 0) GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New") GUISetState() ; Set Edit Text for $j = 1 to 10 $cData="" for $k = 1 to $j $cData=$cData&"x" next _GUICtrlComboBox_SetEditText($hCombo, $cData) MemoWrite("Edit Text: " & _GUICtrlComboBox_GetEditText_Mod($hCombo)) ConsoleWrite("======================================="&@LF) ConsoleWrite("Edit Text UDF: " & _GUICtrlComboBox_GetEditText_Mod($hCombo)&@LF) ConsoleWrite("Edit Text def: " & GUICtrlRead($hCombo)&@LF) ConsoleWrite("Length UDF: " &stringlen(_GUICtrlComboBox_GetEditText_Mod($hCombo))&@LF) ConsoleWrite("Length def: " &stringlen(GUICtrlRead($hCombo))&@LF) ConsoleWrite("Last Char is: " &StringRight(_GUICtrlComboBox_GetEditText_Mod($hCombo),1)&@LF) ConsoleWrite("Last Char is: " &AscW (StringRight(_GUICtrlComboBox_GetEditText_Mod($hCombo),1))&@LF) ;~ AscW ( "char" ) Next ; Get Edit Text ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example ; Write a line to the memo control Func MemoWrite($sMessage) GUICtrlSetData($iMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite Func _GUICtrlComboBox_GetEditText_Mod($hWnd) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) Local $tInfo If _GUICtrlComboBox_GetComboBoxInfo($hWnd, $tInfo) Then Local $hEdit = DllStructGetData($tInfo, "hEdit") Local $iLine = 0 Local $iIndex = _SendMessage($hEdit, $__COMBOBOXCONSTANT_EM_LINEINDEX, $iLine) Local $iLength = _SendMessage($hEdit, $__COMBOBOXCONSTANT_EM_LINELENGTH, $iIndex) If $iLength = 0 Then Return "" Local $tBuffer = DllStructCreate("short Len;wchar Text[" & $iLength & "]") ; <<<<<<<<<<<<<<<<<<<<<<<<<<<< removed + 2 DllStructSetData($tBuffer, "Len", $iLength) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<< removed + 2 Local $iRet = _SendMessage($hEdit, $__COMBOBOXCONSTANT_EM_GETLINE, $iLine, $tBuffer, 0, "wparam", "struct*") If $iRet = 0 Then Return SetError(-1, -1, "") Local $tText = DllStructCreate("wchar Text[" & $iLength & "]", DllStructGetPtr($tBuffer)) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<< removed + 1 Return DllStructGetData($tText, "Text") Else Return SetError(-1, -1, "") EndIf EndFunc ;==>_GUICtrlComboBox_GetEditText_Mod I hope that was the intention. The result is: expandcollapse popup>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "E:\1work\dummy2.au3" /UserParams +>00:13:56 Starting AutoIt3Wrapper v.2.1.2.9 Environment(Language:0407 Keyboard:00000407 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) -> Skipping AU3check: Current version doesn't support the AutoIt3 v 3.3.9.5+ syntax. >Running:(3.3.9.21):C:\Program Files (x86)\AutoIt3\autoit3.exe "E:\1work\dummy2.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop ======================================= Edit Text UDF: x Edit Text def: x Length UDF: 1 Length def: 1 Last Char is: x Last Char is: 120 ======================================= Edit Text UDF: xx Edit Text def: xx Length UDF: 2 Length def: 2 Last Char is: x Last Char is: 120 ======================================= Edit Text UDF: xxx Edit Text def: xxx Length UDF: 3 Length def: 3 Last Char is: x Last Char is: 120 ======================================= Edit Text UDF: xxxx Edit Text def: xxxx Length UDF: 4 Length def: 4 Last Char is: x Last Char is: 120 ======================================= Edit Text UDF: xxxxx Edit Text def: xxxxx Length UDF: 5 Length def: 5 Last Char is: x Last Char is: 120 ======================================= Edit Text UDF: xxxxxx Edit Text def: xxxxxx Length UDF: 6 Length def: 6 Last Char is: x Last Char is: 120 ======================================= Edit Text UDF: xxxxxxx Edit Text def: xxxxxxx Length UDF: 7 Length def: 7 Last Char is: x Last Char is: 120 ======================================= Edit Text UDF: xxxxxxxx Edit Text def: xxxxxxxx Length UDF: 8 Length def: 8 Last Char is: x Last Char is: 120 ======================================= Edit Text UDF: xxxxxxxxx Edit Text def: xxxxxxxxx Length UDF: 9 Length def: 9 Last Char is: x Last Char is: 120 ======================================= Edit Text UDF: xxxxxxxxxx Edit Text def: xxxxxxxxxx Length UDF: 10 Length def: 10 Last Char is: x Last Char is: 120 The screenshot of the mod function. So it works and now a bug should be created, right? (was not sure about your last sentence) Edited December 1, 2013 by Tankbuster Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 2, 2013 Moderators Share Posted December 2, 2013 (edited) Tankbuster, I will raise the ticket today - and bring it to the attention of the Dev team. M23 Edit: #2550 Edited December 2, 2013 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Tankbuster Posted December 2, 2013 Share Posted December 2, 2013 Is it important? I used >Running:(3.3.9.21) not the official one (but even with the official release this happens) I will post the 3.3.8.1 if you think it is important for DEV. (I used the beta because of the _RecFileListtoArray from you in CFF....) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 2, 2013 Moderators Share Posted December 2, 2013 Tankbuster,The UDF function is exactly the same in the release and Beta versions, so it makes no difference which one you use. The discussion as to whether the code will be changed is ongoing - look in the next Beta to see the result. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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