Jump to content
Sign in to follow this  
TheBobynator

Combo box problem

Recommended Posts

TheBobynator

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?

Share this post


Link to post
Share on other sites
iHonda

can you post a sample of your script so i can see what you have so far?


A great place to start Autoit 1-2-3

Share this post


Link to post
Share on other sites
TheBobynator

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

Share this post


Link to post
Share on other sites
iHonda

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

Share this post


Link to post
Share on other sites
iHonda

well is the file named as test.exe or is it jsut called test ?? you can have an exe file with out naming it wit the exe try renaming the file in the directory


A great place to start Autoit 1-2-3

Share this post


Link to post
Share on other sites
TheBobynator

It calls test.exe but there are a lot of othr files so I wont write all files down, because there will always come more and more

Share this post


Link to post
Share on other sites
iHonda

then change the name of the file to be Test not Test.exe just the name not the file type


A great place to start Autoit 1-2-3

Share this post


Link to post
Share on other sites
TheBobynator

no, because if everytime comes a new file I must rename it without .exe

can someone help me

Share this post


Link to post
Share on other sites
TheBobynator

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",""))

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.