Lakes Posted March 23, 2006 Share Posted March 23, 2006 I am sending single text lines to the edit box, so the length of the string should not be an issue, as its always reset when the next line is read, however after a certain number of lines have been sent to the text box, it stops updating. Is this limit set by STRBUFFER or WINTEXTBUFFER and is there any way to increase it? Using GUICntrlSetData to send the string clears the edit box, which is not what I want. I know the text string itself is fine as I can send this to a Label and this continues to update after the Edit Box stops. I could setup a rolling "window" of text to send to the edit box as a work around, but I would prefer to have a way of increasing the Edit Box buffer size... I have downloaded the latest beta. Thanks! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 23, 2006 Share Posted March 23, 2006 I am sending single text lines to the edit box, so the length of the string should not be an issue, as its always reset when the next line is read, however after a certain number of lines have been sent to the text box, it stops updating.Is this limit set by STRBUFFER or WINTEXTBUFFER and is there any way to increase it?Using GUICntrlSetData to send the string clears the edit box, which is not what I want.I know the text string itself is fine as I can send this to a Label and this continues to update after the Edit Box stops.I could setup a rolling "window" of text to send to the edit box as a work around, but I would prefer to have a way of increasing the Edit Box buffer size...I have downloaded the latest beta.Thanks!Could post some code? Just a short, specific example of what doesn't work for you. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Lakes Posted March 23, 2006 Author Share Posted March 23, 2006 (edited) Could post some code? Just a short, specific example of what doesn't work for you. Example Code: #include <GUIConstants.au3> ; == GUI generated with Koda ==); $TestEditBox = GUICreate("Test Edit Box", 405, 507, 190, 153) $Testedit = GUICtrlCreateEdit("", 8, 8, 386, 457, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_GROUP,$WS_HSCROLL,$WS_VSCROLL)) $CurrLine = GUICtrlCreateLabel("Current Line", 8, 480, 377, 17, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) $Count = 0 $String = "The Quick Brown Fox Jumped Over the Lazy Moon" GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() Exit EndSelect For $i = 1 to 1000 ControlSend($TestEditBox, "", $TestEdit, $Count &" " &$String &"{ENTER}") GUICtrlSetData ($CurrLine, $Count) $Count = $Count +1 Next WEnd Edit Box line count stops at 590 while the Title count keeps updating (just to show that the script is still running). Btw, why does this script use 80% processor time? Edited March 23, 2006 by Lakes 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
GaryFrost Posted March 23, 2006 Share Posted March 23, 2006 For $i = 1 to 1000 ControlSend($TestEditBox, "", $TestEdit, $Count &" " &$String &"{ENTER}") GUICtrlSetData ($CurrLine, $Count) $Count = $Count +1 Next Btw, why does this script use 80% processor time? that runs everytime thru the mainloop SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Lakes Posted March 23, 2006 Author Share Posted March 23, 2006 that runs everytime thru the mainloop That was an OOPS due to deleting other parts of the code to make this example... Here`s the edit.. #include <GUIConstants.au3> ; == GUI generated with Koda ==); $TestEditBox = GUICreate("Test Edit Box", 405, 507, 190, 153) $Testedit = GUICtrlCreateEdit("", 8, 8, 386, 457, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_GROUP,$WS_HSCROLL,$WS_VSCROLL)) $CurrLine = GUICtrlCreateLabel("Current Line", 8, 480, 377, 17, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) $Count = 0 $String = "The Quick Brown Fox Jumped Over the Lazy Moon" GUISetState(@SW_SHOW) For $i = 1 to 1000 ControlFocus ( $TestEditBox, "", $TestEdit ) ControlSend($TestEditBox, "", $TestEdit, $Count &" " &$String &"{ENTER}") GUICtrlSetData ($CurrLine, $Count) $Count = $Count +1 Next Exit Still uses 80 % processor time while executing the loop, but never mind, its the Edit Box problem I need a solution to.. 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Lakes Posted March 24, 2006 Author Share Posted March 24, 2006 Work around code.... #include <GUIConstants.au3> ; == GUI generated with Koda ==); $TestEditBox = GUICreate("Test Edit Box", 405, 507, 190, 153) $Testedit = GUICtrlCreateEdit("", 8, 8, 386, 457, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_GROUP,$WS_HSCROLL,$WS_VSCROLL)) $CurrLine = GUICtrlCreateLabel("Current Line", 8, 480, 377, 17, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) $Count = 0 $String = "The Quick Brown Fox Jumped Over the Lazy Moon" $NotePad = "Untitled - Notepad" $NPad = "Edit1" Run("notepad.exe") GUISetState(@SW_SHOW) For $i = 1 to 2000 $Line = ControlCommand($TestEditBox, "", $TestEdit,"GetLineCount", "") If $Line = 500 then GUICtrlSetData ( $TestEdit, $i) ControlFocus ( $TestEditBox, "", $TestEdit ) ControlCommand($TestEditBox, "", $TestEdit, "EditPaste", $i &" " &$String) ControlSend($TestEditBox, "", $TestEdit, "{ENTER}") ControlCommand($NotePad, "", $NPad, "EditPaste", $i &" " &$String) ControlSend($NotePad, "", $NPad, "{ENTER}") GUICtrlSetData ($CurrLine, $i) Next Exit You could use filewrite instead of running notepad. In this example I have reset the EditBox at line 500, to be more accurate on detecting the EditBox limit, do a character count using StringLen and then reset the EditBox. 2015 - Still no flying cars, instead blankets with sleeves. 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