Would someone mind helping me. I created an inifile,called servers.ini. Sample contents of the file:
[servers]
1=myserver1
2=myserver2
3=myserver3
4=myserver4
I am reading the file into an array. I want to create a menu to display the list of servers. Once the app is completed, a server will be selected and something will be performed on the server. I need to know how to display just the server names in the list view and not the keys (1,2,3,4, etc. Here's my code: thanks. The code below returns both columns. I just want to see the column with myserver1, myserver2, etc.
#include <GUIConstants.au3>
#include <GUIListBox.au3>
#include <GuiListView.au3>
#include <Process.au3>
include <constants.au3>
#include <array.au3>
AutoItSetOption ("ExpandVarStrings" , 1)
Local $exStyles = BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES)
Dim $srvlst
$mnuapp = GUICreate("Servers" , 400, 500,-1, -1, -1, 0x00000018); WS_EX_ACCEPTFILES
$listview = _GUICtrlListView_Create ($mnuapp,"", 10, 32, 300, 197)
_GUICtrlListView_SetExtendedListViewStyle($listview, $exStyles)
GUICtrlSetLimit(-1, 200) ; to limit horizontal scrolling
GUICtrlSetData(-1, "")
GUISetState()
$srvlst = IniReadSection("servers.ini", "Servers")
_GUICtrlListView_AddColumn($listview, "Servers", 120)
_GUICtrlListView_AddArray ($listview, $srvlst)
_GUICtrlListView_SetItemSelected($listview, 0)