Bonjour,
Est-il possible en Powershell de récupérer le Handle de la fenêtre active de Windows ?
Merci d'avance.![]()
Bonjour,
Est-il possible en Powershell de récupérer le Handle de la fenêtre active de Windows ?
Merci d'avance.![]()
Oui
Code powershell : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 Add-Type @" using System; using System.Runtime.InteropServices; public class Win32 { [DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow(); } "@ $handle = [Win32]::GetForegroundWindow()
Merci pour votre solution, ça marche nickel.![]()
Partager