RobK Posted September 1, 2011 Posted September 1, 2011 I am trying to add a selected folders to a list which the user can select. The items are not appearing in my list control which is shown on the second tab. I cannot figure out why my items which I am selecting are not appearing in my list. Can someone help to pinpoint my issue? expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Program Files\AutoIt3\Koda\Forms\FIMConfigTab.kxf $dlgTabbed = GUICreate("Tabbed Notebook Dialog", 730, 586, 214, 180) GUISetIcon("", -1) $PageControl1 = GUICtrlCreateTab(8, 8, 596, 456) $TabSheet1 = GUICtrlCreateTabItem("Files to Include") $edtIncludeExt = GUICtrlCreateInput("ini,exe,scr,bat,msi,dll", 305, 163, 265, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label1 = GUICtrlCreateLabel("Largest file size to monitor:", 41, 115, 190, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $edtFileSize = GUICtrlCreateInput("20", 305, 115, 57, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label2 = GUICtrlCreateLabel("Extensions to include:", 41, 163, 154, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label3 = GUICtrlCreateLabel("in MB", 384, 115, 44, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $TabSheet2 = GUICtrlCreateTabItem("Folders to Watch") $Button4 = GUICtrlCreateButton("&Add Folder", 56, 176, 83, 25) GUICtrlSetFont(-1, 8, 400, 0, "Arial") ;$ListView1 = GUICtrlCreateListView("", 192, 104, 250, 270, BitOR($GUI_SS_DEFAULT_LISTVIEW,$WS_VSCROLL)) $List1 = GUICtrlCreateList("Selected Folders to Monitor:", 192, 104, 250, 270, -1) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Button5 = GUICtrlCreateButton("&Remove Folder", 56, 256, 83, 25) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $TabSheet3 = GUICtrlCreateTabItem("SMS Alerts") $Label4 = GUICtrlCreateLabel("Mail Server", 42, 82, 83, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label5 = GUICtrlCreateLabel("From Name", 42, 162, 87, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label6 = GUICtrlCreateLabel("Server Username", 42, 146, 126, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label9 = GUICtrlCreateLabel("Mobile Number", 42, 282, 110, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Input6 = GUICtrlCreateInput("9541234567", 178, 282, 121, 22) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Input4 = GUICtrlCreateInput("", 178, 178, 121, 22, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Input3 = GUICtrlCreateInput("xxx@gmail.com", 178, 146, 121, 22) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Input2 = GUICtrlCreateInput("FIM Alert", 178, 114, 121, 22) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Input1 = GUICtrlCreateInput("xxx@gmail.com", 178, 82, 121, 22) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Input5 = GUICtrlCreateInput("25", 178, 218, 41, 22) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Label8 = GUICtrlCreateLabel("SSL", 42, 250, 35, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label7 = GUICtrlCreateLabel("Port", 42, 218, 33, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Radio1 = GUICtrlCreateRadio("Yes", 178, 250, 65, 17) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Radio2 = GUICtrlCreateRadio("No", 242, 250, 57, 17) GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $List1 = GUICtrlCreateList("", 178, 322, 121, 76) GUICtrlSetData(-1, "ATT_WIRELESS|SPRINT_PCS|TMOBILE|VERIZON_WIRELESS") GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Label10 = GUICtrlCreateLabel("Service Provider", 42, 322, 120, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") $Label11 = GUICtrlCreateLabel("Server Password", 42, 183, 124, 22) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlCreateTabItem("") $Button1 = GUICtrlCreateButton("&OK", 366, 472, 75, 25) $Button2 = GUICtrlCreateButton("&Cancel", 446, 472, 75, 25) $Button3 = GUICtrlCreateButton("&Exit", 528, 472, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 msgbox(0,"debug","OK Button pressed") Case $Button2 msgbox(0,"debug","Cancel Button pressed") Case $Button3 msgbox(0,"debug","Exit Button pressed") Exit Case $Button4 ;add folder $message = "Select folder to add" $addfolder = FileSelectFolder($message, @SystemDir & ":\",2) msgbox (0,"debug",$addfolder) GUICtrlSetData($List1, $addfolder) ;msgbox(0,"debug:newitem", $newitem) if @error Then msgbox (0, "Error", "Add folder failed.") EndIf GUIcreat GUISetState() Case $Button5 ;remove folder EndSwitch WEnd
rcmaehl Posted September 1, 2011 Posted September 1, 2011 Its updating the service provider list My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF
RobK Posted September 1, 2011 Author Posted September 1, 2011 Yes, I just figured it out. Been staring at this too long. Thanks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now