mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Color mIRC Scripts Editor [Win32/C] #213439 27/06/09 06:47 PM
Joined: Jul 2003
Posts: 40
H
HadS Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Jul 2003
Posts: 40
Hello everybody, I'm a bit confused since I can't color anything in the mIRC Script's Richedit.

I've successfully done this with an own program.

Here is my fuction:
Code:
void ColorText(int min, int max, COLORREF color) {
	CHARFORMAT cf;
	cf.cbSize      = sizeof(CHARFORMAT);
	cf.dwMask      = CFM_COLOR | CFM_UNDERLINE | CFM_BOLD;
	cf.dwEffects   = (unsigned long)~(CFE_AUTOCOLOR | CFE_UNDERLINE | CFE_BOLD);
	cf.crTextColor = color;
	SendMessage(hWndEdit, EM_SETSEL, (WPARAM)(int)min, (LPARAM)(int)max);
	SendMessage(hWndEdit, EM_SETCHARFORMAT, (WPARAM)(UINT)SCF_SELECTION, (LPARAM)&cf);
}
Note: hWndEdit is the handle to mse's richedit.

EM_SETSEL works fine with mse, but EM_SETCHARFORMAT doesn't seems to work (return 0 & GetLastError() = 6).

Thank you

Re: Color mIRC Scripts Editor [Win32/C] [Re: HadS] #213498 29/06/09 09:58 AM
Joined: Jul 2003
Posts: 40
H
HadS Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Jul 2003
Posts: 40
Fixed with SetWindowsHookEx(WH_CALLWNDPROCRET,HookCallbackFunction,GetModuleHandle(NULL),GetCurrentThreadId());

Re: Color mIRC Scripts Editor [Win32/C] [Re: HadS] #213623 03/07/09 12:36 PM
Joined: May 2009
Posts: 139
E
Excalibur Offline
Vogon poet
Offline
Vogon poet
E
Joined: May 2009
Posts: 139
Planning on releasing it? I doubt it'll be as customizable as argv[0]'s thu wink


- Excalibur
- Good and Evil, there never is one without the other.
Re: Color mIRC Scripts Editor [Win32/C] [Re: Excalibur] #213629 03/07/09 10:30 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Soon, and I'm glad to say that it'll be much more customizable and (should be) more robust than argv[0]'s dll.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #213630 04/07/09 04:14 AM
Joined: May 2009
Posts: 139
E
Excalibur Offline
Vogon poet
Offline
Vogon poet
E
Joined: May 2009
Posts: 139
Swell,
I'm willing to beta test it. You can easily reach me by e-mail. excalibur [at] $decode(bWlyYw==,m) [dot] org

Sorry 'bout the decode stuff, just trying to prevent spam bot from catching my e-mail address smile


- Excalibur
- Good and Evil, there never is one without the other.
Re: Color mIRC Scripts Editor [Win32/C] [Re: Excalibur] #213639 04/07/09 01:49 PM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
Yeh, Let us know how you go, I like'd the other one, but it dosn't work in WINE.
Would be great if yours does


[02:16] * Titanic has quit IRC (Excess Flood)
Re: Color mIRC Scripts Editor [Win32/C] [Re: Excalibur] #213640 04/07/09 01:55 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Yeah don't worry, we (we're both working on the dll) will post here a link for a beta version in order to have feedback/suggestion etc.

Yeah argv[0]'s dll is good, but not enough, that's why we're making ours own.
As for wine, I don't know.

Last edited by Wims; 04/07/09 02:04 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #213642 04/07/09 02:08 PM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
I waiting for your DLL , i saw the argv[0]'s dll has a lot of bugs let's see yours :P


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Re: Color mIRC Scripts Editor [Win32/C] [Re: westor] #213870 10/07/09 06:45 PM
Joined: Jul 2003
Posts: 40
H
HadS Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Jul 2003
Posts: 40
Some screenshots:




Re: Color mIRC Scripts Editor [Win32/C] [Re: HadS] #213893 11/07/09 11:04 AM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
OMG , i loved them give the LINK for download it!!!!!!!!!!!!!!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Re: Color mIRC Scripts Editor [Win32/C] [Re: westor] #213896 11/07/09 01:17 PM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
Agreed, Time for the public link, so we can all rip it, and complain about it :P


[02:16] * Titanic has quit IRC (Excess Flood)
Re: Color mIRC Scripts Editor [Win32/C] [Re: The_JD] #213897 11/07/09 01:34 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Those are just screenshot to show the possibilities.
The 'parser' to color each things isn't finished, you would find too many 'bugs'.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #213954 12/07/09 02:44 PM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
Ok when you finished this please give a link for download it!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #215436 17/09/09 12:36 AM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
We paused this project but are working on it again, the parser is ready and can be tested as a .exe here.
It has a basic color configuration and only work when you load a file, in order to have an idea of what are colored or not, and also to help me finding bugs.
There are a couple of things that should and will be added but aren't present yet.
I hope the dll will be released soon smile , the last thing we have to do is coloring a line when it is edited.



Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #215464 18/09/09 05:25 PM
Joined: May 2009
Posts: 139
E
Excalibur Offline
Vogon poet
Offline
Vogon poet
E
Joined: May 2009
Posts: 139
Looks good, but for some reason it thinks that some "words" are commands and it colorizes them. You need to add a list of mIRC recognized commands for the DLL to match and color :-)


- Excalibur
- Good and Evil, there never is one without the other.
Re: Color mIRC Scripts Editor [Win32/C] [Re: Excalibur] #215465 18/09/09 05:53 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Hum, actually I can't do that simply because of custom alias, if you're having words that aren't commands but are colored in green, it's a bug and I should fix it (it's certainly already done).
I'm still having others bug so I can't make an update now, will do it when it will be more stable.

edit : if it's about dialog table, it's not a bug, menu are also bugged

Last edited by Wims; 18/09/09 05:55 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #215466 18/09/09 05:57 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
How about gathering all alias names on start?

Re: Color mIRC Scripts Editor [Win32/C] [Re: DJ_Sol] #215469 18/09/09 08:00 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Make a list of all commands including alias won't help me, I'm not coloring, for exemple, all 'echo' token, only when it's a command, this means that I must know when a token is a command or not, but anyway this part works fine.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #215478 19/09/09 08:12 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Does this mean you're going full parsing on the code to recognize commands?


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Color mIRC Scripts Editor [Win32/C] [Re: argv0] #215481 19/09/09 03:38 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Almost, there are part of the code I don't want to color for now so I don't parse them especially, but yeah, I know all the time if the next token is a command or not.

edit : looking at your dll, you seems to do the same thing.

Last edited by Wims; 19/09/09 05:53 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #215546 22/09/09 11:54 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Parser updated, I've fixed many things, last thing that's not working correctly is menu definition.
For those who wants to report bug or makes suggestions, I'm available here


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #215563 23/09/09 11:22 PM
Joined: May 2009
Posts: 139
E
Excalibur Offline
Vogon poet
Offline
Vogon poet
E
Joined: May 2009
Posts: 139
Would be nicer if you actually release a public beta of the dll.


- Excalibur
- Good and Evil, there never is one without the other.
Re: Color mIRC Scripts Editor [Win32/C] [Re: Excalibur] #215575 24/09/09 06:59 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
A beta version will be released soon


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #215579 24/09/09 11:04 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Great.. looking forward to being able to test it.

Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #215606 25/09/09 06:48 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Is it only supposed to colour the script when you load it? If I type out a script in the box it doesn't auto-highlight... is that right?

Re: Color mIRC Scripts Editor [Win32/C] [Re: hixxy] #215608 25/09/09 07:35 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Yeah, as I said before, the project is only working when you load a file or when clicking the {} button.
But of course we want to auto highlight when the user is editing the code.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #215998 19/10/09 11:43 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
There it is, you can test a pre-beta version here.
Only few colors are available for now and change aren't saved yet.
Note that when you edit a line, only the edited line is re-colored, copy/paste only work on one line.

Last edited by Wims; 20/10/09 01:19 AM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #216003 20/10/09 03:14 PM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
Very nice dll but it will be nice to have an English translate too or try to make some translations it will be nice i don't understand the default language.

and something else have a look into this image i don't know if it is any kind of bug or something else but in the #$$1 is not blue like the $$1 other.


Last edited by westor; 20/10/09 03:24 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Re: Color mIRC Scripts Editor [Win32/C] [Re: westor] #216004 20/10/09 04:26 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Actually, the language is a mix of french and english, but it will be only english since mirc is in english.
About the #$$1, it's sort of an exception, I will add it.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #216194 31/10/09 12:09 PM
Joined: May 2009
Posts: 139
E
Excalibur Offline
Vogon poet
Offline
Vogon poet
E
Joined: May 2009
Posts: 139
Originally Posted By: Wims
There it is, you can test a pre-beta version here.
Only few colors are available for now and change aren't saved yet.
Note that when you edit a line, only the edited line is re-colored, copy/paste only work on one line.


pas de file! I think you need to update the download link :-)


- Excalibur
- Good and Evil, there never is one without the other.
Re: Color mIRC Scripts Editor [Win32/C] [Re: Excalibur] #216202 01/11/09 01:39 AM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
Yeah sorry, here is a new one : http://www.wbsscript.free.fr/files/dlls/mse/


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Color mIRC Scripts Editor [Win32/C] [Re: Wims] #216209 01/11/09 11:51 PM
Joined: May 2009
Posts: 139
E
Excalibur Offline
Vogon poet
Offline
Vogon poet
E
Joined: May 2009
Posts: 139
Merci!


- Excalibur
- Good and Evil, there never is one without the other.
Re: Color mIRC Scripts Editor [Win32/C] [Re: Excalibur] #216689 26/11/09 02:37 PM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
I found one issue on fonts check into this screenshot for details:

DOWNLOAD IMAGE: http://img403.imageshack.us/img403/8963/bug.png

IMAGE:



P.S: Running under windows vista


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