Странно, все вроде бы должно работать. Но увы.
Вот пример...
Вторая часть:
Вроде бы все верно?
Вот пример...
Код:
#include <ie.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <WindowsConstants.au3>
#include <Encoding.au3>
#include <GuiEdit.au3>
#include <File.au3>
#include <WinAPI.au3>
#include <FontConstants.au3>
#include <Constants.au3>
$widht = 1000
$height = 680
$hGui = GUICreate('TABLE', $widht, $height)
GUISetState(@SW_SHOW, $hGui)
$run = GUICtrlCreateButton('Попытка', 2, 460, 100, 40)
$hListView = _GUICtrlListView_Create($hGui, "", 0, 40, 1000, 394)
; font
$hFont = _WinAPI_CreateFont(16, 6, 0, 0, $FW_NORMAL, False, False, False, $DEFAULT_CHARSET, _
$OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Georgia')
_WinAPI_SetFont($hListView, $hFont, True)
_GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT))
_GUICtrlListView_AddColumn($hListView, "url", 200)
_GUICtrlListView_AddColumn($hListView, "process", 200)
$sBase = @ScriptDir & '\base.txt'
$count = 0
While 1
$count += 1
$url = FileReadLine($sBase, $count)
If $url = '' Then ExitLoop
_GUICtrlListView_AddItem($hListView, $url)
;_GUICtrlListView_AddSubItem($hListView, 0,$url,0) ; 1) сама строчка 2) - в какой колонке
WEnd
While 1
$msg = GUIGetMsg($hGui)
Switch $msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $run
$iPid = Run('test.exe', @ScriptDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD)
Global $iCount = 0, $iPid = 0
While 1
ConsoleWrite($iCount)
StdinWrite($iPid, $iCount)
$iCount += 1
Sleep(100)
WEnd
EndSwitch
WEnd
Вторая часть:
Код:
$hForm = GUICreate('', 100, 30)
$iLabel = GUICtrlCreateLabel('Test', 10, 10, 80, 20)
GUISetState()
AdlibRegister('__Read', 100)
While 1
Switch GUIGetMsg()
Case -3
Exit
EndSwitch
Wend
Func __Read()
$sRead = ConsoleRead()
If $sRead Then
GUICtrlSetData($iLabel, $sRead)
EndIf
EndFunc
Вроде бы все верно?