Input data theo cột từ file ra cột listview Autohotkey
#NoEnv
; If your file really looks like this:
File := "
(Join`r`n
Last Name: Darby
First Name: Conley
Title: Bucky Katt's Big Book of Fun (Part 1)
ISBN: 978-0-7407-4136-5
Last Name: Darby
First Name: Conley
Title: Bucky Katt's Big Book of Fun (Part 2)
ISBN: 978-0-7407-4136-6
Last Name: Darby
First Name: Conley
Title: Bucky Katt's Big Book of Fun (Part 3)
ISBN: 978-0-7407-4136-7
)"
; FileRead, File, YourFilePath ; uncomment this line (the above is only for testing)
Gui, Margin, 20, 20
Gui, Add, ListView, w600 r20 Grid vMyListView, Last Name|First Name|Title|ISBN
Loop, Parse, File, `n, `r
{
StringSplit, Split, A_LoopField, :, %A_Space%
If (Split1 = "Last Name")
CurrentRow := LV_Add("", Split2)
Else If (Split1 = "First Name")
LV_Modify(CurrentRow, "Col2", Split2)
Else If (Split1 = "Title")
LV_Modify(CurrentRow, "Col3", Split2)
Else If (Split1 = "ISBN")
LV_Modify(CurrentRow, "Col4", Split2)
}
LV_ModifyCol()
Gui, Show, , AHK Rocks
Return
GuiClose:
ExitApp
Đăng nhận xét