v1rtu0s1ty Posted July 21, 2005 Share Posted July 21, 2005 Hi everyone, I need your help again. Can someone please share a code that will save the value of a variable to a text file. Also, the text file should be overwritten everytime it gets executed, and it should NOT grow. $myvar = "This is a sample string" save it to c:\temp\mytemp.txt Thanks, Neil Link to comment Share on other sites More sharing options...
v1rtu0s1ty Posted July 21, 2005 Author Share Posted July 21, 2005 Hi everyone,I need your help again. Can someone please share a code that will save the value of a variable to a text file. Also, the text file should be overwritten everytime it gets executed, and it should NOT grow.$myvar = "This is a sample string"save it to c:\temp\mytemp.txtThanks,Neil<{POST_SNAPBACK}>I got it guys $file = FileOpen("C:\testautoit.txt", 2)FileWriteLine($file, "this is a test");FileClose($file) Link to comment Share on other sites More sharing options...
pecsenye Posted September 1, 2019 Share Posted September 1, 2019 (edited) this is useful! Edited September 1, 2019 by pecsenye Link to comment Share on other sites More sharing options...
Developers Jos Posted September 1, 2019 Developers Share Posted September 1, 2019 9 hours ago, pecsenye said: this is useful! This is an 14 years old thread you ressurected just for that? Please don't! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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