Page 1 of 1

How to read contents of a text file in skydrive

Posted: Wed Nov 12, 2008 10:21 am
by user#606
I have a simple text file created by notepad and it contains a simple string. example version 4.9
I wish to read the contents of this text file within the main program and if 4.9 is greater than the CurrentReference which is (say) 4.5 then do something, else do nothing and move on.

the file is at
http://cid-a5bbe4d308b2f553.skydrive.li ... ersion.txt

I cannot find suitable code to do this, can anyone help?

Posted: Wed Nov 12, 2008 10:31 am
by Mark
Dear User,

To put an on-line file into a variable, you can the following line:

Code: Select all

put url "http://cid-a5bbe4d308b2f553.skydrive.live.com/self.aspx/version/version.txt" into myVar
and to compare two values you can use the code

Code: Select all

if myVar1 >= myVar2 then
I can't see the file on the live.com domain.

Best,

Mark

To put an on-line file into a variable

Posted: Wed Nov 12, 2008 11:11 am
by user#606
Thank you for that, I thought it would be more difficult than that and the manual was not clear enough.

I understand what you mean about not finding the file. The link only points to the web page. Oh well! back to the drawing board.

What I am trying to achieve is to provide an automatic software update facility, so the reason for the text file is to provide an easy way to check the version.
If I use the software name directly, the link changes, even if the previous file is deleted and the new one put in the same folder. Most frustrating.

Reading contents of file on line

Posted: Wed Nov 12, 2008 11:44 am
by user#606
It appears the actual file has a different address. Now I can get it, this works perfectly.
Thank you for pointing me in the right direction.

Posted: Wed Nov 12, 2008 2:25 pm
by Mark
Dear User,

As a very simple example, try this in the message box:

Code: Select all

answer information url "http://economy-x-talk.com/update/colorconverter.upd"
Best regards,

Mark