mIRC Homepage
Posted By: Sephiroth_ Script Editor - 07/06/08 06:17 PM
Long content of make the scripteditor stop working correctly especially long lines with the new limit.

Code:
set %tempvar $str(a,4000)


After that open the Script Editor and click on vars.

You will get this error:


works correct again after unsetting %tempvar

or aliases:
Code:
//alias test { return $str(a,4000) }

Works correct again after typing /alias test

Same for all other cathegories.

* Edit:

OS WinXP Prof SP3
P4 2.53
1GB RAM

Whate else than mIRC 6.32 if i'm talking about the new stringlimit wink
Posted By: symphony Re: Script Editor - 07/06/08 08:52 PM
I cannot reproduce this. I assume its something to do with windows, maybe?
Posted By: argv0 Re: Script Editor - 08/06/08 12:09 AM
Happens here too, with both .ini and .mrc formats. Vista Ultimate. That rules out windows.
Posted By: Wims Re: Script Editor - 08/06/08 12:39 AM
Confirmed here, window xp
Posted By: Khaled Re: Script Editor - 08/06/08 10:27 AM
This appears to be a Windows editbox limit - it has a maximum single line length limit of 4096 characters. It doesn't look like there is a way to extend this. One way around this would be to use a custom non-standard editbox control, however that's something I'd rather avoid since it would likely introduce other issues. I'm not sure if there's practical solution to this issue.
Posted By: Wims Re: Script Editor - 08/06/08 01:46 PM
I checked to be sure, but if this is a Windows editbox limit and espacially at 4096, why window report an error whereas the lenght of the line here is only 4000 + the lenght of the variable name (< 4096 i think) ? The other thing i noticed is that the editbox display correctly the 4000 char, even if it's on three line.
Posted By: maroon Re: Script Editor - 08/06/08 02:30 PM
[quote=Khaled]This appears to be a Windows editbox limit - it has a maximum single line length limit of 4096 characters./quote]

Under vista-64, i reproduced this error a lot shorter than that. Unless mIRC has a lot of hidden data attached to each line.

//set %tempvar $str(a,3062)

doesn't produce the error, but this does:

//set %tempvar $str(a,3063)
Posted By: genius_at_work Re: Script Editor - 08/06/08 04:41 PM
This is strange. If I set the variable as shown in this thread:

//set %a $str(a,4000)

And then open the editor, I get the message warning me not to save it. The value of the variable is shown like this:

%a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa....
aaaaaaaaaaaaaaaa...

If I DO click OK to save the value, and then use an identifier to check the value of %a, the value is still correct.

//echo -a > $len(%a)

> 4000

Even if you edit the value of the variable by adding or removing characters, the correct values are still returned. It seems like the editbox wraps the text, but does NOT include the $crlf(s) when reading it. ie. The values appear on two lines, but windows/mirc treats them as one continuous line. This is similar to how windows displays the name of a file when you are editing it/viewing it as an icon on the desktop.

Code:

|-------|
|       |
| ICON  |
|       |
|-------|
ThisIsAVe
ryLongFil
eNameInAW
indowsDes
ktopIcon



When you hit enter after changing the filename, even though it is wrapped around, the filename doesn't contain any $crlf's.

If this is true in mIRC's variables editor tab, then simply remove the warning for that particular situation.

-genius_at_work
Posted By: Khaled Re: Script Editor - 10/06/08 03:16 PM
The behaviour is entirely dependent on the Windows editbox. When I test it out here, it has a maximum single line length of 4096 characters, wraps the text when it reaches that length and appears to display it correctly on the next line.
Posted By: Khaled Re: Script Editor - 10/06/08 03:19 PM
The only data in the line is the text itself. I was only able to reproduce the error here (XP SP3) when the line reached 4096 characters. It's likely that different versions of the Windows editbox behave differently. I don't have Vista-64 so I'm unable to test this particular scenario unfortunately.
Posted By: Khaled Re: Script Editor - 10/06/08 04:03 PM
Thanks, I'll look into it a little more. However, it may be that the behaviour is not consistent across different versions of the Windows editbox in which case the default warning may be the safer option to prevent data loss. I'll see what I can do.
Posted By: Khaled Re: Script Editor - 13/06/08 02:12 PM
I've looked into this issue a little more - the maximum single line length seems to be at least 1024 characters, however the maximum length is somewhat arbitrary, and there does not appear to be a method to control it. Today I was only able to enter text up to around 3000 characters before it started to wrap the text. The wrapped text is being saved/loaded correctly, so this does not seem to be an issue. I've made a change so that mIRC now takes account of wrapped lines when checking the script editor editbox.
Posted By: Wims Re: Script Editor - 13/06/08 03:14 PM
Quote:
I've made a change so that mIRC now takes account of wrapped lines when checking the script editor editbox
What this means ? When the warning message appear, you can access to the mirc main window and if you use "alt + r", you will have two warning window... Does the warning window message will be still here in the next version ?

I think this was reported before (and i beleived it was fixed) when clicking on the sort button in the variable section of the mse, the focus jump between the sort button and the Ok button.I can't find the thread it was reported so i've decided to put it here.

Edit : maybe this behavior is intentinal

Posted By: Khaled Re: Script Editor - 14/06/08 01:17 PM
Yes, the warning message will be there in the next version. The warning message let's you know if the text in Script Editor editbox could not be loaded completely for some reason.

If I recall correctly I replied to the second issue in the thread where it was posted. This issue cannot be resolved, it is due to the way Windows works when the focus changes between different dialog items.
Posted By: Wims Re: Script Editor - 14/06/08 01:46 PM
Oh, sorry about the second thing and thanks for the reply
© mIRC Discussion Forums