Hello I need to finalize this script to copy paste data to my "H:\x\x.csv" file, ideally on column B of csv file.
My script works fine till command move cursor 3, 14, (see red line in code) which is actually the data I need to copy paste to column B of my CSV file
Any help?
Thanks,
Sub htsm_PODHIS()
Dim Title, Default, fileloc, strLine, arrValues, fso, inputFileStream
Dim line As String
With Session
fileloc = "H:\x\x.csv" ' Set default
Const conStrSeparator = ";"
Set fso = CreateObject("Scripting.FileSystemObject")
Set inputFileStream = fspenTextFile("H:\x\x.csv", 1, False, 0)
Do Until inputFileStream.AtEndOfStream
strLine = inputFileStream.ReadLine
arrValues = Split(strLine, conStrSeparator)
.WaitForEvent rcKbdEnabled, "0", "1", 3, 30
.MoveCursor 3, 30 'campo D
.TransmitTerminalKey rcIBMEraseEOFKey
.TransmitANSI arrValues(0)
.TransmitTerminalKey rcIBMEnterKey
.TransmitTerminalKey rcIBMEnterKey
.MoveCursor 3, 14 ' Need to copy-paste this field to H:\x\x.csv !!!!
.SelectWord rcMouseRow, rcMouseCol
.inputFileStream.Paste
Loop
inputFileStream.Close
End With
End Sub
My script works fine till command move cursor 3, 14, (see red line in code) which is actually the data I need to copy paste to column B of my CSV file
Any help?
Thanks,
Sub htsm_PODHIS()
Dim Title, Default, fileloc, strLine, arrValues, fso, inputFileStream
Dim line As String
With Session
fileloc = "H:\x\x.csv" ' Set default
Const conStrSeparator = ";"
Set fso = CreateObject("Scripting.FileSystemObject")
Set inputFileStream = fspenTextFile("H:\x\x.csv", 1, False, 0)
Do Until inputFileStream.AtEndOfStream
strLine = inputFileStream.ReadLine
arrValues = Split(strLine, conStrSeparator)
.WaitForEvent rcKbdEnabled, "0", "1", 3, 30
.MoveCursor 3, 30 'campo D
.TransmitTerminalKey rcIBMEraseEOFKey
.TransmitANSI arrValues(0)
.TransmitTerminalKey rcIBMEnterKey
.TransmitTerminalKey rcIBMEnterKey
.MoveCursor 3, 14 ' Need to copy-paste this field to H:\x\x.csv !!!!
.SelectWord rcMouseRow, rcMouseCol
.inputFileStream.Paste
Loop
inputFileStream.Close
End With
End Sub