Each new row causes problems with the count of characters.
Wrote an example to show the count problem .:
Code: Select all
#SingleInstance force MaxChar = 10 NoChr = 0 ; Charactercount Gui Font, cPurple s12 Normal, Arial Gui Add, text, x50 y30 h30 w150 left vCount, % "( " MaxChar " / " MaxChar " )" Gui Font, cBlue s22 Normal, Arial Gui Add, Edit, x20 y60 r7 w420 Limit%MaxChar% vTestTxt gGetCount Gui Show Return GetCount: Gui Submit, NoHide GuiControlGet myString,, TestTxt NoChr := MaxChar - StrLen(myString) GuiControl,, Count, % "( " NoChr " / " MaxChar " )" Return
But, If I enter in the edit field the following characters .:
The limit stops right now (But the counter shows 2/10)
(I think the problem is `n`r or CR LF and StrLen() can't count as I want)
- How to remove one character? or
- How to count the characters in the GUI Edit field right?
How to count th