Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

I'm just not getting this


  • Please log in to reply
3 replies to this topic

#1 DarthCookieMonster

DarthCookieMonster

    I ate your mom's cookie. Nom Nom Nom...

  • MVPs
  • 11,894 posts

Posted 14 December 2006 - 02:55 AM

This is hurting my head. I've spent lots of time reading the helpfile, and looking at examples...All I'm looking to do is have a list that I can add or take away from, and save that list in a ini.
AutoIt         
#include <GuiConstants.au3> #include <GuiCombo.au3> Opt('MustDeclareVars',1) Dim $Combo, $Btn_Delete, $Btn_Exit, $msg, $Btn_Add, $gg GuiCreate("ComboBox String", 392, 204) $Combo = GuiCtrlCreateCombo("", 70, 10, 270, 110,$CBS_SIMPLE) $Btn_Delete = GuiCtrlCreateButton("Delete String", 35, 120, 90, 30) $Btn_Add = GuiCtrlCreateButton("Add String", 145, 120, 90, 30) GUICtrlSetData($Combo,"B|C|D|E|F") $Btn_Exit = GuiCtrlCreateButton("Exit", 255, 120, 90, 30) GuiSetState() While 1     $msg = GuiGetMsg()     Select         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit             ExitLoop         Case $msg = $Btn_Delete             If(_GUICtrlComboGetCurSel($Combo) <> $CB_ERR) Then                 _GUICtrlComboDeleteString($Combo,_GUICtrlComboGetCurSel($Combo))             EndIf         Case $msg = $Btn_Add             If(_GUICtrlComboGetCurSel($Combo) <> $CB_ERR) Then                 _GUICtrlComboAddString($Combo,$gg = _GUICtrlComboGetCurSel($Combo))                 GUICtrlSetData($Combo,$gg)             endif     EndSelect WEnd Exit

The Vollatran project
_____


msg-108-0-96549500-1409901790.png
Obi didn't believe me when I told him the dark side has milk and cookies....








#2 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 14 December 2006 - 04:25 AM

AutoIt         
#include <GuiConstants.au3> #include <GuiCombo.au3> Opt('MustDeclareVars',1) Dim $Combo, $Btn_Delete, $Btn_Exit, $msg, $Btn_Add, $gg GuiCreate("ComboBox String", 392, 204) $Combo = GuiCtrlCreateCombo("", 70, 10, 270, 110,$CBS_SIMPLE) $Btn_Delete = GuiCtrlCreateButton("Delete String", 35, 120, 90, 30) $Btn_Add = GuiCtrlCreateButton("Add String", 145, 120, 90, 30) GUICtrlSetData($Combo,"B|C|D|E|F") $Btn_Exit = GuiCtrlCreateButton("Exit", 255, 120, 90, 30) GuiSetState() While 1     $msg = GuiGetMsg()     Select         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit             ExitLoop         Case $msg = $Btn_Delete             If(_GUICtrlComboGetCurSel($Combo) <> $CB_ERR) Then                 _GUICtrlComboDeleteString($Combo,_GUICtrlComboGetCurSel($Combo))             EndIf             Case $msg = $Btn_Add                 If GUICtrlRead($Combo) <> "" Then ConsoleWrite(_GUICtrlComboAddString($Combo,GUICtrlRead($Combo)) & @LF) ;~             If(_GUICtrlComboGetCurSel($Combo) <> $CB_ERR) Then ;~                 _GUICtrlComboAddString($Combo,$gg = _GUICtrlComboGetCurSel($Combo)) ;~                 GUICtrlSetData($Combo,$gg) ;~             endif     EndSelect WEnd Exit

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#3 DarthCookieMonster

DarthCookieMonster

    I ate your mom's cookie. Nom Nom Nom...

  • MVPs
  • 11,894 posts

Posted 14 December 2006 - 11:11 AM

Thanks Gary!

The Vollatran project
_____


msg-108-0-96549500-1409901790.png
Obi didn't believe me when I told him the dark side has milk and cookies....


#4 DarthCookieMonster

DarthCookieMonster

    I ate your mom's cookie. Nom Nom Nom...

  • MVPs
  • 11,894 posts

Posted 14 December 2006 - 01:06 PM

I tested it, and It works great. I noticed it will duplicate entries, so I need to fix that. I tried to do a GUiCtrlRead so I can get a string, but it is only getting the data in the entry field. How do I get the list string?

The Vollatran project
_____


msg-108-0-96549500-1409901790.png
Obi didn't believe me when I told him the dark side has milk and cookies....





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users