#include "CoProc.au3"
$Form1 = GUICreate("Form1", 623, 444, 192, 124)
$Button1 = GUICtrlCreateButton("OK", 168, 248, 249, 73)
$Label1 = GUICtrlCreateLabel("This is for test!", 184, 120, 230, 41)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
_CoProc("Test", $Form1 & '|' & $Label1)
EndSwitch
WEnd
Func Test($sParam)
$aParam = StringSplit($sParam, "|")
$hWnd = HWnd($aParam[1])
ControlSetText($hWnd, '', Number($aParam[2]), 'Change the text!')
EndFunc ;==>Test
|