Jump to content
Sign in to follow this  
Groumphy

controlID

Recommended Posts

Hello,

Being newbies in the creation of interface with AutoIT v3.1.0, I does understand the following mention : controlID in the use of GUICtrlCreate ...

What is this ?

The name of the button ?

Can you give me an example?

Here a source code :

GUICtrlCreateButton("Message d'erreur", 10, 50, 100, 30)
GUICtrlSetTip(-1, "Copier le message d'erreur dans le presse-papier ou le bloc-note")

Which is the controlID of this button?

I tried to store the button in a variable, but I do not arrive has to capture the value of the variable.

Here a source code :

Dim $boutonerreur; $processusactif, $abandons

$boutonerreur = GUICtrlCreateButton("Message d'erreur", 10, 50, 100, 30)
GUICtrlSetTip(-1, "Copier le message d'erreur dans le presse-papier ou le bloc-note")
$processusactif = GUICtrlCreateButton("Processus actif", 115, 50, 100, 30)
GUICtrlSetTip(-1, "Copier les processus dans un fichier texte situé sur votre bureau")
$abandons = GUICtrlCreateButton("Annuler", 220, 50, 100, 30)
GUICtrlSetTip(-1, "Annuler les opérations")

If $abandons = 1 then
    Exit
Else
EndIf

Afflicted of such a ridiculous question, but version 3.1.0 brings its quota of innovation ! :lmao:

Afflicted of my bad English, but I speak only French and dutch (I use translator :"> ).

thank you for your precise details and your help,

Groumphy


----------------------GroumphyMore information about me [Fr]

Share this post


Link to post
Share on other sites

This will explain it. (I hope)

#include <GUIConstants.au3>
Dim $boutonerreur; $processusactif, $abandons

GUICreate('New GUI')

$boutonerreur = GUICtrlCreateButton("Message d'erreur", 10, 50, 100, 30)
   GUICtrlSetTip(-1, "Copier le message d'erreur dans le presse-papier ou le bloc-note")
   
$processusactif = GUICtrlCreateButton("Processus actif", 115, 50, 100, 30)
   GUICtrlSetTip(-1, "Copier les processus dans un fichier texte situé sur votre bureau")
   
$abandons = GUICtrlCreateButton("Annuler", 220, 50, 100, 30)
   GUICtrlSetTip(-1, "Annuler les opérations")

GUISetState()

While 1
   Sleep(25)
   $msg = GUIGetMsg()
   
   If $msg = $GUI_EVENT_CLOSE Then
      GUIDelete()
      EXIT
      
   ElseIf $msg = $abandons then
      Exit
      
   EndIf
WEnd

Share this post


Link to post
Share on other sites

Hello,

Being newbies in the creation of interface with AutoIT v3.1.0, I does understand the following mention : controlID in the use of GUICtrlCreate ...

What is this ?

The name of the button ?

Can you give me an example?

Here a source code :

GUICtrlCreateButton("Message d'erreur", 10, 50, 100, 30)
GUICtrlSetTip(-1, "Copier le message d'erreur dans le presse-papier ou le bloc-note")

Which is the controlID of this button?

I tried to store the button in a variable, but I do not arrive has to capture the value of the variable.

Here a source code :

Dim $boutonerreur; $processusactif, $abandons

$boutonerreur = GUICtrlCreateButton("Message d'erreur", 10, 50, 100, 30)
GUICtrlSetTip(-1, "Copier le message d'erreur dans le presse-papier ou le bloc-note")
$processusactif = GUICtrlCreateButton("Processus actif", 115, 50, 100, 30)
GUICtrlSetTip(-1, "Copier les processus dans un fichier texte situé sur votre bureau")
$abandons = GUICtrlCreateButton("Annuler", 220, 50, 100, 30)
GUICtrlSetTip(-1, "Annuler les opérations")

If $abandons = 1 then
    Exit
Else
EndIf

Afflicted of such a ridiculous question, but version 3.1.0 brings its quota of innovation ! o:)

Afflicted of my bad English, but I speak only French and dutch (I use translator  :">  ).

thank you for your precise details and your help,

Groumphy

<{POST_SNAPBACK}>

Je ne sais pas si c'est facile de traduire le Help. Néanmoins il faut essayer de comprendre la section "GUI Reference" puis d'utiliser les exemples des fonctions.

Le CotrolId est un identifieur qui permet par la suite de lire/ecrire l'etat/valeur d'un controle par GuiCtrlRead/GuiCtrlSetData/ GuiCtrlGetState/ GuiCtrlSetState.

J'espère que cela te donne une piste pour décoller.

Sorry for non French speaking. I try to help him :lmao:

Share this post


Link to post
Share on other sites

@ SlimShady > THANK YOU ! :) Thanks to your example I understood. My error was not to defer on a variable in the LOOP of the WHILE. I used a variable which I intended to use like a traditional (script) GUI (MsgBox etc.) and thus I did not find the value of return.:lmao:

@ jpm > Merci de ton aide ! Tu te débrouille comme un chef en français ! J'avais lu la section GUI Reference mais ne la comprenais pas. Les exemples n'étais pas aussi évident que celui donné par SlimShady. o:)

Thank you for this fast help !

Merci de cette aide rapide !

I'll be back © of T1


----------------------GroumphyMore information about me [Fr]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...