What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Script that opens/closes/signs in/signs out Skype when I do the same in WLM

Pages: (2): « First [ 1 ] 2 » Last »
Script that opens/closes/signs in/signs out Skype when I do the same in WLM
Author: Message:
riahc4
Veteran Member
*****


Posts: 1073
Reputation: -18
– / Male / Flag
Joined: Aug 2004
Status: Away
O.P. Script that opens/closes/signs in/signs out Skype when I do the same in WLM
Hey

I was wondering if it is possible to make a script that when I

Sign out of WLM, it signs out of Skype.
Sign in of WLM, it signs into Skype
If the WLM program is closed (process killed), Skype closes (Skype's process killed)
If the WLM program is opened (process started), Skype starts (Skype's process started)

Thank you :)
03-24-2010 01:45 AM
Profile PM Find Quote Report
Voldemort
Veteran Member
*****

Avatar

Posts: 3504
Reputation: 49
– / – / Flag
Joined: Jul 2005
Status: Away
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM
quote:
Originally posted by riahc4
If the WLM program is closed (process killed), Skype closes (Skype's process killed)
how will a process that isn't running anymore kill another process??
quote:
Originally posted by riahc4
Sign out of WLM, it signs out of Skype.

IIRC, scripts are disabled after you log out... but I might be wrong.
*All posts are a purely speculative hypothesis based on abstract reasoning.
Not my daughter, you bitch!
[Image: ico-mollytrix16.gif]
03-24-2010 02:39 AM
Profile E-Mail PM Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
32 / Male / Flag
Joined: Dec 2004
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM
Restart on Crash is a program which is intended to restart a program if it crashes/closes, however you can set it to run Skype instead.

There's also another 5 similar programs here which could do the job.
Twitter: @ChrisLozeau
03-24-2010 02:53 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM
quote:
Originally posted by Voldemort
quote:
Originally posted by riahc4
If the WLM program is closed (process killed), Skype closes (Skype's process killed)
how will a process that isn't running anymore kill another process??
Indeed it can't.

But a Plus! script could attempt close Skype (never 'kill' a process to quite an application. That is bad practice) when the event
OnEvent_Uninitialize is fired and the MessengerExit parameter is set to true.

The same for starting Skype: use the event OnEvent_Initialize and check if MessengerStart is true.

quote:
Originally posted by Voldemort
quote:
Originally posted by riahc4
Sign out of WLM, it signs out of Skype.
IIRC, scripts are disabled after you log out... but I might be wrong.
Nope, scripts start running the moment you open Messenger (well, after all the initialization of Messenger and Plus! is done of course), and keep on running until you quit Messenger.

Logging in or out simply fires another event in the running scripts, it doesn't start or stop scripts.

So, those Signin and Signout events can be used to send an instructions to Skype to do the same thing (if Skype provides such a mechanism in the first place of course - dunno) occording to what user signs in or out in Messenger and what user is signed in in Skype.


- Messenger starts
- Plus! gets loaded
- All enabled scripts are started
=> for each script the OnEvent_Initialize event is fired with MessengerStart set to True.

...

- User logs in
=> for each script the OnEvent_Signin event is fired

- The whole logging in process completes
=> for each script the OnEvent_SigninReady event is fired

...

- User logs out
=> for each script the OnEvent_Signout event is fired

...

- User quits Messenger
=> for each script the OnEvent_Uninitialize event is fired with MessengerExit set to True.

- Plus! stops all running scripts
- Plus! unloads itself
- Messenger quits

This post was edited on 03-24-2010 at 12:44 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-24-2010 12:35 PM
Profile PM Find Quote Report
riahc4
Veteran Member
*****


Posts: 1073
Reputation: -18
– / Male / Flag
Joined: Aug 2004
Status: Away
O.P. RE: RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM
quote:
Originally posted by Voldemort
quote:
Originally posted by riahc4
If the WLM program is closed (process killed), Skype closes (Skype's process killed)
how will a process that isn't running anymore kill another process??

When the exit command is hit in Messenger, right before that, it kills Skype then kills itself.
03-24-2010 10:48 PM
Profile PM Find Quote Report
Chrissy
Senior Member
****

Avatar

Posts: 850
Reputation: 5
29 / Male / Flag
Joined: Nov 2009
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM
So you want the exit command changed to, do something then exit.
03-24-2010 11:05 PM
Profile E-Mail PM Web Find Quote Report
riahc4
Veteran Member
*****


Posts: 1073
Reputation: -18
– / Male / Flag
Joined: Aug 2004
Status: Away
O.P. RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM
quote:
Originally posted by krissy-afc
So you want the exit command changed to, do something then exit.
Basically, yes
03-24-2010 11:29 PM
Profile PM Find Quote Report
Chrissy
Senior Member
****

Avatar

Posts: 850
Reputation: 5
29 / Male / Flag
Joined: Nov 2009
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM
I'm almost 100& sure that's not possible.
03-24-2010 11:55 PM
Profile E-Mail PM Web Find Quote Report
andrey
elite shoutboxer
****

Avatar

Posts: 795
Reputation: 48
– / Male / Flag
Joined: Aug 2004
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM
Shutting down Skype when closing WLM should be pretty easy to do as Skype itself provides a /shutdown command-line parameter. So all you'd need is:
JScript code:
function OnEvent_Uninitialize(MessengerExit)
{
    if (MessengerExit) {
        var w = new ActiveXObject("WScript.Shell");
        w.run("skype.exe /shutdown");
    }
}

to close Skype whenever WLM is closed.

(haven't tested this though, due to lack of Skype)

So you should be able to start/stop Skype, not sure if it's possible to sign in/out of Skype like that as well.

This post was edited on 03-25-2010 at 12:25 AM by andrey.
[Image: w2kzw8qp-sq2_dz_b_xmas.png]
03-25-2010 12:23 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM
quote:
Originally posted by krissy-afc
quote:
Originally posted by riahc4
quote:
Originally posted by krissy-afc
quote:
Originally posted by riahc4
quote:
Originally posted by Voldemort
quote:
Originally posted by riahc4
If the WLM program is closed (process killed), Skype closes (Skype's process killed)
how will a process that isn't running anymore kill another process??
When the exit command is hit in Messenger, right before that, it kills Skype then kills itself.
So you want the exit command changed to, do something then exit.
Basically, yes
I'm almost 100& sure that's not possible.

riahc4 and krissy-afc, I just posted what the script must do and what events to use (so, yes, it is 100% possible), do you actually read posts? :dodgy:

This post was edited on 03-25-2010 at 11:58 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-25-2010 07:13 AM
Profile PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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