What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Question :)

Question :)
Author: Message:
WaterRatj
New Member
*


Posts: 5
Joined: Mar 2008
O.P. Question :)
Some questions while i'm learning a bit.

1) Is it possible to find out on recievedmessage if a file is being sent?
   1.a) If so is it possible to autoaccept?
2) Is it possible in a group conversation, to find out what email sended a message?
3) Is it possible to find out if someone is adding your email?
   3.a) Is it possible to autoaccept it then?

Some questions if somone can help me out with :)
Thanks
03-27-2008 03:55 PM
Profile E-Mail PM Find Quote Report
Quantum
Disabled Account
*****

Away.

Posts: 1055
Reputation: -17
31 / Male / Flag
Joined: Feb 2007
RE: Question :)
1.a Yes you can do this without a script. In your Plus! prefs go to the conversation tab and at the bottom you will see "Auto Accept Requests". Check the box and choose from the drop down menu file transfers.

2 Don't know what you mean.

3. You get a little window that comes up and asks you to accept.
3.a I don't think so but i could be wrong.
No longer here.
03-27-2008 04:27 PM
Profile PM Find Quote Report
MeEtc
Patchou's look-alike
*****

Avatar
In the Shadow Gallery once again

Posts: 2200
Reputation: 60
38 / Male / Flag
Joined: Nov 2004
Status: Away
RE: Question :)
1. AFAIK, you cannot detect file transfers with scripting on its own. You will need a packet sniffer, such as Xniff that you will find here in the forum.
   a. What john-t said: Plus can auto-accept activities including file transfers.

2. It can be difficult to determine in a 2 person conversation to find out which email address sent a particular message. There are code samples on the forum somewhere. I'll edit this post when i find some examples.

3. See 1. Not without a packet sniffer.
   a. If you get the email address of the person trying to add you, check out this script by deAd
[Image: signature/]     [Image: sharing.png]
I cannot hear you. There is a banana in my ear.
03-27-2008 04:43 PM
Profile PM Web Find Quote Report
WaterRatj
New Member
*


Posts: 5
Joined: Mar 2008
O.P. RE: Question :)
Okay, Thanks for answering :)
I'll also look further :)

That helped me a bit :)
Stupid Question? :P

I'm trying to split something

var sPrefix = sMessage.split(" ");
var sPrefixTheRest = ???

Lets say the string is !nick Hello Kitty.

sPrefix[0] will be !nick

But i' trying to the a string now with all the rest of the line without the !nick, can anyone tell me hows the best way to do this?
03-27-2008 05:02 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Question :)
quote:
Originally posted by WaterRatj
I'm trying to split something

var sPrefix = sMessage.split(" ");
var sPrefixTheRest = ???

Lets say the string is !nick Hello Kitty.

sPrefix[0] will be !nick

But i' trying to the a string now with all the rest of the line without the !nick, can anyone tell me hows the best way to do this?
split() is usually only good if you want to turn something into an array or if you are absolutely certain that a certain string includes the exact amount of delimiters and items you want. Now, it can be done with the very slow split() function though, but you will need a lot of stuff and trickery and in the end it would still not be fail-proof.

As a first simple alternative:

code:
var mystring = "!nick Hello Kitty";

// Search the first space in the string
var X = mystring.indexOf(" ");
// Increase the index by one (we don't want the space itself)
X = X + 1;
// Get everything after the space, thus starting from the character at position X till the end
mystring = mystring.substr( X );
combined into one line:
code:
mystring = mystring.substr(mystring.indexOf(" ") + 1);

But if that string is something entered by the user (like a command):
Then what if the user forget to type anything behind "!nick"?
And what if the user forget the space after "!nick"?
And what if the user has typed spaces before "!nick"?
And what if the user has typed multiple spaces after "!nick"?
etc...

All these things need to be taken care of.

If you want to seperate the parameters from the command in an OnEvent_ChatWndSendMessage function, you better use regular expressions. This is the most accurate and versitile method to use for this. For an explaining example see CookieRevised's reply to Gettin data from "/" commands.

PS: do not use "!" as prefix for normal commands. A normal local command should always have "/" as prefix. Most likely, Your script isn't the only script the user is using. Using something different for the prefix than the usual prefix may confuse the user and it will give problems with some other scripts also, etc.

;)

This post was edited on 03-28-2008 at 12:26 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-28-2008 12:22 AM
Profile PM Find Quote Report
WaterRatj
New Member
*


Posts: 5
Joined: Mar 2008
O.P. RE: Question :)
tnx for the help :p
I'll be on my way for a bit now with scripting :)
Thanks
03-28-2008 12:31 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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