Shoutbox

Script that opens/closes/signs in/signs out Skype when I do the same in WLM - 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: Script that opens/closes/signs in/signs out Skype when I do the same in WLM (/showthread.php?tid=94198)

Script that opens/closes/signs in/signs out Skype when I do the same in WLM by riahc4 on 03-24-2010 at 01:45 AM

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 :)


RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by Voldemort on 03-24-2010 at 02:39 AM

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.
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by Chris4 on 03-24-2010 at 02:53 AM

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.


RE: RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by CookieRevised on 03-24-2010 at 12:35 PM

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

RE: RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by riahc4 on 03-24-2010 at 10:48 PM

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.
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by Chrissy on 03-24-2010 at 11:05 PM

So you want the exit command changed to, do something then exit.


RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by riahc4 on 03-24-2010 at 11:29 PM

quote:
Originally posted by krissy-afc
So you want the exit command changed to, do something then exit.
Basically, yes
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by Chrissy on 03-24-2010 at 11:55 PM

I'm almost 100& sure that's not possible.


RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by andrey on 03-25-2010 at 12:23 AM

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.
RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by CookieRevised on 03-25-2010 at 07:13 AM

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:

RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by Veggie on 03-25-2010 at 11:16 AM

https://developer.skype.com/Docs/Skype4COM


RE: Script that opens/closes/signs in/signs out Skype when I do the same in WLM by Felu on 03-25-2010 at 02:24 PM

There was once a script called SkypeSync Live. ([Release] SkypeSync Live V1.00) Maybe you could look into it and modify it to get what you need. If you're looking to do something from scratch, the link provided by Veggie looks good enough.

Edit: Didn't WDZ add [tid=xyz] :/ ?