Sign in to follow this  
Followers 0
Clever1mba

Search in text file

1 post in this topic

#1 ·  Posted (edited)

hello

i m back with new problem hope u guyz give me solution

bec i always get solution at this forum

here is my code

test.txt file contain lots of text but we just find DATES: in test.txt file

dates contain like this

dates:01/05/05

dates:02/05/05 etc

we use dates as keyword

#include <Array.au3>

#include <GUIConstants.au3>

GUICreate("TEST SEARCH") 

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

GUISetState ()

$file = FileOpen("test.txt", 0)

If $file = -1 Then

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

    Exit

EndIf

While 1

$char =FileRead($file, 99999999)

If @error = -1 Then ExitLoop

GUICtrlSetData( $myedit, $char)

Wend

FileClose($file)

While 1

    $msg = GUIGetMsg()

   

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

Edited by asimzameer

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