Writing to a file!
Posted: Mon Jan 29, 2007 7:18 pm
Hey!
I am trying to make a little program and I was wondering how I can write variable to a text file!
Here is my gadget code:
And for case 4 I have the following code:
Now I need to know how I can write the text which is inputted into the string box....
Many regards
Mindtrick
I am trying to make a little program and I was wondering how I can write variable to a text file!
Here is my gadget code:
Code: Select all
If CreateGadgetList(WindowID(0))
StringGadget(0 , 100 , 50 , 400 , 20 , "")
TextGadget(1 , 20 , 55 , 100 , 20 , "Website Title:")
EditorGadget(2 , 100 , 100 , 400 , 200)
TextGadget(3 , 20 , 105 , 100 , 20 , "Page Text:")
ButtonGadget(4 , 20 , 410 , 600 , 20 , "Compile Webpage!")
EndIf
Code: Select all
Case 4
file$ = SaveFileRequester("Save" , "" , "HTML Files (*.html)|*.html",0)
OpenFile(0 , file$+".html")
WriteStringN(0 , "<html>")
WriteStringN(0 , "<title>")
WriteStringN(0 , "</html>")
CloseFile(0)
Many regards
Mindtrick