Shoutbox

[Release] Status Interceptor (Updated v1.2) - 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: [Release] Status Interceptor (Updated v1.2) (/showthread.php?tid=64854)

[Release] Status Interceptor (Updated v1.2) by phalanxii on 08-13-2006 at 04:09 AM

Based on mlevit's Auto status change script and edited with his permission. :)


16AUG2006
- Status Interceptor -
Version 1.2

... continuing from Auto Status Change v1.1


Status Interceptor will automatically change your status and personal message when you send a message containing specific keywords.

Features:
  • Toggable status keywords for each email
  • Status automatically changes to "Busy" when a message contains "busy"
  • Status automatically changes to "Be Right Back" when a message contains "brb"
  • Status automatically changes to "Away" when a message contains "bbl" or "bbs"
  • Status automatically changes to "Out To Lunch" when a message contains "lunch" or "dinner"
  • Status automatically reverts to original status when a message contains "back" or "bak"
  • Status will not change if user's status is set to "Appear Offline"
  • Personal message automatically changes to custom text when a message contains "brb", "bbl" or "bbs"
  • Personal message may be changed to full message sent
  • Personal message may be customised with a mask
  • Personal message may trim excess spaces before, within and after
  • Personal message automatically reverts to original personal message when a message contains "back" or "bak"
  • Messages containing "busy", "brb", "bbl", "bbs", "lunch" or "dinner" may be sent to all open conversations (toggable for each email) :o
Example Usage:
quote:
User says:
   brb               Status changes to "Be Right Back"
User says:
   back             Status changes to "Online"
quote:
User (Busy) says:
   bbl               Status changes to "Away"
User says:
   bak              Status changes to "Busy"
quote:
User says:
   BRB toilet      Status changes to "Be Right Back"
                      PSM changes to "toilet"
User says:
   bak              Status changes to "Online"
                      PSM reverts to previous
quote:
User says:
   I'll bbs going SHOPPING     Status changes to "Away"
                                       PSM changes to "going SHOPPING"
User says:
   I'm back        Status changes to "Online"
                      PSM reverts to previous
Change Log:

16th of August 2006 - v1.2
  • Added a settings interface, containing all previous (and new) settings
  • Different status keywords can be toggled for each email (for those who don't want "busy", "lunch" and "dinner")
  • Custom mask for personal message
14th of August 2006 - v1.1
  • Status automatically changes to "Busy" when a message contains "busy"
  • Status automatically changes to "Out To Lunch" when a message contains "lunch" or "dinner"
  • Custom personal message more customizable
    • - Custom personal message may be the full message sent
      - Spaces before, within and after the custom message may be trimmed
  • Cleaner and more efficient code
Settings (v1.0 and v1.1 only):

The "Send to All Open Conversations" option can be toggled in the menu ("Plus! > Status Interceptor > [  ] Send to All Open Conversations"). If the box is crossed ("[x]"), messages with "brb", "bbl", "bbs", "back" and "bak" will be sent to all conversations that are open. ;)

To customize the personal message with space trimming or full message setting, you will need to edit the script. To turn an option "on", you will need to set it to "1" (no quotations marks). To turn an option "off", you will need to set it to "0" (no quotations marks). The options are found at the bottom of the list of "var ...". Until I make a configuration box, this will be the only way to change these settings. The default setting is as follows:
code:
var FullMessagePsm = 0; //Sets the custom personal message to the full message sent
var TrimSpacesBefore = 1; //Trims additional spaces before the custom personal message
var TrimSpacesWithin = 0; //Trims additional spaces within the custom personal message
var TrimSpacesAfter = 1; //Trims additional spaces after the custom personal message
This script was previously found in my reply to mlevit's Auto status change script thread. However, because not everyone read through the entire thread, it was not getting seen properly. Therefore, I've decided to make this new thread for my script. Version 1.0 of Status Interceptor is equivalent to my version 1.2 of Auto Status Change. I will try to add in any suggestions that are not overly complicated. :D

Status Interceptor v1.2 will probably be my final release, unless I need to fix some bugs. I may decide later to add more statuses, a custom wordbank and possibly translations. At this point in time, you can edit the script to adjust to your own preferences. If you want to have this script in your language, just tell me the translation of the words (exact) and the shortcuts that should be detected.

NOTE: I am not taking credit for mlevit's work. I will remove this script if required by mlevit or others. *-)



Previous Versions:

Status Interceptor v1.1
Status Interceptor v1.0
RE: [Release] Status Interceptor by Sypher on 08-13-2006 at 08:35 AM

Quite nice, normally i'd say:

/brb
brb

So now it isn't needed anymore.

I do have some suggestions: Add more statusses.. Stuff like:
lunch, i'm going to eat/have dinner etc


RE: [Release] Status Interceptor by phalanxii on 08-13-2006 at 09:10 AM

quote:
Originally posted by Sypher
Quite nice, normally i'd say:

/brb
brb

So now it isn't needed anymore.

I do have some suggestions: Add more statusses.. Stuff like:
lunch, i'm going to eat/have dinner etc

Sure, I'll add those in once I get time. If you know how to script, I don't mind if you edit my script to add your own statuses.

quote:
Originally posted by gjs1992
quote:
--------------------------------------------------------------------------------
User (Busy) says:
   bbl               Status changes to "Away"
User says:
   bak              Status changes to "Busy"

--------------------------------------------------------------------------------

bak must change the status to online if the person said I'm bust then the status will change to busy that would be much better ;)

~gjs1992(brb)

I guess I didn't make this too clear, but basically "User (Busy)" means that the original status (before typing "bbl") was "Busy". When "bak" is typed, it will revert the status to this original status (in this case, "Busy"). I'll add the "busy" keyword in as well. :)
RE: [Release] Status Interceptor (Updated v1.1) by phalanxii on 08-14-2006 at 08:27 AM

Updated to Status Interceptor v1.1!

Change Log:

14th of August 2006 - v1.1

  • Status automatically changes to "Busy" when a message contains "busy"
  • Status automatically changes to "Out To Lunch" when a message contains "lunch" or "dinner"
  • Custom personal message more customizable
    • - Custom personal message may be the full message sent
      - Spaces before, within and after the custom message may be trimmed
  • Cleaner and more efficient code
To use the new personal message features, settings need to be changed in the actual script. The instructions are in the first post. If anyone could help me make a configuration window, that would be great (changing settings like this is pretty bad). :)
RE: [Release] Status Interceptor (Updated v1.1) by Sypher on 08-14-2006 at 08:41 AM

You might want to include -dt-'s auto-update thing if you plan on updating/enhancing it :)


RE: [Release] Status Interceptor (Updated v1.1) by Intosia on 08-14-2006 at 10:55 AM

quote:
Status automatically changes to "Busy" when a message contains "busy

that doesnt look so handy.. When i say "Ill be busy later on" it will change my status to busy???


RE: [Release] Status Interceptor (Updated v1.1) by Firehalk on 08-14-2006 at 04:04 PM

Great script, really great!

There a few suggestions:

- More customizable; (like, what words will do what.)
Something like:

______________________
|
|  Word: _________ changes status to (pull down menu with all the status)
| Word: _________ changes status to (pull down menu with all the status)
| Word: _________ changes status to (pull down menu with all the status)
| ...
|
| Change the status when a message contains a status? (  ) Yes (  ) No
|
----------------------------


Also, a way to use 2 words to change the status. Something like "Back soon", not "brb". I'm brazilian, so when I want to set  "away" I would say "Ja volto".

With other languages, this menu and the possibility to use 2 words would be pretty useful too.


RE: [Release] Status Interceptor (Updated v1.1) by Vimto on 08-14-2006 at 07:16 PM

I like it. Its such a time saver :D


RE: [Release] Status Interceptor (Updated v1.1) by qgroessl on 08-14-2006 at 07:18 PM

quote:
Originally posted by Intosia
that doesnt look so handy.. When i say "Ill be busy later on" it will change my status to busy???

Agreed.... That's probably the only reason I'm not going to use it.
RE: RE: [Release] Status Interceptor (Updated v1.1) by phalanxii on 08-15-2006 at 06:36 AM

quote:
Originally posted by UTI
quote:
Originally posted by Intosia
that doesnt look so handy.. When i say "Ill be busy later on" it will change my status to busy???

Agreed.... That's probably the only reason I'm not going to use it.

Yes, I agree. I only added in "busy", "lunch" and "dinner" because they were suggestions. If you want the first version which doesn't have these statuses, it's actually at the bottom of the first post.

quote:
Originally posted by phalanxii
Because "busy", "lunch" and "dinner" are very common words, some of you may wish to use Status Interceptor v1.0, where these keywords have not been included.

Once I learn how to integrate windows into the script (if anyone wants to help), I will be able to make the statuses easily toggable (and later custom statuses for non-English users). Until then, you can either stick with either of these two versions, or edit the script to your own preferences. :)
RE: [Release] Status Interceptor (Updated v1.1) by Dave on 08-15-2006 at 09:34 PM

using the first version, on the drop down menu from the plus icon on the contact page, what does the '[  ] Send to all open conversations' button do?


RE: [Release] Status Interceptor (Updated v1.1) by M73A on 08-15-2006 at 09:42 PM

what if i say im going for lunch at 12, will i bet set to out to lunch?


RE: [Release] Status Interceptor (Updated v1.1) by cloudhunter on 08-15-2006 at 10:24 PM

quote:
Originally posted by Dave
using the first version, on the drop down menu from the plus icon on the contact page, what does the '[  ] Send to all open conversations' button do?

Try it... I imagine it sends "BRB" or whatever to all your open conversation windows...

Cloudy
RE: [Release] Status Interceptor (Updated v1.2) by phalanxii on 08-16-2006 at 07:12 AM

Version 1.2 is now released. This contains an actual settings window, where you can toggle which keywords that you want to be detected (for those who don't like "busy", "lunch" and "dinner"). There is also a custom mask for your personal message using "%b", "%k" and "%a".

Change Log:

16th of August 2006 - v1.2

  • Added a settings interface, containing all previous (and new) settings
  • Different status keywords can be toggled for each email (for those who don't want "busy", "lunch" and "dinner")
  • Custom mask for personal message
This will most likely be my final release, though I may update bugs. I may also add in a customisable wordbank, but not anytime soon.

If you want a translation, tell me the translated words and keywords (exact and preferred capitalization helps), and I will see what I can do.
RE: [Release] Status Interceptor (Updated v1.2) by Dave on 08-16-2006 at 09:45 AM

thanks, this looks great.  1 question though, do we need to delete the previous versions before we load this one or will it do it automatically?


RE: RE: [Release] Status Interceptor (Updated v1.2) by phalanxii on 08-16-2006 at 10:13 AM

quote:
Originally posted by Dave
thanks, this looks great.  1 question though, do we need to delete the previous versions before we load this one or will it do it automatically?

No, I think you'll need to delete it yourself. Hope it's not too much of an inconvenience. :)
RE: [Release] Status Interceptor (Updated v1.2) by lrac522 on 08-16-2006 at 08:25 PM

That's very nice. I'm so filled with scripts...:D


RE: [Release] Status Interceptor (Updated v1.2) by PAT.riot73 on 10-01-2006 at 06:09 AM

in v1.3, theres an issue w/ the "send to all open conversations" when you type in "back" or "bak" your status changes but it doesnt send the message to all the open convos

to fix this just replace the function searchmessage in status interceptor.js with this

code:
function SearchMessage(Message)
{
    for(var i = 0; i < 8; i++)
    {
        SplitMessage = Message.toLowerCase().split(StatusKeyword[i], 2);
       
        if(SplitMessage.length > 1 && KeywordSetting.substr(i, 1) == 1)
        {
            //If status change is not to "back" or "bak"
            if(i > 1)
            {
                if(ScriptStatus == "Online")
                {
                    StoredStatus = Messenger.MyStatus;
                    StoredPsm = Messenger.MyPersonalMessage;
                }
            }
           
            ChangeStatus(i);
           
            //If status change is not to "back" or "bak"
            if(i > 1)
                ChangePSM(Message, Message.toLowerCase().search(StatusKeyword[i]), StatusKeyword[i].length);
            break;
        }
    }
}


the difference is i moved the break to an upper nest so the for() loop wouldnt continue to iterate even if the statuskeyword was "back" or "bak"

cheers for the script mate(Y)