[Request] Script to make sent messages gradient - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: [Request] Script to make sent messages gradient (/showthread.php?tid=61294) [Request] Script to make sent messages gradient by t_pass6 on 06-25-2006 at 01:24 PM
Hello everybody, RE: Script to make sent messages gradient by vaccination on 06-25-2006 at 01:49 PM
In the conversation window click the Format panel icon then click the lil "T" in the top right coner of the format panel and select gradient, then select two colours you like and type your text and it will be sent in a gradient! RE: Script to make sent messages gradient by Val on 06-25-2006 at 01:56 PM
quote:Vaccination, I think he knows how to do this but wants to have script that does this for every message he sends. Please read posts carefully next time. RE: Script to make sent messages gradient by t_pass6 on 06-25-2006 at 03:04 PM That's exactly what i meant ValSpy. I know i have to make a script with OnEvent_ChatWndSendMessage, but i don't what to do next. Can someone help me? RE: Script to make sent messages gradient by mathieumg on 06-25-2006 at 03:07 PM You got to surround the sent message (Message variable) with the approriate gradient color tags ([c=#color1]Message[/c=#color2]) and return this value (so it is sent instead of the initial Message) RE: [Request] Script to make sent messages gradient by t_pass6 on 06-25-2006 at 03:19 PM
Then i must do RE: [Request] Script to make sent messages gradient by mathieumg on 06-25-2006 at 03:21 PM
code: Try that Edit: Just tested it and it works 100% RE: [Request] Script to make sent messages gradient by t_pass6 on 06-25-2006 at 03:23 PM Thanks a lot! RE: [Request] Script to make sent messages gradient by mathieumg on 06-25-2006 at 03:24 PM No problem You're welcome RE: [Request] Script to make sent messages gradient by t_pass6 on 06-26-2006 at 08:50 AM
Another question : I want to have different effects based on the contact i send messages to. I made a function to replace the message to avoid being redundant RE: [Request] Script to make sent messages gradient by Ezra on 06-26-2006 at 09:04 AM
code: This might work, can't test, network is acting up. This will iterate trough a list of contacts in the current ChanWnd, and if it finds the contact it will send the gradiented message, else it will send the message unaltered. RE: [Request] Script to make sent messages gradient by t_pass6 on 06-26-2006 at 09:15 AM
Well, as i'm seeing it, if it finds the Contact il will send both the unaltered and the altered message, because os the return Message at the end of the function. RE: [Request] Script to make sent messages gradient by Ezra on 06-26-2006 at 09:19 AM
The correct behavior for a function is to stop after returning IIRC, but if this happends use this: code: EDIT: replaced the bool variable with a more understandable variable: sendUnaltered RE: [Request] Script to make sent messages gradient by timbothegreat on 06-26-2006 at 09:31 AM
Here's a snippet from a script I wrote to randomize the gradient upon sending. Note that, depending on your background picture, this can be difficult to see. RE: [Request] Script to make sent messages gradient by ThunderStorm on 06-26-2006 at 09:40 AM
I want a counter by the messages. RE: [Request] Script to make sent messages gradient by Ezra on 06-26-2006 at 09:45 AM
quote: Sure, but please make your own thread requesting this, don't hijack someone elses thread please RE: [Request] Script to make sent messages gradient by t_pass6 on 06-26-2006 at 09:56 AM
Well this isn't what i want to do timbothegreat. I just want to have specific gradient for each contact who wants to see it. And I also don't want to use it in chat with multiple contacts. I was thinking about something like this: code:Seems simpler to me. RE: [Request] Script to make sent messages gradient by crank on 06-26-2006 at 10:28 AM
be sure to add this in your script else commands like /me won't work. code:I'm working on a script to do autogradients and colors, with per contact options and such, having a hard time with PlusWnds tho, but nothing i can't handle RE: [Request] Script to make sent messages gradient by t_pass6 on 06-26-2006 at 10:41 AM thanks, but i get an error with the line var Contactnum = Enumerate(ChatWnd.Contacts), anyone sees why? RE: [Request] Script to make sent messages gradient by timbothegreat on 06-26-2006 at 11:00 AM
quote: If you're only interested in the number of contacts, you don't need to create the enumerator object. You can use the Contacts.Count property. Contactnum = ChatWnd.Contacts.Count RE: [Request] Script to make sent messages gradient by t_pass6 on 06-26-2006 at 11:28 AM
Yes, but i need to have properties about contatcs, so it is good the way it put it. But i have some problem with this code : code: It goes no further than : Debug.Trace("Enumération des Contacts Terminée"); Does anyone see why? P.S. : traces are in french, because i'm french RE: [Request] Script to make sent messages gradient by Ezra on 06-26-2006 at 11:33 AM
Why don't you just use mine? code: RE: [Request] Script to make sent messages gradient by t_pass6 on 06-26-2006 at 11:42 AM because i want to use it only in conversation with one contact not several, and your script works for both of the cases. RE: [Request] Script to make sent messages gradient by Ezra on 06-26-2006 at 11:46 AM
Oh, allright I see... code: RE: [Request] Script to make sent messages gradient by demajen on 06-26-2006 at 06:18 PM If your contact doesn't have MSGPLUSLIVE installed, will they see the colour codes in their window, or not? At the moment, without scripts, my contacts who don't have it see [ c=1 ] and [ /c=4] tags and I don't want em too. I figured this was best place to ask. =) RE: RE: [Request] Script to make sent messages gradient by Dally on 06-26-2006 at 06:47 PM
quote: I also discovered this, isn't there anyway that non messenger plus users do not see these colour codes infront of every message I send. RE: [Request] Script to make sent messages gradient by t_pass6 on 06-27-2006 at 01:34 PM
I don't think that there is a way to know if a contact has Messenger Plus or not, you just have to add the contacts who have MsgrPlus to the Switch cases list, and they will see it, but if someone doesn't have his adress in the cases list the message will be sent like a normal message (default case). There is also a small modification of the code ezra made, because you have to check if the message is a command or not. You just have to add a condition to the Replace_Text function like this : code: RE: [Request] Script to make sent messages gradient by pags2k7 on 06-27-2006 at 04:28 PM what about 3 colors? RE: [Request] Script to make sent messages gradient by mathieumg on 06-27-2006 at 04:30 PM You'd have to code your own gradient script for that, way more complicated RE: [Request] Script to make sent messages gradient by hmaster on 06-27-2006 at 05:02 PM
Or you could split the message into 2 parts and do RE: [Request] Script to make sent messages gradient by Eljay on 06-27-2006 at 05:13 PM
quote: var Color1 = 1; var Color2 = 2; var Color3 = 3; function OnEvent_ChatWndSendMessage(ChatWnd, Message) { var part1 = Message.substr(0, Math.floor(Message.length / 2)); var part2 = Message.substr(Math.floor(Message.length / 2)); return "[c=" + Color1 + "]" + part1 + "[/c=" + Color2 + "][c=" + Color2 + "]" + part2 + "[/c=" + Color3 +"]"; } RE: RE: [Request] Script to make sent messages gradient by Dally on 06-27-2006 at 07:14 PM
quote: I don't undastnd wha u mean by add the contacts who have messenger plus live to a cases list. Which cases list is this??? RE: [Request] Script to make sent messages gradient by t_pass6 on 06-27-2006 at 09:02 PM Further in the code you have a Switch function, it's like an if then else structure but a lot simpler. As you can see after the Switch you have an enumeration of case "xxx@yyy.zzz" foloowed by a call of the Repkace_Text function. The number of the cases can beeverything you want. If you want that your contact see your messages gradient you just have to add code:This must be done for every contact you want to send gradient messages to. If you don't want a contact to receive gradient messages, you just have to do nothing, it his adress isn't in the "case" list, he won't receive gradient messages. That was what I meant by the cases list. RE: [Request] Script to make sent messages gradient by Dally on 06-28-2006 at 11:58 AM
Oh I see what u mean now. |