What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » how to use special characters in a switch

how to use special characters in a switch
Author: Message:
koen
New Member
*


Posts: 2
Joined: Feb 2008
O.P. how to use special characters in a switch
hi,
i have a question about using special characters in a switch. I have searched in the Scripting documentation,internet, this forum,... but i can't make it work.

I have a switch that works:
switch(Message) {
             case "questions": ChatWnd.SendMessage("sentence");
             break;
                ...

but now i want to compare 'Message' to a string with for example 'the'  in it.

like this: if Message = 'the best question ever'
how can i make the switch trigger this by the word 'question'?

switch(Message){
           case "^.question.$": ....                something like this doesn't work :s

i have read in the documentation that '.' matches any single character, '^' is the beginning of a string, '$' is the end of a string,...

but i can't make it work...
02-07-2008 09:35 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
how to use special characters in a switch - by koen on 02-07-2008 at 09:35 AM
RE: how to use special characters in a switch - by Matti on 02-07-2008 at 10:52 AM
RE: how to use special characters in a switch - by koen on 02-07-2008 at 11:01 AM
RE: how to use special characters in a switch - by markee on 02-07-2008 at 01:13 PM
RE: how to use special characters in a switch - by Spunky on 02-07-2008 at 10:00 PM
RE: how to use special characters in a switch - by markee on 02-08-2008 at 05:28 AM
RE: how to use special characters in a switch - by Matti on 02-08-2008 at 08:22 AM
RE: how to use special characters in a switch - by Spunky on 02-08-2008 at 05:42 PM
RE: how to use special characters in a switch - by markee on 02-09-2008 at 02:13 AM
RE: how to use special characters in a switch - by Spunky on 02-09-2008 at 11:10 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