I use a foreach statements in TCL code, but have not figured out how to perform that process in Autoit. What I want to do is have a program which when a process starts, that the program will be able to act on it. but I want to use a list of programs to watch for. TCL Code proc AppProcessCheck {} { SetErrorMode resume SetTimeout 50msec global _SSOERR CloseWindows "*Internet Explorer*" CloseWindows "*THR Mainframe*" DisplayStatusBox "Checking for Open Applications" set user_apps { IEXPLORE.EXE notepad.exe wordpad.exe winword.exe excel.exe powerpnt.exe acrord32.exe Outlook.exe wmplayer.exe MSACCESS.EXE SeAM.exe ess.exe PFM.exe FMReports.exe CPhostpro.exe wfront.exe javaws.exe javaw.exe AtStaff.exe costart.exe VNEXPLORE.exe IEExec.exe DocNeTExplorer.exe RoutingQueueView.exe TRANSFER.exe CVIEWER.exe VNEXPLORE.exe LISTDB.exe Medstat.exe carestat.exe CU.exe ExitCare.exe Elig.exe cvis0054.exe SQStart.exe ogu00.EXE VIPRDE.exe scguiw32.exe fbkLoad.exe Launch.exe WDDspPag.Bin XTND.EXE} set process_list_exe_name "tasklist.exe" ;# from Windows install set winuser "[GetWindowsUserName]" set std_out "" catch {set std_out [exec $process_list_exe_name /NH /FI "USERNAME eq texas\\$winuser"]} set data [split $std_out "\n"] foreach line $data { set endstrg [string first " " $line] set runapp [string range $line 0 [expr {$endstrg - 1}]] if {$runapp != ""} { foreach chkapp $user_apps { if {[string match -nocase "$runapp*" $chkapp]} { TerminateProcesses $runapp } } } } return } any help would be great, basically I looking to compare a static array and dynamic array and if I find a match then perform a task.