Shoutbox

Change Status When Specific Contact Signs In? - 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: Change Status When Specific Contact Signs In? (/showthread.php?tid=85331)

Change Status When Specific Contact Signs In? by pcls15036 on 08-11-2008 at 08:42 PM

Hi all!

Is there a script that can change my status to online when a specific contact signs in? If not, how would I go about it (I don't really know very much at all about scripts).

Any help appreciated
Richard
:)


RE: Change Status When Specific Contact Signs In? by Shining One on 08-12-2008 at 04:34 PM

It's nice idea but I don't see any script like this.
I hope that the developers create this script. By scripting, everything is possibel.


RE: Change Status When Specific Contact Signs In? by matty on 08-12-2008 at 06:48 PM

Clearly you want to change johndoe@hotmail.com to the email address you want this to happen with.

code:
function OnEvent_ContactSignin(sEmail) {
    if ( sEmail === 'johndoe@hotmail.com' ) Messenger.MyStatus = STATUS_ONLINE;
}

RE: Change Status When Specific Contact Signs In? by Matti on 08-12-2008 at 07:01 PM

The code posted by matty is correct. Although I assume you don't know how to make a script from it, so I'll explain you:

  1. Open your Messenger Plus! Live preferences. This can be done from the contact list (click the Plus! toolbar button and choose "Preferences") or from any chat window. (send "/prefs")
  2. Go to the panel "Scripts".
  3. Next to "Developers only:", click "Create New".
  4. Give your script a name, something like "Change Status When Someone Signs In" or whatever you want.
  5. The Script Editor will open. Select everything and delete it.
  6. Copy-paste matty's code into the window. Change the e-mail address to the address of the person you want and click "Save All". You'll see that the debug area will read:
    quote:
    Script has been stopped
    Script is starting
    Script is now loaded and ready
  7. Now, try it out! When that contact signs in, your status should change to online automatically.
You can enable and disable the script from the Plus! Live preferences window in the Scripts panel by (un)checking it in the list and clicking OK or Apply. This is a very simple script, but it should function without any problems.
RE: Change Status When Specific Contact Signs In? by Basilis on 08-12-2008 at 10:43 PM

The code works. Thank you Matty and Mattike. Great idea pcls15036! :) But how can I set it to change my status to online for more than one contacts?


RE: Change Status When Specific Contact Signs In? by matty on 08-13-2008 at 06:47 AM

keep adding

code:
|| sEmail === 'johndoe2@gmail.com'
to the if line as follows
code:
function OnEvent_ContactSignin(sEmail) {
    if ( sEmail === 'johndoe@hotmail.com' || sEmail === 'johndoe2@gmail.com' ) Messenger.MyStatus = STATUS_ONLINE;
}

RE: RE: Change Status When Specific Contact Signs In? by pcls15036 on 08-13-2008 at 09:43 PM

quote:
Originally posted by matty
Clearly you want to change johndoe@hotmail.com to the email address you want this to happen with.

code:
function OnEvent_ContactSignin(sEmail) {
    if ( sEmail === 'johndoe@hotmail.com' ) Messenger.MyStatus = STATUS_ONLINE;
}


Thanks a lot for the script! :D ... and the one further down for additional e-mail addresses! :D

quote:
Originally posted by Mattike
The code posted by matty is correct. Although I assume you don't know how to make a script from it, so I'll explain you:
  1. Open your Messenger Plus! Live preferences. This can be done from the contact list (click the Plus! toolbar button and choose "Preferences") or from any chat window. (send "/prefs")
  2. Go to the panel "Scripts".
  3. Next to "Developers only:", click "Create New".
  4. Give your script a name, something like "Change Status When Someone Signs In" or whatever you want.
  5. The Script Editor will open. Select everything and delete it.
  6. Copy-paste matty's code into the window. Change the e-mail address to the address of the person you want and click "Save All". You'll see that the debug area will read:
    quote:
    Script has been stopped
    Script is starting
    Script is now loaded and ready
  7. Now, try it out! When that contact signs in, your status should change to online automatically.
You can enable and disable the script from the Plus! Live preferences window in the Scripts panel by (un)checking it in the list and clicking OK or Apply. This is a very simple script, but it should function without any problems.

With the teensy bit of ready of the documentation thingy, sorry I can't remember it's full name :$ lol ... I had just about figured this, but thanks for the reminder instead of having to find it all again. Very much appreciated. Thanks to both of you!
RE: Change Status When Specific Contact Signs In? by djdannyp on 08-13-2008 at 10:47 PM

hmm, it's a good script, but i've spotted a bit of a flaw

what happens if you're away from your computer and it changes your status to online and that person then tries to talk to you thinking that you're online when infact you're not at your computer?

if a way around this can be found then i'd like to help with further development of the script and possibly include a menu to help auto-input the e-mail details, etc so that it doesn't involve script editing for anyone who wants to use it


RE: Change Status When Specific Contact Signs In? by Basilis on 08-13-2008 at 11:14 PM

I could help with creating the options panel and the about window. Also, an idea came to my mind. We could make it so that you can select for which contacts your status will be changed and then select what your status will be. So the user will have the option to select how his status will be changed. It could also have an option ( referring to djdannyp) in which an auto-reply would be send if you don't answer in a specified time.


RE: Change Status When Specific Contact Signs In? by matty on 08-14-2008 at 06:14 AM

I don't see the point in bloating such a simplistic script. But whatever you guys want to do go for it. We are always here to help out.


RE: Change Status When Specific Contact Signs In? by djdannyp on 08-14-2008 at 04:08 PM

Thanks matty, I know it might be a lot to ask, but I think I really want to make a go of this script and turn it into something very user friendly.

I'm trying to pick up bits of code as I'm going along and working from other scripts to figure out exactly how to make stuff work.

What i'd like help with at first is how to get a simple pop-up box to come up when selected via the menu (i've already put the menu together) so that it comes up asking for the e-mail address of the specific contact and then gives a dropdown box asking what status you want to change to when they come online and then for them to press "okay" and the information get added into the script.

the next stage will be to add a "temporarily disable" feature which i'm gonna search around and see what i can find on that, but i may well need your help

(btw, ur getting pretty much all the credit for this, lol.....i'm just kinda putting it together and trying to learn)


RE: Change Status When Specific Contact Signs In? by djdannyp on 08-15-2008 at 02:09 PM

Well, I've put all the GUI and menus together, etc

Just need the code now, lol.

I don't know how to get the script to read the input from the form and add it to the code into the form:

if ( sEmail === [inputted e-mail] ) Messenger.MyStatus = [Chosen_Status];


i'm guessing this is fairly simple to do?

could anyone give me any pointers?