What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » AJAX isn't working

AJAX isn't working
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: AJAX isn't working
quote:
Originally posted by Eljay
The way that your code is structured is fine, obviously return will not be executed and execution of that function will continue so I don't know what Cookie is on about there :P (I actually prefer coding like that, much easier to read and debug without everything being needlessly nested).
After you posted I looked at his proposed code again (several times)... Only after like 5 times looking at those few lines of coding, I realized I made a mistake.

But this was exactly because he did NOT nested the if structure between brackets { }. So reading and debugging made easier if you don't nest stuff? I realy dont think so... It's more confusing and mistakes happen more quickly, especially when you split things out on several lines. (and reading other scripting topics, such mistakes happen all the time)... edit: see again here (and I can probably keep on updating with more links regulary)...

But thanks for pointing out my mistake. (y)

So, yes, using a negative check like that and returning the _original_ message will work, but besides I think it is not logic to do, it does make code more confusing and execution slower (you should not notice it though)...

Furthermore, the moment you want to make your check a bit better (eg: taking in account the casing of the command, and other tid bits), use regular expressions, want to use more than one command, or want to check on other things too (eg: who the contact is or whatever), your code quickly becomes more confusing and harder to follow if you use a negative check. And you'll find that you'll quickly revert to a positive check in such cases anyways for such stuff.

quote:
Originally posted by The-Phantom
quote:
You would be surprised to know how many people start scripting without properly reading the docs (and then comming here for help) :P Anyways, I posted that because you asked about changing recieved text. Those are the basics to know for doing that. If that is not what you wanted then I misunderstood you. In that case, could you maybe rephrase your question?

;)
Well, I meant that it is impossible to have a message appear as "received" even though I didn't actually receive it.
So you want to show a kind of status message? Then this doesn't have much to do with changing recieving text. You actually want to _add_ text, if I'm not mistaken.

You indeed can't directly add text to the history window, but you can use DisplayInfoMessage to show a status message in the chat window. Or you can use toasts.

This post was edited on 09-10-2010 at 11:22 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-30-2010 10:12 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
AJAX isn't working - by The-Phantom on 08-28-2010 at 01:33 PM
RE: AJAX isn't working - by V@no on 08-29-2010 at 05:31 AM
RE: AJAX isn't working - by The-Phantom on 08-29-2010 at 07:09 AM
RE: AJAX isn't working - by Matti on 08-29-2010 at 07:10 PM
RE: AJAX isn't working - by The-Phantom on 08-29-2010 at 07:57 PM
RE: AJAX isn't working - by CookieRevised on 08-29-2010 at 08:24 PM
RE: AJAX isn't working - by Matti on 08-29-2010 at 08:43 PM
RE: AJAX isn't working - by The-Phantom on 08-30-2010 at 06:48 AM
RE: AJAX isn't working - by CookieRevised on 08-30-2010 at 08:31 AM
RE: RE: AJAX isn't working - by The-Phantom on 08-30-2010 at 08:40 AM
RE: RE: RE: AJAX isn't working - by CookieRevised on 08-30-2010 at 09:01 AM
RE: RE: RE: RE: AJAX isn't working - by The-Phantom on 08-30-2010 at 09:22 AM
RE: AJAX isn't working - by Eljay on 08-30-2010 at 09:41 AM
RE: AJAX isn't working - by CookieRevised on 08-30-2010 at 10:12 AM
RE: AJAX isn't working - by Eljay on 08-30-2010 at 10:35 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On