#include 'AuThread.au3' #include 'Array.au3' Opt("MustDeclareVars", 1) Global $h0, $h1, $h2, $h3 Global $testNumber = 100 Dim $testCase[101][8] ProgressOn("Creating an arrays of test case", "") For $i = 0 To $testNumber ProgressSet($i) $h0 = CreateThread("whatever") $testCase[$i][0] = $h0 $h1 = CreateThread("iamsub") $testCase[$i][1] = $h1 ; Opens another one $h2 = CreateThread("iamanothersub") $testCase[$i][2] = $h2 ; And opens another one, that will just close itself (as an example) $h3 = CreateThread("openandclose") $testCase[$i][3] = $h3 $testCase[$i][4] = "I am the main thread" $testCase[$i][5] = TerminateThread($h1) ; Terminates h1 thread $testCase[$i][6] = TerminateThread($h2) ; Terminates h2 thread $testCase[$i][7] = TerminateThread("") ; Terminates no threads Next ProgressOff() _ArrayDisplay($testCase, "AuThread.au3 " & $testNumber & "test case", "", 0, "|", "whever|sub1|sub2|open&close|main|termiTh1|termiTh1|termiNO") Func iamsub($hThread) ConsoleWrite($i & "|") EndFunc ;==>_iamsub Func iamanothersub($hThread) ConsoleWrite($i & @CRLF) EndFunc ;==>_iamanothersub Func openandclose($hThread) Return TerminateThread($hThread) ConsoleWrite("This message will not show up" & @CRLF) EndFunc ;==>openandclose