What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » How wo Run a Program through Javascript

Pages: (2): « First « 1 [ 2 ] Last »
How wo Run a Program through Javascript
Author: Message:
Pai
Full Member
***

w00t !

Posts: 203
Reputation: 2
– / Male / –
Joined: Sep 2003
RE: How wo Run a Program through Javascript
You need double-slashes, ie C:\\Pro...

use this:
code:
new ActiveXObject("wscript.shell").run('C:\\Program Files\\Windows Media Player\\wmplayer.exe');
07-06-2006 02:01 AM
Profile PM Find Quote Report
wlmcrap
Junior Member
**

Avatar
David

Posts: 71
Reputation: -6
31 / Male / –
Joined: Jul 2006
RE: How wo Run a Program through Javascript
Heres another way:


function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if(Message == "!wmp")
{
ChatWnd.SendMessage("/run C:\\Program Files\\Windows Media Player\\wmplayer.exe");
return "";
}
}
07-06-2006 09:48 PM
Profile E-Mail PM Web Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
O.P. RE: How wo Run a Program through Javascript
yer i figured that out, sorry i havnt had time to get roudn to posting it for you wlmcrap but you foudn it yourself :P

EDIT:

Mine shows this though


[Code]function OnEvent_Initialize(MessengerStart)
{
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if(Message == "/WMP")
{
ChatWnd.SendMessage("/run C:\\Program Files\\Windows Media Player\\wmplayer.exe");
MsgPlus.DisplayToast("WMP", "WMP is Loading...", 'notify.mp3', "", "");
return "";
}
}
function OnEvent_Uninitialize(MessengerExit)
{
}[/code]

For notify to work it needs to be installed in the directory with the script just incase you didnt no :P



.plsc File Attachment: Window Media Player.plsc (27.08 KB)
This file has been downloaded 125 time(s).

This post was edited on 07-07-2006 at 02:16 PM by Joereynolds89.
07-06-2006 09:53 PM
Profile E-Mail PM Find Quote Report
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: How wo Run a Program through Javascript
to display toast on error:

code:
function OnEvent_Initialize(MessengerStart)
{
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if(Message == "/WMP")
{
try{
ChatWnd.SendMessage("/run C:\\Program Files\\Windows Media Player\\wmplayer.exe");
MsgPlus.DisplayToast("WMP", "WMP is Loading...", 'notify.mp3', "", "");
}catch(err){
MsgPlus.DisplayToast("WMP", "Loading WMP failed", 'notify.mp3', "", "");
}
return "";
}
}
function OnEvent_Uninitialize(MessengerExit)
{
}



07-06-2006 10:31 PM
Profile E-Mail 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