This uses the messenger api (as opening/closing is a function in it):
To open it:
code:
var MessengerAPI = new ActiveXObject('Messenger.UIAutomation.1');
var MessengerWnd = MessengerAPI.IMessengerWindow;
MessengerWnd = MessengerAPI.Window;
MessengerWnd.Show();
To close it:
code:
var MessengerAPI = new ActiveXObject('Messenger.UIAutomation.1');
var MessengerWnd = MessengerAPI.IMessengerWindow;
MessengerWnd = MessengerAPI.Window;
MessengerWnd.Close();
To toggle it (Window.IsClosed is a boolean that says if its closed or not
):
code:
var MessengerAPI = new ActiveXObject('Messenger.UIAutomation.1');
var MessengerWnd = MessengerAPI.IMessengerWindow;
MessengerWnd = MessengerAPI.Window;
if(MessengerWnd.IsClosed == true){
MessengerWnd.Show();
} else {
MessengerWnd.Close();
}