I need help to understand what functions I should call in this script I am trying to write.
My idea is 1) the user should type the name of the csv file he wants to load; 2) the app moves the mouse to click on a specific button on the screen; 3) then it send to the app the csv content line by line
Eg.: teste.csv has a, g, d, arg, c, s, 22 in the first line.
From a to s, the content can be send as text-only or raw. However, the "22" (sixth row content) has to be translated into a specific number of left or right arrow keys touches, depending on the delta to 20.
Eg: if sixth row content is 22, then it should mean 2 right arrow key touches. If the sixth row content is 18, then it should mean 2 left arrow key touches.
After reading the Loop (Parse - https://www.autohotkey.com/docs/v1/lib/LoopParse.htm) page and specially this topic from AHW v.1 (https://www.autohotkey.com/board/topic/5880-read-csv-file-parse-send-pause/), I managed to create my script. But I am stuck on getting only the first row and line content and I am unable to move thru the other rows in the first line.
I have to say that a simple tab key press move thru the fields I need to fill out in the app I am using.
My current script is:
Code: Select all
WinWait, Editor Brasfoot 2020
WinWaitActive, Editor Brasfoot 2020
MouseClick, left, 701, 685
Loop, Read, C:\Users\Felipe Barbosa\Desktop\teste.csv
Loop, parse, A_LoopReadLine, CSV
{
WinActivate, Editor Brasfoot 2000,
SetKeyDelay -1, 0
Send, {CAPSLOCK}%A_LoopField%{TAB}
Sleep, 500
}