What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Auto Web Address Opener

1 votes - 5 average   Auto Web Address Opener
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Auto Web Address Opener
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 :S

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
<Eljay> "Problems encountered: shit blew up" :zippy:
04-01-2009 12:18 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Auto Web Address Opener - by Barneyvxd on 03-31-2009 at 10:29 PM
RE: Auto Web Address Opener - by rtsfg on 04-01-2009 at 10:56 AM
RE: Auto Web Address Opener - by James Potter on 04-01-2009 at 11:19 AM
RE: Auto Web Address Opener - by Spunky on 04-01-2009 at 12:18 PM
RE: Auto Web Address Opener - by matty on 04-01-2009 at 01:12 PM


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