Dim $aInf[6][2] = [[5]], $sFileRun = @WindowsDir & '\notepad.exe'
For $i = 1 To $aInf[0][0]
$aInf[$i][0] = Run($sFileRun)
Sleep(250)
Next
$aList = WinList('[Class:Notepad]')
For $i = 1 To $aInf[0][0]
For $j = 1 To $aList[0][0]
If Not BitAND(WinGetState($aList[$j][1]), 2) Then ContinueLoop
$iTemp = WinGetProcess($aList[$j][1])
If $iTemp = $aInf[$i][0] Then
$aInf[$i][1] = $aList[$j][1]
ExitLoop
EndIf
Next
Next
$iTemp = 0
For $i = 1 To $aInf[0][0]
WinSetTitle($aInf[$i][1], '', 'Window number ' & $i);можно эту строку убрать
ControlSend($aInf[$i][1], '', '[CLASS:Edit; INSTANCE:1]', 'Window number ' & $i & @CRLF & 'Handle: ' & _
$aInf[$i][1] & @CRLF & 'PID: ' & $aInf[$i][0] & @CRLF & 'Title: ' & WinGetTitle($aInf[$i][1]))
Next