Jump to content
Sign in to follow this  

Text Search

Recommended Posts


I was just wondering if their is anyway in Auto It to scan only the currently line of text in the document you are in and do something if it finds a line of text. Ive been trying to figure this out, but havent made any progress; so may be some of you Auto It Kings :lmao: can help me here?

Here is the code ive been messing with.

$a = AutoItWinGetTitle()

$b = FileOpen ( $a, 2 )

While 1
If FileReadLine( $b ) = "Error " Then
    ToolTip("I can fix that.")


And thanks for your time. (And hopefuly answer too ;) )

Edited by S.C.G.R.

Share this post

Link to post
Share on other sites

$File = Fileopen ("file.txt", 0)

While 1
    $line = FileReadLine($file)
        If @error = -1 Then ExitLoop
        If not StringinStr ($Line, "Text of line you want") > 0 then

;;;;do what you want here

FileClose ($File)

Edited by ChrisL

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.