Gif Posted May 4, 2007 Share Posted May 4, 2007 Case $msg = $btn_Open $varopen = FileOpenDialog("Open Music...","My Computer", "Music (*.wav;*.mp3)", 1) If @error Then MsgBox(0,"Wrong","No File(s) chosen") Else $input_open = GUICtrlCreateCombo("Playlist", 180, 80, 200, 20) GUICtrlSetData(-1,$varopen&"|"$varopen&, $varopen) EndIf Where is the mistake? i have a combo box and it's role is something like a playlist and i want when i open a file, the opened file will be added in the combobox as an option... this script adds the file to the combobox but when i open again a new file it replaces the existing one... i want it to be added along with the other one already opened.How? Link to comment Share on other sites More sharing options...
martin Posted May 4, 2007 Share Posted May 4, 2007 Case $msg = $btn_Open $varopen = FileOpenDialog("Open Music...","My Computer", "Music (*.wav;*.mp3)", 1) If @error Then MsgBox(0,"Wrong","No File(s) chosen") Else $input_open = GUICtrlCreateCombo("Playlist", 180, 80, 200, 20) GUICtrlSetData(-1,$varopen&"|"$varopen&, $varopen) EndIfoÝ÷ Ùh^謶¦ËZè¡j÷r¡º1jwb·l®^Ë(ëax%G¦V²+-jwbÁ©í§^§âëaz^ç_W°Y[y§]yا¶¢fènZ±©è¦Ø¨Øb²Ç+ZuÛ-çâëh¶¢fèn[ºÜ!zx¨¥éÚ¨§jw°~)^ÚÞ¦VzËayìb²Ø§Þ§¶+m¡·u×jZ'Ø^¢Ø^®ÞjZÞiܨ¥éÞtz0þ«¨µäázh¬µ©Ëhç©ç+y«bayÊ&nèÄ*Þj×¢¶Üy§íz·+y«bazf¢¢¶§ë-r§ì¨º»®*m¶®¶s` ¤66Rb33c¶×6rÒb33c¶'Fåô÷Vâ¢b33c·f&÷VâÒfÆT÷VäFÆörgV÷C´÷Vâ×W62âââgV÷C²ÂgV÷C´×6ö×WFW"gV÷C²ÂgV÷C´×W62¢çvc²¢æ×2gV÷C²Â¢bW'&÷"FVà¢×6t&÷ÂgV÷Cµw&öærgV÷C²ÂgV÷C´æòfÆR26÷6VâgV÷C²¢VÇ6P¢²b33c¶çWEö÷VâÒuT7G&Ä7&VFT6öÖ&ògV÷CµÆÆ7BgV÷C²ÂÂÂ#Â#fÇC²ÒÒÒÖÖ÷fRF2ÆæRFò7F'Böb67&BgFW"wV7&VFP¢uT7G&Å6WDFFÒb33c¶çWEö÷Âb33c·f&÷Vâ²fÇC²ÒÒÒÒÒ×6WFFFvÆÂFBF2FòFRÆ7BâFR6öÖ&ð¢VæD` Hope I understood what you wanted. 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. Link to comment Share on other sites More sharing options...
Gif Posted May 4, 2007 Author Share Posted May 4, 2007 (edited) The mistake is to keep recreating the combo box. Create it once after creating the main gui, then just change your script to Case $msg = $btn_Open $varopen = FileOpenDialog("Open Music...","My Computer", "Music (*.wav;*.mp3)", 1) If @error Then MsgBox(0,"Wrong","No File(s) chosen") Else ;$input_open = GUICtrlCreateCombo("Playlist", 180, 80, 200, 20)<----move this line to start of script after GuiCreate GUICtrlSetData(-$input_op,$varopen);<------setdata will add this to the list in the combo EndIf Hope I understood what you wanted. It worked... THANKS Edited May 4, 2007 by c4nm7 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