mIRC Home    About    Download    Register    News    Help

Print Thread
Script Editor #200572 07/06/08 06:17 PM
Joined: Oct 2003
Posts: 214
S
Sephiroth_ Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
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


one step closer to world domination
Re: Script Editor [Re: Sephiroth_] #200580 07/06/08 08:52 PM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
I cannot reproduce this. I assume its something to do with windows, maybe?

Re: Script Editor [Re: Sephiroth_] #200592 08/06/08 12:09 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Happens here too, with both .ini and .mrc formats. Vista Ultimate. That rules out windows.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Script Editor [Re: argv0] #200594 08/06/08 12:39 AM
Joined: Jul 2006
Posts: 3,741
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,741
Confirmed here, window xp


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Script Editor [Re: Sephiroth_] #200602 08/06/08 10:27 AM
Joined: Dec 2002
Posts: 4,871
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,871
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.

Re: Script Editor [Re: Khaled] #200608 08/06/08 01:46 PM
Joined: Jul 2006
Posts: 3,741
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,741
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.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Script Editor [Re: Khaled] #200613 08/06/08 02:30 PM
Joined: Jan 2004
Posts: 1,508
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,508
[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)

Re: Script Editor [Re: Khaled] #200624 08/06/08 04:41 PM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

Last edited by genius_at_work; 08/06/08 04:42 PM.
Re: Script Editor [Re: Wims] #200721 10/06/08 03:16 PM
Joined: Dec 2002
Posts: 4,871
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,871
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.

Re: Script Editor [Re: maroon] #200722 10/06/08 03:19 PM
Joined: Dec 2002
Posts: 4,871
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,871
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.

Re: Script Editor [Re: genius_at_work] #200723 10/06/08 04:03 PM
Joined: Dec 2002
Posts: 4,871
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,871
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.

Re: Script Editor [Re: genius_at_work] #200844 13/06/08 02:12 PM
Joined: Dec 2002
Posts: 4,871
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,871
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.

Re: Script Editor [Re: Khaled] #200847 13/06/08 03:14 PM
Joined: Jul 2006
Posts: 3,741
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,741
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


Last edited by Wims; 13/06/08 03:28 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Script Editor [Re: Wims] #200894 14/06/08 01:17 PM
Joined: Dec 2002
Posts: 4,871
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,871
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.

Re: Script Editor [Re: Khaled] #200896 14/06/08 01:46 PM
Joined: Jul 2006
Posts: 3,741
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,741
Oh, sorry about the second thing and thanks for the reply


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net