Jump to content

Recommended Posts

Posted

Hi,

Ive made a combo box and I add a dir with files like test.exe and a lot of ohter files. Now if I click on the combo I see the .exe on the end of the string. Is there a way to delete at the end this .exe?

Posted

$input = GUICtrlCreateCombo("",295,227,105,20)

_GUICtrlComboBox_BeginUpdate($input)

_GUICtrlComboBox_AddDir($input,@ScriptDir & "\data\*.exe")

_GUICtrlComboBox_EndUpdate($input)

_GUICtrlComboBox_SetMinVisible($input, 15)

now if I click at the combo there is standing test or ...*.exe but I want only test or ....

Posted

a directory is the folder so you dont need to include the .exe in the script

try that it should work

$input = GUICtrlCreateCombo("",295,227,105,20)
_GUICtrlComboBox_BeginUpdate($input)
_GUICtrlComboBox_AddDir($input,@ScriptDir & "\data\")
_GUICtrlComboBox_EndUpdate($input)
_GUICtrlComboBox_SetMinVisible($input, 15)

A great place to start Autoit 1-2-3

Posted

Now ive got my on reason. look

$input = GUICtrlCreateCombo("",295,227,105,20)
_GUICtrlComboBox_BeginUpdate($input)
_GUICtrlComboBox_AddDir($input,@ScriptDir & "\data\*.exe")
_GUICtrlComboBox_EndUpdate($input)
_GUICtrlComboBox_SetMinVisible($input, 15)

$1= _GUICtrlComboBox_GetList($input)
_GUICtrlComboBox_ResetContent($input)
GUICtrlSetData($input,StringRegExpReplace($1,".exe",""))

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
×
×
  • Create New...