#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; This works very very well. Low CPU. All you have is the exe in memory for each thread. ; Send messages anyway you need. Try the iniwrite()/iniread(), regwrite()/regread, or fancy _NamedPipes. #include #include #include #include #include If $CmdLine[0] > 0 Then If $CmdLine[1] = "MyFuncThread1" Then MyFuncThread1() If $CmdLine[1] = "MyFuncThread2" Then MyFuncThread2() If $CmdLine[1] = "MyFuncThread3" Then MyFuncThread3() EndIf If @Compiled Then ShellExecute(@AutoItExe, "MyFuncThread1") ShellExecute(@AutoItExe, "MyFuncThread2") ShellExecute(@AutoItExe, "MyFuncThread3") Else ShellExecute(@ScriptName, "MyFuncThread1") ShellExecute(@ScriptName, "MyFuncThread2") ShellExecute(@ScriptName, "MyFuncThread3") EndIf ;*** WARNING, if your thread returns without exiting - it will respawn. (Maybe you need that?) Func MyFuncThread1() _Singleton("MyFuncThread1", 0) MsgBox(0, "", "Thread 1", 0) Exit EndFunc ;==>MyFuncThread1 Func MyFuncThread2() _Singleton("MyFuncThread2", 0) MsgBox(0, "", "Thread 2", 0) Exit EndFunc ;==>MyFuncThread2 Func MyFuncThread3() _Singleton("MyFuncThread3", 0) MsgBox(0, "", "Thread 3", 0) Exit EndFunc ;==>MyFuncThread3