| | 
 
| 
| 
|  |  
| 
HadS
 |  
| HadS | 
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: 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 |  |  |  
| 
| 
|  |  
| 
HadS
 |  
| HadS | 
Fixed with SetWindowsHookEx(WH_CALLWNDPROCRET,HookCallbackFunction,GetModuleHandle(NULL),GetCurrentThreadId()); |  |  |  
| 
| 
|  |  
| 
Excalibur
 |  
| Excalibur | 
Planning on releasing it? I doubt it'll be as customizable as argv[0]'s thu   |  |  |  
| 
| 
|  |  
| 
Joined:  Jul 2006 Posts: 4,032 Hoopy frood |  
|   Hoopy frood Joined:  Jul 2006 Posts: 4,032 | 
Soon, and I'm glad to say that it'll be much more customizable and (should be) more robust than argv[0]'s dll. 
 #mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  |  |  
| 
| 
|  |  
| 
Excalibur
 |  
| Excalibur | 
Swell, I'm willing to beta test it. You can easily reach me by e-mail. excalibur [at] $decode(bWlyYw==,m) [dot] orgSorry 'bout the decode stuff, just trying to prevent spam bot from catching my e-mail address  |  |  |  
| 
| 
|  |  
| 
Joined:  Mar 2006 Posts: 392 Pan-dimensional mouse |  
|   Pan-dimensional mouse Joined:  Mar 2006 Posts: 392 | 
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)
 |  |  |  
| 
| 
|  |  
| 
Joined:  Jul 2006 Posts: 4,032 Hoopy frood |  
|   Hoopy frood Joined:  Jul 2006 Posts: 4,032 | 
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.
 
 #mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  |  |  
| 
| 
|  |  
| 
Joined:  Dec 2008 Posts: 1,483 Hoopy frood |  
|   Hoopy frood Joined:  Dec 2008 Posts: 1,483 | 
I waiting for your DLL , i saw the argv[0]'s dll has a lot of bugs let's see yours :P |  |  |  
| 
| 
|  |  
| 
Joined:  Dec 2008 Posts: 1,483 Hoopy frood |  
|   Hoopy frood Joined:  Dec 2008 Posts: 1,483 | 
OMG , i loved them give the LINK for download it!!!!!!!!!!!!!! |  |  |  
| 
| 
|  |  
| 
Joined:  Mar 2006 Posts: 392 Pan-dimensional mouse |  
|   Pan-dimensional mouse Joined:  Mar 2006 Posts: 392 | 
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)
 |  |  |  
| 
| 
|  |  
| 
Joined:  Jul 2006 Posts: 4,032 Hoopy frood |  
|   Hoopy frood Joined:  Jul 2006 Posts: 4,032 | 
Those are just screenshot to show the possibilities.The 'parser' to color each things isn't finished, you would find too many 'bugs'.
 
 #mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  |  |  
| 
| 
|  |  
| 
Joined:  Dec 2008 Posts: 1,483 Hoopy frood |  
|   Hoopy frood Joined:  Dec 2008 Posts: 1,483 | 
Ok when you finished this please give a link for download it! |  |  |  
| 
| 
|  |  
| 
Joined:  Jul 2006 Posts: 4,032 Hoopy frood |  
|   Hoopy frood Joined:  Jul 2006 Posts: 4,032 | 
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    , the last thing we have to do is coloring a line when it is edited. 
 #mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  |  |  
| 
| 
|  |  
| 
Excalibur
 |  
| Excalibur | 
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 :-) |  |  |  
| 
| 
|  |  
| 
Joined:  Jul 2006 Posts: 4,032 Hoopy frood |  
|   Hoopy frood Joined:  Jul 2006 Posts: 4,032 | 
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.
 
 #mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  |  |  
| 
| 
|  |  
| 
Joined:  Jan 2007 Posts: 1,155 Hoopy frood |  
|   Hoopy frood Joined:  Jan 2007 Posts: 1,155 | 
How about gathering all alias names on start? |  |  |  
| 
| 
|  |  
| 
Joined:  Jul 2006 Posts: 4,032 Hoopy frood |  
|   Hoopy frood Joined:  Jul 2006 Posts: 4,032 | 
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. 
 #mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  |  |  
| 
| 
|  |  
| 
Joined:  Oct 2003 Posts: 3,641 Hoopy frood |  
|   Hoopy frood Joined:  Oct 2003 Posts: 3,641 | 
Does this mean you're going full parsing on the code to recognize commands? |  |  |  
| 
| 
|  |  
| 
Joined:  Jul 2006 Posts: 4,032 Hoopy frood |  
|   Hoopy frood Joined:  Jul 2006 Posts: 4,032 | 
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.
 
 #mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  |  |  
 | 
 |