Necromorph Posted March 20, 2010 Posted March 20, 2010 just looking for some tips on the best way to do this i want to write information to at .txt, i use @ComputerName to separate all of my entries is there a way to do a file read for the @ComputerName as a variable and say if it exists in the .txt then , msgbox an error?
l3ill Posted March 20, 2010 Posted March 20, 2010 This possibly the answer to the first part of your question: #include<Date.au3> $file = FileOpen("mytest.txt", 1) ; Check if file opened for writing OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWriteLine($file, @ComputerName & @crlf) FileWriteLine($file, _NowDate()) Not sure what you mean about the other, but it sounds like "IsKeyword" might do the trick Good Luck! My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
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