Fabry 0 Posted October 21, 2007 Hi, I found an error while I was projecting a form. If you press A or B shows ChooseColor gui, then you close pressing ok or cancel and it shows again (error), and then press an UpDown it shows again (double error). Why???? expandcollapse popup#include <Misc.au3> #include <GUIConstants.au3> $coloreA = 0xFF0000 $coloreB = 0x0000FF #Region ### START Koda GUI section ### Form=d:\documents and settings\fabrizio\documenti\hack\internet e rete\gioco online\server.kxf $Form1_1 = GUICreate("Impostazioni server", 633, 271, 195, 125) $Combo1 = GUICtrlCreateCombo("DeathMatch (DM)", 120, 80, 153, 25, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, "DeathMatch a Squadre (TDM)|Cattura la Bandiera (CTF)|Cerca e Distruggi (S&D)|Quartier Generale (HD)") $Label1 = GUICtrlCreateLabel("Tipo di gioco :", 24, 82, 71, 17) $Input1 = GUICtrlCreateInput("50", 120, 128, 56, 21, BitOR($ES_AUTOHSCROLL, $ES_NUMBER)) $Updown1 = GUICtrlCreateUpdown($Input1) $Label2 = GUICtrlCreateLabel("N° Max Giocatori :", 24, 128, 90, 17) $Label3 = GUICtrlCreateLabel("Nome server :", 24, 40, 70, 17) $Input2 = GUICtrlCreateInput("Tanks server", 120, 40, 153, 21) $Button1 = GUICtrlCreateButton("Carica Mappa", 120, 168, 145, 33, 0) $Input3 = GUICtrlCreateInput("", 288, 176, 313, 21) $Button2 = GUICtrlCreateButton("Avvia !!!", 120, 224, 145, 41, 0) $checbox1 = GUICtrlCreateCheckbox('Permetti votazione', 200, 128) GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlCreateLabel('Tempo min. :', 325, 133) $Input4 = GUICtrlCreateInput('5', 390, 128, 50, 21, BitOR($ES_AUTOHSCROLL, $ES_NUMBER)) $Updown2 = GUICtrlCreateUpdown($Input4) $Button3 = GUICtrlCreateButton('A', 300, 50, 55, 55) GUICtrlSetFont(-1, 32) GUICtrlSetBkColor(-1, $coloreA) $Button4 = GUICtrlCreateButton('B', 390, 50, 55, 55) GUICtrlSetBkColor($Button4, $coloreB) GUICtrlSetFont($Button4, 32) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $filemappa = FileOpenDialog('Scegli Mappa', @ScriptDir, 'Mappe (*.wld)', 3) GUICtrlSetData($Input3, $filemappa) Case $Button4 $coloreB = _ChooseColor(2, $coloreB, 2) GUICtrlSetBkColor($Button4, $coloreB) $nMsg = GUIGetMsg() Case $Button3 $coloreA = _ChooseColor(2, $coloreA, 2) GUICtrlSetBkColor($Button3, $coloreA) $nMsg = GUIGetMsg() Case $Button2 If $Input3 = '' Or Not FileExists(GUICtrlRead($Input3)) Then MsgBox(16, 'Errore', 'Mappa inesistente, inserisci una mappa con carica mappa') ContinueCase EndIf If GUICtrlRead($Input1) <= 0 Then MsgBox(16, 'Errore', 'Numero giocatori non consentito') ContinueCase EndIf If GUICtrlRead($Input4) <= 0 Then MsgBox(16, 'Errore', 'Tempo in minuti non consentito') ContinueCase EndIf Switch GUICtrlRead($Combo1) Case "DeathMatch (DM)" $tipo = 'DM' Case "DeathMatch a Squadre (TDM)" $tipo = 'TDM' Case "Cattura la Bandiera (CTF)" $tipo = 'CTF' Case "Cerca e Distruggi (S&D)" $tipo = 'S&D' Case "Quartier Generale (HD)" $tipo = 'HD' EndSwitch $nome = GUICtrlRead($Input2) $maxUsers = GUICtrlRead($Input1) ExitLoop Case Else Sleep(10) EndSwitch WEnd A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center] Share this post Link to post Share on other sites
Valuater 130 Posted October 21, 2007 Fixed in latest Beta .. Get it and you will have no more problems with colored buttons 8) Share this post Link to post Share on other sites