Re: Problem with values in Combobox under XP and 2000
"valery_vi" <[email protected]>
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
I forgot to attach this INI file 'Fichier.ini' ie [Centres] 1=Somebody 1 2=Somebody 2 3=Somebody 3 4=Somebody 4 5=Somebody 5 6=Somebody 6 7=Somebody 7 Valery --- In [email protected], "valery_vi" <shehrer1@...> wrote: > > Try this Combo.au3: > > #include <GUIConstants.au3> > > $Valeurs_Combo = "" > $Anomalie=0 > $Fichier_ini = @ScriptDir & '\Fichier.ini' > > $i=2 > $Valeurs_Combo='' > While 1 > $centre = IniRead($Fichier_ini, "Centres", $i, "Valeur Non Trouvée") > If $centre = "Valeur Non Trouvée" then ExitLoop > $Valeurs_Combo &= $centre & '|' > $i +=1 > Wend > > $Valeurs_Combo = StringTrimRight($Valeurs_Combo,1) > > $Commentaires = @CRLF & ".1. Choose the Center in the drop-down > list " & @CRLF & ".2. Click on Fixe the Center " & @CRLF > $Commentaires = $Commentaires & ".3. Click on Action " & @CRLF & > @CRLF & "TO CANCEL, click on the cross of closing of window or on the > Annuler button! " > SplashTextOn("COMMENTAIRES", $Commentaires, 655, 155, 50, 390, 0 + > 4, "", 12) > > ; Crée la boîte de dialogue > $Choix_du_Centre = GuiCreate("Choose the Center", 291, 257,50,100) > $Label_Centre = GuiCtrlCreateLabel("Selected Center: None ", 30, 40, > 131, 21, 0x1000) > ; lit les différentes valeurs du .ini contenant les noms des Centres > $Combo_Centre = GuiCtrlCreateCombo('Valeur Non Trouvée', 30, 60, 130, > 21) > > GuiCtrlSetData($Combo_Centre, $Valeurs_Combo, 'Valeur Non Trouvée') > > ; implémentation des valeurs de la combo box > $Bouton_Fixe_Le_Centre = GuiCtrlCreateButton("Fixe the Center", 30, > 90, 130, 20) > GUISetState() > While 1 > $Msg = GUIGetMsg() > Switch $Msg > Case $GUI_EVENT_CLOSE > ExitLoop > EndSwitch > WEnd > > This script uses file 'Fichier.ini' which should be in the same > directory. > > It works fine for me. > > Valery > > --- In [email protected], Jean Marie MIGNOT <nico2math@> > wrote: > > > > > > I have a strong problem aggravating! > > > > I wanted to create a prettier program, I succeeded in XP BUT does > not function in Windows 2000. > > > > > > I am very irritated because I do not include/understand why. > > > > This is why I launch you a S.O.S > > > > It is the combobox which does not function under Windows2000, > whereas under XP it is impeccable. > > > > Help me please ! > > > > > > > > > > > > Here my script: > > > > > > $Valeurs_Combo = "" > > $Anomalie=0 > > > > ; ferme le menu précédent > > GUIDelete($_MENU__Principal) > > > > ; lit les différentes valeurs du .ini contenant les noms des Centres > > $i=1 > > While 1 > > $centre=IniRead($Fichier_ini, "Centres", $i, "Valeur Non Trouvée") > > If $centre = "Valeur Non Trouvée" then ExitLoop > > If $i = 1 Then > > $Valeurs_Combo=$centre > > Else > > $Valeurs_Combo=$Valeurs_Combo & "|" & $centre > > EndIf > > $i=$i+1 > > > > Wend > > > > $Commentaires = @CRLF & ".1. Choose the Center in the drop-down > list " & @CRLF & ".2. Click on Fixe the Center " & @CRLF > > $Commentaires = $Commentaires & ".3. Click on Action " & @CRLF & > @CRLF & "TO CANCEL, click on the cross of closing of window or on the > Annuler button! " > > SplashTextOn("COMMENTAIRES", $Commentaires, 655, 155, 50, 390, 0 + > 4, "", 12) > > > > > > ; Crée la boîte de dialogue > > $Choix_du_Centre = GuiCreate("Choose the Center", 291, 257,50,100) > > $Label_Centre = GuiCtrlCreateLabel("Selected Center: None ", 30, > 40, 131, 21, 0x1000) > > $Combo_Centre = GuiCtrlCreateCombo("", 30, 60, 130, 21) > > > > > > ; implémentation des valeurs de la combo box > > GuiCtrlSetData(-1, $Valeurs_Combo) > > > > ;GUISetState ($Choix_du_Centre) > > > > ; création du bouton fixant le Centre > > $Bouton_Fixe_Le_Centre = GuiCtrlCreateButton("Fixe the Center", 30, > 90, 130, 20) > > > > GUISetState ($Choix_du_Centre) > > > > > > ********************************************** > > > > With XP i have a list with Center1, Center2 etc ... > > With 2000 I have an empty list > > > > > > > > --------------------------------- > > Découvrez une nouvelle façon d'obtenir des réponses à toutes vos > questions ! Profitez des connaissances, des opinions et des > expériences des internautes sur Yahoo! Questions/Réponses. > > > > [Non-text portions of this message have been removed] > > >