TheBobynator Posted December 22, 2008 Share Posted December 22, 2008 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? Link to comment Share on other sites More sharing options...
iHonda Posted December 22, 2008 Share Posted December 22, 2008 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 Link to comment Share on other sites More sharing options...
TheBobynator Posted December 22, 2008 Author Share Posted December 22, 2008 $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 .... Link to comment Share on other sites More sharing options...
iHonda Posted December 22, 2008 Share Posted December 22, 2008 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 Link to comment Share on other sites More sharing options...
TheBobynator Posted December 22, 2008 Author Share Posted December 22, 2008 No, it works not Link to comment Share on other sites More sharing options...
iHonda Posted December 22, 2008 Share Posted December 22, 2008 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 Link to comment Share on other sites More sharing options...
TheBobynator Posted December 22, 2008 Author Share Posted December 22, 2008 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 Link to comment Share on other sites More sharing options...
iHonda Posted December 22, 2008 Share Posted December 22, 2008 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 Link to comment Share on other sites More sharing options...
TheBobynator Posted December 23, 2008 Author Share Posted December 23, 2008 no, because if everytime comes a new file I must rename it without .execan someone help me Link to comment Share on other sites More sharing options...
TheBobynator Posted December 23, 2008 Author Share Posted December 23, 2008 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","")) Link to comment Share on other sites More sharing options...
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