Aide et conseils concernant AutoIt et ses outils.
9aylas
Niveau 1
Messages : 7 Enregistré le : lun. 30 janv. 2017 11:40
Status :
Hors ligne
#1
Message
par 9aylas » mar. 31 janv. 2017 16:20
salut a tous j'ai un ptit probleme
regarder le code
j'ai pas pu ajouter tout les info sur l'Edit
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate ( "Manager" , 373 , 281 , 361 , 120 ) GUISetBkColor ( 0x000000 ) $produit = GUICtrlCreateInput ( "Nom Du Produit" , 8 , 8 , 137 , 21 , BitOR ( $GUI_SS_DEFAULT_INPUT , $ES_CENTER , $WS_BORDER ) ) GUICtrlSetFont ( - 1 , 8 , 800 , 0 , "MS Sans Serif" ) GUICtrlSetColor ( - 1 , 0xFF0000 ) $prix = GUICtrlCreateInput ( "Prix De Vente" , 144 , 8 , 89 , 21 , BitOR ( $GUI_SS_DEFAULT_INPUT , $ES_CENTER , $ES_NUMBER , $WS_BORDER ) ) GUICtrlSetFont ( - 1 , 8 , 800 , 0 , "MS Sans Serif" ) GUICtrlSetColor ( - 1 , 0x008000 ) $date = GUICtrlCreateInput ( "Date" , 240 , 8 , 65 , 21 , - 1 , BitOR ( $WS_EX_CLIENTEDGE , $WS_EX_STATICEDGE ) ) GUICtrlSetColor ( - 1 , 0x000080 ) $add = GUICtrlCreateButton ( "Ajouter" , 312 , 8 , 57 , 129 ) $Button2 = GUICtrlCreateButton ( "Exit" , 312 , 144 , 57 , 129 ) $Edit1 = GUICtrlCreateEdit ( "" , 8 , 32 , 297 , 241 , BitOR ( $ES_AUTOVSCROLL , $ES_AUTOHSCROLL , $ES_WANTRETURN , $WS_VSCROLL ) ) GUISetState ( @SW_SHOW ) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg ( ) Switch $nMsg Case $add $info = GUICtrlRead ( $produit ) GUICtrlSetData ( $Edit1 , $info ) Case $GUI_EVENT_CLOSE Exit Case $Button2 Exit Case $Form1 EndSwitch WEnd
parazitenew
Niveau 7
Messages : 310 Enregistré le : sam. 10 déc. 2011 15:08
Localisation : Algerie
Status :
Hors ligne
#2
Message
par parazitenew » mar. 31 janv. 2017 16:56
Bonjour,
Ceci explique ton problème. Tu ne fais qu'insérer ce qui est saisie dans le champ produit. Si tu veux afficher le prix et la date aussi, alors il faut procéder de la même manière, à savoir lire et mettre dans des variables le contenu des autres inputs.
9aylas
Niveau 1
Messages : 7 Enregistré le : lun. 30 janv. 2017 11:40
Status :
Hors ligne
#3
Message
par 9aylas » mar. 31 janv. 2017 17:21
sa marche pas , quand j'ajoute les autre variables , rien est affiché sur l'Edit
Nicoloquinte
Niveau 4
Messages : 70 Enregistré le : ven. 15 juil. 2016 11:57
Status :
Hors ligne
#4
Message
par Nicoloquinte » mar. 31 janv. 2017 19:04
Heu Je crois que j'ai compris
Mais tu n'avait pas formulé cela dans ta question au début
Mais du coup j'ai fait tout ton boulot .......................
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> $Aff = "" #Region ### START Koda GUI section ### Form= $Form1 = GUICreate ( "Manager" , 373 , 281 , 361 , 120 ) GUISetBkColor ( 0x000000 ) $produit = GUICtrlCreateInput ( "Nom Du Produit" , 8 , 8 , 137 , 21 , BitOR ( $GUI_SS_DEFAULT_INPUT , $ES_CENTER , $WS_BORDER ) ) GUICtrlSetFont ( - 1 , 8 , 800 , 0 , "MS Sans Serif" ) GUICtrlSetColor ( - 1 , 0xFF0000 ) $prix = GUICtrlCreateInput ( "Prix De Vente" , 144 , 8 , 89 , 21 , BitOR ( $GUI_SS_DEFAULT_INPUT , $ES_CENTER , $ES_NUMBER , $WS_BORDER ) ) GUICtrlSetFont ( - 1 , 8 , 800 , 0 , "MS Sans Serif" ) GUICtrlSetColor ( - 1 , 0x008000 ) $date = GUICtrlCreateInput ( "Date" , 240 , 8 , 65 , 21 , - 1 , BitOR ( $WS_EX_CLIENTEDGE , $WS_EX_STATICEDGE ) ) GUICtrlSetColor ( - 1 , 0x000080 ) $add = GUICtrlCreateButton ( "Ajouter" , 312 , 8 , 57 , 129 ) $Button2 = GUICtrlCreateButton ( "Exit" , 312 , 144 , 57 , 129 ) $Edit1 = GUICtrlCreateEdit ( "" , 8 , 32 , 297 , 241 , BitOR ( $ES_AUTOVSCROLL , $ES_AUTOHSCROLL , $ES_WANTRETURN , $WS_VSCROLL ) ) GUISetState ( @SW_SHOW ) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg ( ) Switch $nMsg Case $add $Aff = GUICtrlRead ( $Edit1 ) & @CRLF
& GUICtrlRead ( $produit ) & " " & GUICtrlRead ( $prix ) & " €" & " " & GUICtrlRead ( $date ) GUICtrlSetData ( $Edit1 , $Aff ) Case $GUI_EVENT_CLOSE Exit Case $Button2 Exit Case $Form1 EndSwitch WEnd
Nico ¤_¤
walkson
Modérateur
Messages : 1037 Enregistré le : ven. 12 août 2011 19:49
Localisation : Hurepoix
Status :
Hors ligne
#5
Message
par walkson » mar. 31 janv. 2017 19:15
GUICtrlSetData ( controlID, data [, default] )
controlID The control identifier (controlID) as returned by a GUICtrlCreate...() function, or -1 for the last created control.
data Combo, List, ListView, ListViewItem: An Opt("GUIDataSeparatorChar",...) separated list of items.
Progress: The percentage.
Slider: The value.
Button, Checkbox, Combo, Edit, Group, Input, Label, List, Menu, MenuItem, Radio, TabItem, TreeViewItem: Replaces the text.
Date : The date or time depending the style of the control and the regional settings.
Dummy: The value.
default [optional]
Combo, List: The default value.
Edit, Input: If non-empty (""), the string is inserted at the current insertion point (caret).
Case $add $info = GUICtrlRead ( $produit ) & @CRLF GUICtrlSetData ( $Edit1 , $info , 1 ) $info = GUICtrlRead ( $prix ) & @CRLF GUICtrlSetData ( $Edit1 , $info , 1 ) $info = GUICtrlRead ( $date ) & @CRLF GUICtrlSetData ( $Edit1 , $info , 1 ) GUICtrlSetData ( $Edit1 , @CRLF , 1 ) ;ou $info = GUICtrlRead ( $produit ) & "> " & GUICtrlRead ( $prix ) & "> " & GUICtrlRead ( $date ) & @CRLF GUICtrlSetData ( $Edit1 , $info , 1 ) GUICtrlSetData ( $Edit1 , @CRLF , 1 ) ;ou $info = GUICtrlRead ( $produit ) & @TAB GUICtrlSetData ( $Edit1 , $info , 1 ) $info = GUICtrlRead ( $prix ) & @TAB GUICtrlSetData ( $Edit1 , $info , 1 ) $info = GUICtrlRead ( $date ) & @CRLF GUICtrlSetData ( $Edit1 , $info , 1 )
Cordialement,
Walkson
"Horas non numero nisi serenas " Le canon de midi
(Je ne compte que les heures heureuses)
9aylas
Niveau 1
Messages : 7 Enregistré le : lun. 30 janv. 2017 11:40
Status :
Hors ligne
#7
Message
par 9aylas » jeu. 02 févr. 2017 16:19
Ooooh merci a vous a l'infinie <3
c'es bon sa marche & j'ai ajouter de + le boutton enregistrer + éffacer le text mércyyyyyyy