Sign in to follow this  
Followers 0
keilamym

Looking for text in a file

5 posts in this topic

Do anyone know the autoit command to look for text in a file. I'd like auto it look in an inventory.log file and let me know if "timed out' exist. i thought i saw this on the site a while back but cant seem to find it...

Any assistance is appreciated..

Keilamym

Share this post


Link to post
Share on other sites



look for FileRead in the help file

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

newbiescripter

i use fileopen and fileread often.. i also use the while 1 command to send scripts into loops until the end of the file is reached.. but is there a way to have autoit actually look for "timed out" in the line? in the past, i has ping results read into an array and used the stdout, but the file is to for that. (atleast i think)

again.. any assistance is appreciated.

Edited by keilamym

Share this post


Link to post
Share on other sites

If StringInStr(FileRead("inventory.log"), "timed out") Then

;Found

Else

;Not found

EndIf

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

If StringInStr(FileRead("inventory.log"), "timed out") Then

;Found

Else

;Not found

EndIf

THANKS... thats all i need to get me started...

Edited by keilamym

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