12 posts in this topic
I am very new to Autoit and pretty new to scripting altogether.I have a PowerShell script that pulls owner info from folders on our file share server. There are 3 owners for every folder, Domain Admin, User setup for network scanning and the user. I am trying to copy the username only from this txt file. I have gotten as far as to being able to read the lines in the txt file but can't seem to read the columns. This is what i have so far.
$file = "c:\test01.txt"
For $i = 5 to _FileCountLines($file)
$line = FileReadLine($file, $i)
msgbox(0,'','the line ' & $i & ' is ' & $line & 'and the column is')
This is the outcome.....
This is the txt file
I am trying to copy the ABC part without the MyDomain\. I know it's line 5 and columns 11-14 of the txt file but i can't figure out how to read it. I hope i'm explaining this correctly.
I'm working on this project:
$Import = GUICtrlCreateButton("Import", 15, 175, 90, 40, $WS_GROUP) $List = GUICtrlCreateListView("Name|Address|E-mail", 15, 220, 400, 363, $LVS_SORTDESCENDING) $Item1 = GUICtrlCreateListViewItem("test|test|test", $List) GUISetState(@SW_SHOW, $GUI) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $Exit Exit Case $Import $Table_Import = FileOpenDialog("Import list '*.txt'", @DesktopDir & "\", "Text (*.txt)") If @error Then ContinueLoop GUICtrlSetData($Item1, $Table_Import) In the text file the fields are delimited with "|" and the values are not in the same row but one below the other.
However in the txt file the sum of the values may change.
Can you help me?
I built a gui where a GUICtrlCreateListView with two columns is present.
Through an "Import" button I would be able to import the contents of an .xls or .txt.
Can you help me?
I've created a script and i'd like when the user adds a new item on the ListView, that new item to be placed on top.
GUICtrlCreateListViewItem places newly created ListViewItems right below the older ones. Is there a way to display the newest iten on top of the list view?
Thanks a lot in advance!