O.P. Tips
A collection of tips relating to scripting.
ActiveX Objects
You can access ActiveX objects just like you can using IE.
var ob = new ActiveXObject("name here");
if(ob == false)
{
Debug.trace("ActiveX objection creation failed");
}
Starting a program:
var shell = new ActiveXObject("wscript.shell");
shell.Run("notepad.exe");
(Will start notepad.exe)
Changing a message being sent:
You can return a message from the ChatWndSendMessage function and it will change the message before it is sent. If you don't return a message, the intercepted message will be sent.
The following code will replace all instances of hi with test.
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
{
return sMessage.replace("hi", "test");
}
|