Negat1ve Posted June 8, 2009 Posted June 8, 2009 Hellou i would like to know how can i add all directiories ( names ) to combo box #include <GUIComboBoxEx.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #NoTrayIcon $Window1 = GUICreate ("Test",300,400) $List = _GUICtrlComboBoxEx_Create ($Window1,"",50,5,180,20) GUISetState () _GUICtrlComboBoxEx_BeginUpdate ($List) _GUICtrlComboBoxEx_AddDir ($List,@WorkingDir & "\") _GUICtrlComboBoxEx_EndUpdate ($List) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd
DjDeep00 Posted June 8, 2009 Posted June 8, 2009 (edited) @Negat1e....You first need to increase the combo box control's height and add a filter in _GUICtrlComboBoxEx_AddDir ($List,@WorkingDir & "\*.exe"). Edited June 8, 2009 by DjDeep00
Negat1ve Posted June 8, 2009 Author Posted June 8, 2009 yeah sry i forget but , it also doesnt work , it add only file names , but not directories
martin Posted June 8, 2009 Posted June 8, 2009 ; Author - Negat1e ; Link - http://www.autoitscript.com/forum/index.php?showtopic=96394&view=findpost&p=692962 #include <GUIComboBoxEx.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <constants.au3> #NoTrayIcon $Window1 = GUICreate ("Test",300,400) $List = _GUICtrlComboBoxEx_Create ($Window1,"",50,5,180,200) GUISetState () _GUICtrlComboBoxEx_BeginUpdate ($List) _GUICtrlComboBoxEx_AddDir ($List,@WorkingDir & "\*",BitOr($DDL_DIRECTORY,$DDL_EXCLUSIVE)) _GUICtrlComboBoxEx_EndUpdate ($List) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Negat1ve Posted June 8, 2009 Author Posted June 8, 2009 Oh many and many thanks , but is there any way how to remove [ ] ?
DjDeep00 Posted June 8, 2009 Posted June 8, 2009 Another way... #include <GUIComboBoxEx.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <File.au3> #NoTrayIcon $Window1 = GUICreate ("Test",300,400) $List = _GUICtrlComboBoxEx_Create ($Window1,"",50,5,180,200) $Directory_Array = _FileListToArray(@WorkingDir) For $x=1 to $Directory_Array[0] If StringInStr($Directory_Array[$x],".") = 0 then _GUICtrlComboBoxEx_InsertString ($List, $Directory_Array[$x]) Next GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd
Negat1ve Posted June 8, 2009 Author Posted June 8, 2009 realy big bow man ! i will send you my project when i done it if you want
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