Jump to content

Recommended Posts

Posted (edited)

Hi,

I have a problem with my EditBox, while my script is running I send to this box Logs etc.

Also I send it to a text file.

But durnig the process the EditBox stop updated but the text file still continue to be updated

This is the editbox configuration:

$edTestsLogs = GUICtrlCreateEdit("", 339, 70, 400, 500, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY,$WS_BORDER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$WS_VSCROLL,$WS_HSCROLL))

How can I change the EditBox to be unlimitted for input text?

Thanks

Edited by atzoref
Posted (edited)

There was a about a limit of 30000 characters yesterday. Maybe you got hit by this?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted (edited)

Water on the Redirected Post i didn't Find the Answer

This May Help

Code:

#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiEdit.au3>
#include <GuiConstantsEx.au3>
Opt('MustDeclareVars', 1)
$Debug_Ed = False ; Check ClassName being passed to Edit functions, set to True and use a handle to another control to see it work
_Main()
Func _Main()
    Local $hEdit
    ; Create GUI
    GUICreate("Edit Set Limit Text", 400, 300)
    $hEdit = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 2, 2, 394, 268)
    GUISetState()
    MsgBox(4160, "Information", "Text Limit: " & _GUICtrlEdit_GetLimitText($hEdit))
    MsgBox(4160, "Information", "Setting Text Limit")
    _GUICtrlEdit_SetLimitText($hEdit, 64000)
    MsgBox(4160, "Information", "Text Limit: " & _GUICtrlEdit_GetLimitText($hEdit))
    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main

And Atzoref i dont Think Unlimited would be Possible

Try a While Loop with

_GUICtrlEdit_SetLimitText($hEdit, $x)
and keep $x increasing also Check for Errors

U will Get the Possible Maximum Limit

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Posted (edited)

Hey Positive Results..............

I got that 2147483647 is the Maximum Value that a Edit Control Can Hold

Using This Code

#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiEdit.au3>
#include <GuiConstantsEx.au3>
Opt('MustDeclareVars', 1)
$Debug_Ed = False ; Check ClassName being passed to Edit functions, set to True and use a handle to another control to see it work
_Main()
Func _Main()
    Local $hEdit
    ; Create GUI
    GUICreate("Edit Set Limit Text", 400, 300)
    $hEdit = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 2, 2, 394, 268)
    GUISetState()
    MsgBox(4160, "Information", "Text Limit: " & _GUICtrlEdit_GetLimitText($hEdit))
    MsgBox(4160, "Information", "Setting Text Limit")
Local $x=2147483630,$sdata
While 1
  _GUICtrlEdit_SetLimitText($hEdit,$x)
  $sdata=_GUICtrlEdit_GetLimitText($hEdit)
  ConsoleWrite("Information"&@TAB&"Text Limit: " &$sdata &@CRLF)
  If $sdata<=0 Then ExitLoop
  $x+=1
WEnd
    GUIDelete()
EndFunc   ;==>_Main

Thumbs Up if it Helped

Regards

Phoenix XL

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Posted

Your Main Question =

Why my EditBox is limitted?

Maybe Coz of Buffer OverFlow or Memory Leakage

Not Having Much Knowledge

But But But U can Use WM_COMMAND Check for EN_CHANGE message

if u get the message then get the number of chracters if it over 2*10^7 also Then U can Save The Data Into a File

and Make the Edit as Blank or Else U can Disable the Specific Edit Control and Create New One ;)

Regards

Phoenix XL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Posted (edited)

Czardas informed me for the GUICtrlSetLimit and PhoenixXL for the maximum limit.

GUICtrlSetLimit(-1, 2000000)  ; sets the limit to 2000000 characters or you can put the maximum 2147483647 as user PhoenixXL sugests

and check the online help also GUICtrlSetLimit

You can also use _GUICtrlEdit_GetTextLen and _GUICtrlEdit_GetLineCount in your script to count the characters and your lines of the Editbox

Edited by armoros

[font="verdana, geneva, sans-serif"] [/font]

Posted

So as I understanding,

There is a limit number of chracters of 2*10^7.

So the best solution is when I get to this number to cleanup the EditBox?

(I always also write everything to a text file)

Posted

It depends on what you want to use the EditBox for.

If it is just to display the last few entries to the user then I would clean the EditBox after 100 to 200 entries.

Because 2GB of data is a lot to scroll.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

I use it for write logs, and it can hold a lot of data...

I don't know if you like the idea but look

Where they advice a user with similar problem to use _IECreateEmbedded() instead of an Edit control.

for unlimited characters

[font="verdana, geneva, sans-serif"] [/font]

Posted (edited)

So as I understanding,

There is a limit number of chracters of 2*10^7.

Or more precisely, 2^31 - 1

Edited by JohnQSmith

Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...