What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Replace Text

Replace Text
Author: Message:
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. Replace Text
Hey guys,

I'm very, very new to scripting and I'm looking for a little help.  I've tried searching the forums but havent found anything I understand.

Basically I need to open a HTTP link.  I;ve done some previous scripting in mIRC but obviously plus is quite different.

All I need is to send a line to be processed into HTML.  The only thing I need for this function really, is to replace all spaces with %20 so that the HTTP will be transmitted right.

I couldn't find the replace in any form I understood - would anyone maybe be able to explain it to me?

Cheers
[Image: adsig.jpg]
03-23-2007 02:47 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Replace Text
code:
function _replace(_stext){
    _stext.replace(/ /g, '%20');
}
03-23-2007 03:24 AM
Profile E-Mail PM Find Quote Report
phalanxii
Full Member
***


Posts: 146
Reputation: 5
32 / Male / Flag
Joined: Aug 2006
Status: Away
RE: Replace Text
You can also use this (click here):
code:
encodeURI(URIString)
03-23-2007 07:02 AM
Profile PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. RE: Replace Text
ok, cheers guys.  thats perfect.
Thanks for putting the replace in that way, I think I'll be able to use it ok now.
And cheers for the encodeURI suggestion - I think that will actually solve my problem perfectly.
thanks all
[Image: adsig.jpg]
03-23-2007 01:30 PM
Profile E-Mail PM Web Find Quote Report
« 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