theguy0000 Posted August 19, 2005 Share Posted August 19, 2005 how do i save and open files? The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Valuater Posted August 19, 2005 Share Posted August 19, 2005 save what type of file for what type of use... ini, txt,etc and open to use as ??? 8) Link to comment Share on other sites More sharing options...
theguy0000 Posted August 19, 2005 Author Share Posted August 19, 2005 (edited) i would need to use .txtand .mod files (.mod is basically .txt with a different exotension). ok heres what i need: have the user enter a few things in a GUI, then add a few things before and after what the user enters. confused? how about an example: the user enters Joe. save this as a txt file: Your name is Joe! Edited August 19, 2005 by theguy0000 The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Valuater Posted August 19, 2005 Share Posted August 19, 2005 heres a test for ya $answer = InputBox("Question", "Where were you born?", "Planet Earth", "", _ -1, -1, 0, 0) FileOpen("text.txt", 1); to write FileWriteLine("Test.txt", "You were born on " & $answer & ", and your mama too!");lol FileClose("text.txt") ; later $file = FileOpen("test.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop MsgBox(0, "Line read:", $line) Wend FileClose($file) hope it helps 8) Link to comment Share on other sites More sharing options...
theguy0000 Posted August 19, 2005 Author Share Posted August 19, 2005 works perfect, thanks! The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
w0uter Posted August 19, 2005 Share Posted August 19, 2005 FileOpen("text.txt", 1); to write FileWriteLine("Test.txt", "You were born on " & $answer & ", and your mama too!");lol FileClose("text.txt") IIRC it should be $h_file = FileOpen("text.txt", 1); to write FileWriteLine($h_file, "You were born on " & $answer & ", and your mama too!");lol FileClose($h_file) My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now