Sign in to follow this  
Followers 0
Spikeedoodles

Saving Web Page to INI file

2 posts in this topic

#1 ·  Posted (edited)

So I have a web page on my domain that is formatted exactly like an .ini file.  When the webpage is opened, it looks like:

 

[Text]

Text=Text

Text=Text

[Text]

Text=Text

This is all done in plain text, by the way

I want to take this list and basically save it locally to an ini file.  The reason for this is because I have users filling out an online form which get sent to this file.

Right now, I have this:

#include <Inet.au3>
local $getList, $src
$getList=InputBox ("Get the List", "BlahBlah", "http://domain/test/list.txt")
$src=_INetGetSource ($getList, True)
FileWrite ("test.ini", $src)

When I open the text file, the FileWrite command wrote the file as all one line, so it looks like:

[Text]Text=TextText=Text[Text]Text=Text

How could I make this to format correctly?

Thanks for the help everyone!

EDIT:  I should add that when I view the variable $src in an msgbox, it formats correctly, only when i make a file does it format all in one line

Edited by Spikeedoodles

Share this post


Link to post
Share on other sites



I figured out how to do it.  I really should have searched before posting.  That's my bad.  For anyone else who experiences this problem, try string replacement, like so:

$src=StringReplace ($src, @LF, @CRLF)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0