RobinLanza Posted December 13, 2019 Share Posted December 13, 2019 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 comment Share on other sites More sharing options...
Marc Posted December 13, 2019 Share Posted December 13, 2019 #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 comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now