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:
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
O.P. How wo Run a Program through Javascript
I need to run a program through javascript, mainly to answer someone elses thread but also to try to teach myself how to script

The person im trying to help while teaching myself
http://shoutbox.menthix.net/showthread.php?tid=62632

so far i have

quote:
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
{
  if (sMessage == "/WMP")
  {
(Whatever command needed to run the program here, default directory for application is C:\Program Files\Windows Media Player\wmplayer.exe as far as i know)
    return "";
  }
  else
  {
  MsgPlus.DisplayToast("WMP", "Loading WMP Failed");
  }
}


Any help will be greatly appreciated!

Regards, Joe
07-06-2006 12:18 AM
Profile E-Mail PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: How wo Run a Program through Javascript
http://shoutbox.menthix.net/showthread.php?pid=679035
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
07-06-2006 12:27 AM
Profile PM Web Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
O.P. RE: How wo Run a Program through Javascript
Ok Shawnz ive used what you stated in that forum but i dont understand how you have it working?? could you please assist or someone??
quote:
function OnEvent_Initialize(MessengerStart)
{
}
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
{
  if (sMessage == "/WMP")
  {
    var WSS = new ActiveXObject("WScript.Shell");
    return WSS.Run("C:\Program Files\Windows Media Player\wmplayer.exe");
  }
  else
  {
  MsgPlus.DisplayToast("WMP", "Loading WMP Failed");
  }
}
function OnEvent_Uninitialize(MessengerExit)
{
}

07-06-2006 12:36 AM
Profile E-Mail PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: How wo Run a Program through Javascript
why is that else there..
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
07-06-2006 12:38 AM
Profile PM Web Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
O.P. RE: How wo Run a Program through Javascript
incase the function fails? it displays a toast notifying you?

EDIT: apart from it notifys you its failed everytime you write anything :S

This post was edited on 07-06-2006 at 12:44 AM by Joereynolds89.
07-06-2006 12:40 AM
Profile E-Mail PM Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
36 / Male / –
Joined: May 2004
Status: Away
RE: RE: How wo Run a Program through Javascript
quote:
Originally posted by Joereynolds89
incase the function fails? it displays a toast notifying you?

Lol, that sends a toast for every message that isn't /WMP
07-06-2006 12:43 AM
Profile E-Mail PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
O.P. RE: How wo Run a Program through Javascript
yer i just noticed that :( can you give me any help on the script itself then, it is my first try and i dont even no php or anything yet only liek basic html lmao :(
07-06-2006 12:44 AM
Profile E-Mail PM Find Quote Report
Lou
Veteran Member
*****

Avatar

Posts: 2475
Reputation: 43
– / Male / Flag
Joined: Aug 2004
RE: How wo Run a Program through Javascript
quote:
Originally posted by Joereynolds89
Javascript
It's not javascript. It's the similar language, Jscript.
quote:
Originally posted by Joereynolds89
php
quote:
Originally posted by Joereynolds89
html
Where do any of these come in?

I think you should read the scripting documentations if you have not already done so, to understand how scripts are written.
[Image: msghelp.net.png]
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
07-06-2006 12:53 AM
Profile PM Web Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
O.P. RE: How wo Run a Program through Javascript
With php and Html i was just saying i have no knowledge of scripting or programming anywhere, therefore its very hard, if a type of programming/scripting etc is already known its much easier to understand and catch onto new ones!

i have read the scripting documentations i just cant see anything telling me how to run an app through Jscript
07-06-2006 01:00 AM
Profile E-Mail PM Find Quote Report
Keikonium
Full Member
***


Posts: 229
Reputation: 3
35 / Male / Flag
Joined: Jul 2006
RE: How wo Run a Program through Javascript
code:
function fnShellExecuteJ()
{
var objShell = new ActiveXObject("Shell.Application");

objShell.ShellExecute("C:\Program Files\Windows Media Player\wmplayer.exe", "", "", "open", 1);
}

^^ Found that here but I don't know if its what you are looking for, or if it would even work lol. I don't have the first clue about coding unless its php or html (A) (which are useless here ;)).

Just trying to help out :). Good luck! (Y)
07-06-2006 01:08 AM
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