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 |
|
|
ShawnZ
Veteran Member
Posts: 3146 Reputation: 43
32 / /
Joined: Jan 2003
|
RE: How wo Run a Program through Javascript
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 |
|
|
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 |
|
|
ShawnZ
Veteran Member
Posts: 3146 Reputation: 43
32 / /
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 |
|
|
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
This post was edited on 07-06-2006 at 12:44 AM by Joereynolds89.
|
|
07-06-2006 12:40 AM |
|
|
alexp2_ad
Scripting Contest Winner
Who love the chocolate?
Posts: 691 Reputation: 26
37 / / –
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 |
|
|
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 |
|
|
Lou
Veteran Member
Posts: 2475 Reputation: 43
– / /
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.
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 |
|
|
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 |
|
|
Keikonium
Full Member
Posts: 229 Reputation: 3
35 / /
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 (which are useless here ).
Just trying to help out . Good luck!
|
|
07-06-2006 01:08 AM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|