Aide:ControlClick.txt
De Wiki AutoIt Français
Document original V3.3.6.1 :
###Function###
ControlClick
###Description###
Sends a mouse click command to a given control.
###Syntax###
ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y ]]]] )
###Parameters###
@@ParamTable@@
title
The title of the window to access.
text
The text of the window to access.
controlID
The control to interact with. See <a href="../intro/controls.htm">Controls</a>.
button
[optional] The button to click, "left", "right", "middle", "main", "menu", "primary", "secondary". Default is the left button.
clicks
[optional] The number of times to click the mouse. Default is 1.
x
[optional] The x position to click within the control. Default is center.
y
[optional] The y position to click within the control. Default is center.
@@End@@
###ReturnValue###
@@ReturnTable@@
Success: Returns 1.
Failure: Returns 0.
@@End@@
###Remarks###
Some controls will resist clicking unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlClick().
Using 2 for the number of clicks will send a double-click message to the control - this can even be used to launch programs from an explorer control!
If the user has swapped the left and right mouse buttons in the control panel, then the behaviour of the buttons is different. "Left" and "right" always click those buttons, whether the buttons are swapped or not. The "primary" or "main" button will be the main click, whether or not the buttons are swapped. The "secondary" or "menu" buttons will usually bring up the context menu, whether the buttons are swapped or not.
<a name="table"></a>
@@StandardTable1@@
<b>Button</b> <b>Normal</b> <b>Swapped</b>
"" Left Left
"left" Left Left
"middle" Middle Middle
"right" Right Right
"primary" Left Right
"main" Left Right
"secondary" Right Left
"menu" Right Left
@@End@@
###Related###
ControlCommand, MouseClick, WinActivate
###Example###
@@IncludeExample@@
Document traduit V3.3.6.1 :
###Function###
ControlClick
###Description###
Envoi un clic de souris sur un contrôle spécifié.
###Syntax###
ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y ]]]] )
###Parameters###
@@ParamTable@@
title
Le titre de la fenêtre à atteindre.
text
Le texte de la fenêtre à atteindre.
controlID
Le contrôle avec lequel interagir. Voir <a href="../intro/controls.htm">Controls</a>.
button
[optionnel] Le bouton à cliquer : "left", "right", "middle", "main", "menu", "primary", "secondary". Bouton gauche ("left") par défaut.
clicks
[optionnel] Le nombre de clics à effectuer sur le contrôle. 1 par défaut.
x
[optionnel] La position x du clic sur le contrôle. Centré par défaut.
y
[optionnel] La position y du clic sur le contrôle. Centré par défaut.
@@End@@
###ReturnValue###
@@ReturnTable@@
Succès: Retourne 1.
Échec: Retourne 0.
@@End@@
###Remarks###
Certains contrôles peuvent résister aux clics tant qu'ils ne sont pas dans la fenêtre active. Utilisez la fonction WinActivate() pour mettre la fenêtre des contrôles au premier plan avant d'utiliser ControlClick().
La valeur 2 pour le nombre de clics permettra d'effectuer un double-clic sur le contrôle - Cela peut également servir à lancer des programmes depuis une fenêtre de l'explorateur !
Si l'utilisateur a permuté les boutons gauche et droite de la souris dans le panneau de configuration, alors le comportement de la fonction est différent. "Left" et "right" cliquent respectivement sur les boutons gauche et droite, qu'ils soient inversés ou non. Le bouton "primary" ou "main" seront le clic principal même si les boutons sont permutés. Le bouton "secondary" ou "menu" feront apparaitre le menu contextuel même si les boutons sont permutés.
<a name="table"></a>
@@StandardTable1@@
<b>Bouton</b> <b>Normal</b> <b>Permuté</b>
"" Gauche Gauche
"left" Gauche Gauche
"middle" Milieu Milieu
"right" Droite Droite
"primary" Gauche Droite
"main" Gauche Droite
"secondary" Droite Gauche
"menu" Droite Gauche
@@End@@
###Related###
<a href="ControlCommand.htm">ControlCommand</a>, <a href="MouseClick.htm">MouseClick</a>, <a href="WinActivate.htm">WinActivate</a>
###Example###
@@IncludeExample@@
Traducteur : ZDS
Contributeurs (pour les modifications avant le Wiki) : Tlem