Jump to content

Recommended Posts

Posted

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
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
Posted

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

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...