What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Make a script get content from a website

Make a script get content from a website
Author: Message:
gabrielkfl
New Member
*


Posts: 2
Joined: Mar 2011
O.P. Make a script get content from a website
Put simply, what I want is a function that get the content of a text file hosted in the web into a string. Something like this:

var content = download( "http://www.example.com/whatever.txt" );

Now the reason I want this is because I want my script to realize when updates are available online. If there's no way to get the content from the page, anything that allows me to check a status on the web will do. For example, it could check if a certain page exists, like this:

var exists = checkIfPageExists( "http://www.example.com/whatever.txt" );

Anything that allows me to check for updates to my script.



EDIT:
Oops, looks like the script I was searching for already exists.
I found it here: http://mpscripts.net/code.php?id=19

Very cool script, does EXACTLY what I wanted it to. Just found a couple bugs in it, and changed one or two tiny bits, but overall it's perfect.

I'm just gonna leave this page here in case someone shows up with the same doubt.

This post was edited on 03-09-2011 at 05:34 AM by gabrielkfl.
03-09-2011 04:15 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Make a script get content from a website
However relying on your own code to do this isn't always the best option.

An alternative is to define the version information in the ScriptInfo.xml file and Plus! will automatically check the online database for a newer version (obviously once it is back up and online).

XML code:
<?xml version="1.0" encoding="UTF-16"?>
<ScriptInfo xmlns="urn:msgplus:scripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:msgplus:scripts PlusScripts.xsd">
    <Information>
        <Name>Screenshot Sender</Name>
        <Description>Allows you to easily send screenshots to your contacts.</Description>
        <Author>matty, Mattias &amp; Dempsey</Author>
        <AboutUrl>http://beta.screenshotsender.com</AboutUrl>
        <Version>5</Version>
        <UpdateId>SS5</UpdateId>        <Build>0062</Build>    </Information>
</ScriptInfo>

03-09-2011 01:39 PM
Profile E-Mail PM Find Quote Report
gabrielkfl
New Member
*


Posts: 2
Joined: Mar 2011
O.P. RE: Make a script get content from a website
Okay, but where do I upload my script so that plus checks if it's updated?
03-11-2011 12:19 AM
Profile E-Mail PM Find Quote Report
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
RE: Make a script get content from a website
You need to submit it to the Scripts Database.  You'll need a MyPlus! account (sign up or login here) to add contributions, which you can do from here.
03-11-2011 08:25 PM
Profile E-Mail PM 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