Sign in to follow this  
Followers 0
Necromorph

fileRead for a "$var"

2 posts in this topic

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?

Share this post


Link to post
Share on other sites



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!

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