Jump to content

Recommended Posts

Posted

i have done this small search in text file using keyword but need improvment help me to improve this okay check this code

need to put

1 - www and http:// websites found sapreated line by line

#include <Array.au3>

#include <GUIConstants.au3>

GUICreate("TEST SEARCH") 

$myedit=GUICtrlCreateEdit (""& @CRLF, 1,50,400,300,$ES_AUTOVSCROLL+$WS_VSCROLL)

GUISetState ()

Dim $DLine

$Text = "test.txt"

$NFile = FileOpen($Text, 0)

If $NFile = -1 Then

    MsgBox(0, "Error", "Unable to open file.")

EndIf

Dim $Data_[101], $newID=""

While 1

    $NLine = FileReadLine($NFile)

    If @error = -1 Then ExitLoop

        If $NLine <> "" Then

            if StringInStr( $NLine, "http://") Then

            $DLine = $NLine

  GUICtrlSetData( $myedit, $DLine & @CRLF,1)

  EndIf

     

    EndIf

WEnd

FileClose($NFile)

While 1

    $msg = GUIGetMsg()

   

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...