Aide:WinGetPos.txt

De Wiki AutoIt Français
Aller à : navigation, rechercher

Document original V3.3.6.1 :

###Function###
WinGetPos

###Description###
Retrieves the position and size of a given window.

###Syntax###
WinGetPos ( "title" [, "text"] )


###Parameters###
@@ParamTable@@
title
	The title of the window to read. See <a href="../intro/windowsadvanced.htm">Title special definition</a>.
text
	[optional] The text of the window to read.
@@End@@


###ReturnValue###
@@ReturnTable@@
Success:	Returns a 4-element array containing the following information:
	$array[0] = X position
	$array[1] = Y position
	$array[2] = Width
	$array[3] = Height
Failure:	Returns 0 and sets @error to 1 if windows is not found.
@@End@@


###Remarks###
WinGetPos returns negative numbers such as -32000 for minimized windows, but works fine with (non-minimized) hidden windows.
If the window title "Program Manager" is used, the function will return the size of the desktop.  If multiple windows match the criteria, the most recently active window is used.


###Related###
WinGetClientSize, WinMove, WinGetState


###Example###
@@IncludeExample@@


Document traduit V3.3.6.1 :

###Function###
WinGetPos

###Description###
Retrouve la position et la taille d'une fenêtre.


###Syntax###
WinGetPos ( "title" [, "text"] )


###Parameters###
@@ParamTable@@
title
	Le titre de la fenêtre à lire. Voir <a href="../intro/windowsadvanced.htm">Définition spéciale de titre</a>.
text
	[optionnel] Le texte de la fenêtre à lire.
@@End@@


###ReturnValue###
@@ReturnTable@@
Succès:	Retourne un tableau de 4 colonnes contenant les informations suivantes :
	$array[0] = Position X
	$array[1] = Position Y
	$array[2] = Largeur
	$array[3] = Hauteur
Échec:	Retourne 0 et met @error à 1 si la fenêtre n'est pas trouvée.
@@End@@


###Remarks###
WinGetPos retourne des nombres négatifs tels que -32000 pour les fenêtres minimisées, mais fonctionne très bien avec des fenêtres masquées (non réduites).
Si le titre de la fenêtre "Program Manager» est utilisé, la fonction retourne la taille du bureau. Si plusieurs fenêtres correspondent aux critères, la fenêtre active la plus récente est utilisée.


###Related###
<a href="WinGetClientSize.htm">WinGetClientSize</a>, <a href="WinMove.htm">WinMove</a>, <a href="WinGetState.htm">WinGetState</a>


###Example###
@@IncludeExample@@


Traducteur : Jerome

Contributeurs (pour les modifications avant le Wiki) : jbnh, Tlem