Sign in to follow this  
Followers 0
jotis01

Input from text file

3 posts in this topic

Can AutoIt v3 read lines from a text file and input that information into a GUI screen?

Share this post


Link to post
Share on other sites



Can AutoIt v3 read lines from a text file and input that information into a GUI screen?

Lookup FileReadLine in the help file and look at the example.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

this is one way... BigDod gave you another...

There are many ways

#include <GuiConstants.au3>
#include <file.au3>
Dim $aRecords
Dim $aFile = "error.log"; PLACE YOUR FILE NAME HERE
GuiCreate("MY GUI")
$input = GUICtrlCreateEdit("" , 20, 20, 350, 300)

If Not _FileReadToArray($aFile,$aRecords) Then
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
   Exit
EndIf
For $x = 1 to $aRecords[0]
    GUICtrlSetData( $input, $aRecords[$x] & @CRLF, 1)
Next

$Check= GUICtrlCreateButton("Exit", 150,350,100,30)
GUISetState(); display the GUI

While 1
    $msg = GUIGetMsg()
  
    Select
        
        Case $msg= $Check
            Exit
        Case $msg= $GUI_EVENT_CLOSE
            Exit
            
    EndSelect
WEnd

8)


NEWHeader1.png

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