Sign in to follow this  
Followers 0
Negat1ve

Combo Box

7 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

@Negat1e....You first need to increase the combo box control's height and add a filter in _GUICtrlComboBoxEx_AddDir ($List,@WorkingDir & "\*.exe").

Edited by DjDeep00

Share this post


Link to post
Share on other sites

yeah :D sry i forget but , it also doesnt work , it add only file names , but not directories

Share this post


Link to post
Share on other sites

; 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.

Share this post


Link to post
Share on other sites

Oh many and many thanks , but is there any way how to remove [ ] ?

Share this post


Link to post
Share on other sites

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

:D

Share this post


Link to post
Share on other sites
:D realy big bow man ! i will send you my project when i done it if you want :D

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0