Je veux bien votre code
D'abord, voici le code permettant de récupérer le nom
Private Declare Function GetWindowTextLength Lib "user32.dll" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Private Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal nMaxCount As Long) As Long
Private Declare Function EnumWindows Lib "user32.dll" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Private Function EnumWindowsProc&(ByVal hwnd&, ByVal lParam&)
Dim SLength&, Buffer As String, RetVal&
SLength = GetWindowTextLength(hwnd) + 1
If SLength > 1 Then
Buffer = Space(SLength)
RetVal = GetWindowText(hwnd, Buffer, SLength)
If CBool(IsWindowVisible(hwnd)) Then Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Value = hwnd & " :: " & Left(Buffer, SLength - 1)
End If
EnumWindowsProc = 1
End Function
Sub ListAppli()
Application.ScreenUpdating = False
Cells.ClearContents
Cells(1, 1) = "CAPTION = "
EnumWindows AddressOf EnumWindowsProc, 0
Cells.Columns.AutoFit
Application.ScreenUpdating = True
End Sub
Ce programme n'est pas (totalement) de moi, j'utilise quelque chose de plus simple avec AutoIt
Voici comment activer PuTTY pour mon cas personnel en fonction des réponses de la macro.
Sub appeler()
AppActivate "pi@bpi-iot-ros-ai: ~" ' à customiser ...
End Sub
Par contre j aimerai aussi rendre les commandes at dans le code
Je viens de déterrer un code que j'avais développé en mai 2018 (tiens c'est pas si vieux que cela) pour interfacer avec l'arduino dans le cadre d'un projet d'horloge 2.0, je vais m'y replonger.
Tu peux néanmoins analyser la version de Pierre en premier (car dans mon cas je me souviens que cela avait été un poil laborieux).
Cela dit, tu as une solution interfacée avec PuTTY pour mitrailler de sms ...
Michel