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 MBALZESHARI

MBALZESHARI

    Member of the Hide & Seek world league

  • MVPs
  • 11,508 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
_____

 

 

The Basic Con

 

Those who can't find anything to live for, always invent something to die for.

Then they want the rest of us to die for it, too.

These, and an elite army of thousands, who do nobody any good at all, but do great harm to some, have always collected vast sums from all.

Finally, all this machinery tries to kill us, because we won't die for it, too.








#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 MBALZESHARI

MBALZESHARI

    Member of the Hide & Seek world league

  • MVPs
  • 11,508 posts

Posted 14 December 2006 - 11:11 AM

Thanks Gary!

The Vollatran project
_____

 

 

The Basic Con

 

Those who can't find anything to live for, always invent something to die for.

Then they want the rest of us to die for it, too.

These, and an elite army of thousands, who do nobody any good at all, but do great harm to some, have always collected vast sums from all.

Finally, all this machinery tries to kill us, because we won't die for it, too.


#4 MBALZESHARI

MBALZESHARI

    Member of the Hide & Seek world league

  • MVPs
  • 11,508 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
_____

 

 

The Basic Con

 

Those who can't find anything to live for, always invent something to die for.

Then they want the rest of us to die for it, too.

These, and an elite army of thousands, who do nobody any good at all, but do great harm to some, have always collected vast sums from all.

Finally, all this machinery tries to kill us, because we won't die for it, too.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users