What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Autotext + Name!

Autotext + Name!
Author: Message:
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Autotext + Name!
Why don't you use a for statement and arrays. Rather than all those if statement you only need one and you can then use Array[i].length for the length of the string rather than specifying a number.

EDIT: I thought I might help you out by giving you an example of what I was trying to say incase you didn't understand.  I just fixed up the code that you had posted.
code:
*/
var hi = 'Hi +Origin (:'
var on = '1'
var Array = new Array('HI","HALLO","HI@","HELLO","SEAS","ZEAS","HUHU","MOIN,"MORGEN","SERVUS","TAG","SERVAS");
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
if (Origin != Messenger.MyName){
Message = Message.toUpperCase()
for(i=0;i<Array.length;i++){
if (Message.substr(0,Array[i].lenght-1) == Array[i]){
ChatWnd.SendMessage('Hi ' + Origin + " (:" );
}
}
}
}
This will make it easier to extend on the script easier and fix any problem that you come accross because it is smaller and easier to read.

This post was edited on 08-17-2006 at 10:16 AM by markee.
[Image: markee.png]
08-17-2006 09:55 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Autotext + Name! - by Gropfi on 08-14-2006 at 03:59 AM
RE: Autotext + Name! - by Felu on 08-14-2006 at 04:17 AM
RE: Autotext + Name! - by ddunk on 08-14-2006 at 04:19 AM
RE: RE: Autotext + Name! - by RaceProUK on 08-14-2006 at 02:27 PM
RE: Autotext + Name! - by Gropfi on 08-14-2006 at 07:02 AM
RE: Autotext + Name! - by H-Des on 08-14-2006 at 12:11 PM
RE: RE: Autotext + Name! - by Mike on 08-17-2006 at 11:52 AM
RE: RE: RE: Autotext + Name! - by H-Des on 08-17-2006 at 01:15 PM
RE: Autotext + Name! - by Gropfi on 08-17-2006 at 07:02 AM
RE: Autotext + Name! - by RaceProUK on 08-17-2006 at 08:24 AM
RE: Autotext + Name! - by Silentdragon on 08-17-2006 at 08:26 AM
RE: Autotext + Name! - by Gropfi on 08-17-2006 at 09:37 AM
RE: Autotext + Name! - by markee on 08-17-2006 at 09:55 AM
RE: Autotext + Name! - by Gropfi on 08-17-2006 at 10:26 AM
RE: Autotext + Name! - by markee on 08-17-2006 at 10:29 AM
RE: Autotext + Name! - by CookieRevised on 08-17-2006 at 10:43 AM
RE: Autotext + Name! - by CookieRevised on 08-19-2006 at 09:37 AM
RE: Autotext + Name! - by Sunshine on 08-19-2006 at 10:31 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