quote:
Originally posted by rtsfg
Be, careful, you're using Jscript, which is not JavaScript.
You could use this:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
//find out if its a web address...
if (Message.substr(0,4) == "www." || Message.substr(0,7) == "http://")
new ActiveXObject("WScript.Shell").run(Message);
}
The "find out" part should work with some substr...
edit: like this, for example.
btw, I would never use a script like this, who knows what kind of addresses you'll recieve
That only finds addresses at the start of a message and could open a webpage called "www.google.com <-- Check this out" which wouldn't work
Best option is to use
string.search and a RegExp