mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
mEdit, Script Editor w/ Syntax Highlighting (Beta) #196675 21/03/08 07:30 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Hi all,

I've been working this month on a feature that has much been requested amongst the forums so I thought I would share with those who are interested: the beta release of mEdit, a dll file which enables syntax highlighting in mIRC and some other nifty features related to the script editor. This is all integrated into the existing editor, so there is no external program to run.

A few notes on features:

To configure colors go to File -> Colors... and there is also a feature (Ctrl+Shift+P or Edit -> Send to Pastebin) that allows you to paste selected text (or all text) to mPaste, a pastebin site for mIRC scripts which I've run for the last few years.

There are still bugs, so I invite everyone to try it out and help iron out the remaining issues, whatever they are, though I'm interested mostly in proper highlighting and general stability (no crashing of mIRC), not in minor aesthetics. Grab the release and feel free to report some issues.

Thanks!


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: argv0] #196684 21/03/08 09:13 PM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Woo! smile Go Arg! smile

Dumb note, add a 'README.TXT' which has the load instructions to the zip smile I know they're on the website, but..

Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: argv0] #196691 21/03/08 09:42 PM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Wow. (Looked at the screenshot.)

An idea like that never crossed my mind.

Compliments to Argv[0].

-Neal.

Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: LostShadow] #196704 22/03/08 02:55 AM
Joined: Aug 2007
Posts: 334
foshizzle Offline
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
cool


This is not the signature you are looking for
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #196717 22/03/08 08:17 AM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
It's really a very nice job, i've tried it and found it very useful smile.
But there is some bug with which colors you choose for the item "builtin commands" because the color of this is the color of "commands" which means custom command.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #196720 22/03/08 10:05 AM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Many have tried and many have failed, excellent job argv[0]. Ill be testing this out for sure asap.


$maybe
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #196736 22/03/08 03:54 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Is there a better place than here to report bugs ?


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: Wims] #196740 22/03/08 06:43 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
via the email given on the mEdit page (at the bottom) is best.

as far as the builtin command thing, it currently does not differentiate builtin commands or identifiers from custom ones, that will be coming in the future


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: argv0] #196827 23/03/08 06:34 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
alias create {
  write -c addon.mrc
  var %i = 1
  while (%i < 1001) {
    write addon.mrc alias %i $calc(%i + 1)
    inc %i
  }
  write addon.mrc alias 1001 echo -a hello
}


Run the following alias and then load addon.mrc into remote.

mIRC crashes with the "mIRC has encountered a problem and needs to close" error after a couple of seconds of scrolling. Trying to cut/copy the text seems to speed up the process.

I unloaded medit.dll and this doesn't happen, so I'm guessing it's the dll.

Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: hixxy] #196828 23/03/08 07:01 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Have you updated the dll from the website recently? a copy/paste bug was fixed in the last 2 days


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: argv0] #196829 23/03/08 07:11 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I just updated the dll and it seems to be fixed but it does lag terribly during scrolling on the same file. Do you think it would be a good idea to wait until the user stops scrolling before attempting to update the colours?

Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: hixxy] #196830 23/03/08 08:44 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
That may ultimately be the road I'll go down, though I'm still looking at ways to make it faster


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: argv0] #196976 26/03/08 07:12 PM
Joined: Jul 2007
Posts: 32
S
Sh4d0w191 Offline
Ameglian cow
Offline
Ameglian cow
S
Joined: Jul 2007
Posts: 32
Nice job but maybe the name is to similar to mEditor?

-Shadow

Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: Sh4d0w191] #196977 26/03/08 08:50 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
I guess it's about as similar as "Textpad" is to "Notepad". And as far as I can see, mEditor looks abandoned/unmaintained as of 2004, so I don't think the author will mind the similarity much smile


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #197065 27/03/08 07:51 PM
Joined: Feb 2006
Posts: 97
O
ots654685 Offline
Babel fish
Offline
Babel fish
O
Joined: Feb 2006
Posts: 97
nice addon but fails right when loaded frown

Code:
<some code>
menu * {
  .ALL
  ..ON: set %all ON | { activate_all }
;ALL GOES RED AFTER HERE
  ..OFF: set %all OFF | { deactivate_all }
  <and some more>


See above

:update:
How to unload?
/dll medit.dll Unload doesn't seem to work (nu such routine)

Last edited by ots654685; 27/03/08 07:53 PM.
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: ots654685] #197069 27/03/08 08:57 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
/dll -u dllname.dll is used to unload a dll in mIRC

it probably fails because that's an odd syntax to use, even though it's technically valid. you should probably ditch the { } around the second command though-- but ill look into that, thanks.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #197136 29/03/08 09:51 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
If you'll look into odd syntax, here is another *bug* :
Code:
set -s %y $calc(-0.57*(%t - %t0)^2 + 10.8*(%t - %t0))
%t aren't colored


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: Wims] #197148 30/03/08 02:01 PM
Joined: Feb 2006
Posts: 546
J
jaytea Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
technically %t isn't a variable at the highest level of evaluation there, $calc() just has a special evaluation routine that's different to other identifiers which allows you to use %t that way

sure it wouldn't be hard at all to add this extra bit, but what about $eval($ $+ calc(1*(1+%x)),2) and such? you pretty much have to parse mircscript to get it 100% exact. but those cases are rare and not worth worrying about :X

but ye, highlighting inside $calc() might not be a bad idea, it could be handled as an exceptional case


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: jaytea] #197156 30/03/08 05:23 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
You're right and there is another issues with this :
$calc(1 %2) (%2 could be "+3" for exemple) but this is considered as $calc(1 % 2) if %2 not exist and as $calc(1 "value of %2").


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: jaytea] #197162 30/03/08 06:09 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
I will be doing that, the same way $iif is a special case to highlight !%var



- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: Wims] #197163 30/03/08 06:11 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
//echo -a $calc(3 %2)

Gives 3

if it were doing 3 % 2 it would give 1

So no, that's not really an issue. If it were, that would be a bug in calc, because then a user could never use a variable named as a number as part of the argument.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #197165 30/03/08 06:34 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Hum yes, sorry about that.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #197166 30/03/08 06:36 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I'd like to suggest additional highlighting entries for:

Operators: &&, ||, !=, etc
Evaluation brackets: [ ]
Parenthesis: ( )
Block brackets: { }
Numbers
Event prefixes: ^, *, &, !, me:
Identifier parameter separators: ,
Properties
Dialog controls: button, text, etc

Also, the 'identifier prefixes' option doesn't seem to work unless I'm misunderstanding it.

I thought the "!" in $!time would be treated as a prefix but it's not. If this is supposed to be what it's for and it needs a fix, then you might as well support . and ~ as prefixes too.

Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: hixxy] #197173 30/03/08 06:59 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
identifier prefixes arent yet highlighted but they should parse right

I didn't even know about ~ as a prefix


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #197175 30/03/08 07:34 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$~ident will only call $~ident if $ident is a built in identifier.

Code:
alias t return t


//echo -a $t $~t $~time

Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: hixxy] #197178 30/03/08 07:59 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Thank you for this tips smile


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: Wims] #197465 06/04/08 10:36 AM
Joined: Jan 2004
Posts: 162
R
RRX Offline
Vogon poet
Offline
Vogon poet
R
Joined: Jan 2004
Posts: 162
Are there any system requirements for this dll? Because I load it, it appears in //echo -ag $dll(1), but for the rest, it doesnt indicate its presence in scripts editor.

Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: RRX] #197470 06/04/08 06:20 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
The author simply said that this dll only works with mIRC 6.31


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: RRX] #197471 06/04/08 07:20 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
The requirements are mIRC 6.31 and Windows XP onwards for now. I haven't tested any pre XP versions of Windows, so they might work but I wouldn't be surprised if they didn't.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #197482 06/04/08 10:23 PM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
Any updates on the way?

Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: symphony] #197483 06/04/08 10:35 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
I'm finishing up with school and then I'll be patching up the issues mentioned on this thread.. action will be light for the next month but there should be something at the end of april or early may


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #197507 07/04/08 01:09 PM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
Fair enough, hopefully you will fix the speed issues
Oh, and it still crashed on copy/cute and paste.

mEdit [Re: symphony] #197782 13/04/08 09:38 PM
Joined: Apr 2008
Posts: 5
M
Mithshark Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Apr 2008
Posts: 5
Any reason that
Code:
on *:CONNECTFAIL:{ 
  code blah blah
}

follows the invalid/red highlighting?

Re: mEdit [Re: Mithshark] #212141 12/05/09 01:42 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
*BUMP*
I'm guessing this hasn't been updated for mIRC 6.35?


[02:16] * Titanic has quit IRC (Excess Flood)
Re: mEdit [Re: The_JD] #212143 12/05/09 02:12 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline OP
Hoopy frood
OP Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
It should work the same on 6.35 as it did on versions prior.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: mEdit [Re: argv0] #212148 12/05/09 09:19 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
I'm not having any luck personally, allthough I tested it through WINE, which may be the issue.

Cheers,
JD


[02:16] * Titanic has quit IRC (Excess Flood)
Re: mEdit [Re: The_JD] #212150 12/05/09 09:31 AM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
The dll work the same on any version >= 6.31, using Windows.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: mEdit, Script Editor w/ Syntax Highlighting (Beta) [Re: argv0] #212151 12/05/09 10:09 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
Thanks for the info guys!


[02:16] * Titanic has quit IRC (Excess Flood)
Re: mEdit, Script Editor w/ Syntax Highlighting (B [Re: argv0] #212721 31/05/09 11:47 AM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
Have a look this screen and see at the end of the file the font didn't updated to all the file place maybe a bug ?, the font that i use in the mSE is Fixedsys on XP SP3, and when i scrolling i get VERY MUCH latency on mSE.

mirc.ini font status:
[fonts]
fscripts=Fixedsys,412,161




Edit: i am not sure but i think that the problem is to read more than 500 + script editor lines

Last edited by westor; 31/05/09 11:49 AM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Page 1 of 2 1 2