|
Joined: Oct 2003
Posts: 214
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2003
Posts: 214 |
Long content of make the scripteditor stop working correctly especially long lines with the new limit. 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: //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 
one step closer to world domination
|
|
|
|
symphony
|
symphony
|
I cannot reproduce this. I assume its something to do with windows, maybe?
|
|
|
|
Joined: Oct 2003
Posts: 3,641
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,641 |
Happens here too, with both .ini and .mrc formats. Vista Ultimate. That rules out windows.
|
|
|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
Confirmed here, window xp
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2002
Posts: 3,842
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,842 |
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.
|
|
|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
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.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jan 2004
Posts: 2,081
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,081 |
[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)
|
|
|
|
Joined: Oct 2005
Posts: 1,671
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,671 |
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.
|-------|
| |
| 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
Last edited by genius_at_work; 08/06/08 04:42 PM.
|
|
|
|
Joined: Dec 2002
Posts: 3,842
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,842 |
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.
|
|
|
|
Joined: Dec 2002
Posts: 3,842
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,842 |
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.
|
|
|
|
Joined: Dec 2002
Posts: 3,842
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,842 |
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.
|
|
|
|
Joined: Dec 2002
Posts: 3,842
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,842 |
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.
|
|
|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
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
Last edited by Wims; 13/06/08 03:28 PM.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2002
Posts: 3,842
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,842 |
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.
|
|
|
|
Joined: Jul 2006
Posts: 4,020
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,020 |
Oh, sorry about the second thing and thanks for the reply
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
|