Jump to content

CSV reading and simple plasma


Recommended Posts

Good morning, I am really new with autoit and would be infinitely grateful if they would clarify my request.

To date I have been accommodating and testing things with for and mouseclick, reached the point that I need to read a CSV file (3 arguments separated by ",").

So what I'm looking for is as simple as:

I have csv in following format >>
NAME, LAST NAME, MAIL

I need guidance for a code that reads each one of them and can manipulate it by writing it or writing in another text in the order that I indicate or in a box type

I am grateful in advance
Link to post
Share on other sites
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 143, 88, 192, 124)
$Input1 = GUICtrlCreateInput("Input1", 8, 8, 121, 21)
$Input2 = GUICtrlCreateInput("Input2", 8, 32, 121, 21)
$Input3 = GUICtrlCreateInput("Input3", 8, 56, 121, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Local $csvfile = FileOpen("test.csv", 0)
while 1
    $line = FileReadLine($csvfile) ; read next line
    if @error Then ExitLoop
    $strings = StringSplit($line, ",")
    if $strings[0]= 3 Then
        GUICtrlSetData($Input1, $strings[1])
        GUICtrlSetData($Input2, $strings[2])
        GUICtrlSetData($Input3, $strings[3])
    EndIf
WEnd
FileClose($csvfile)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

As an example...

best regards,

Marc

Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)

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

    No registered users viewing this page.

×
×
  • Create New...