void wait() { // warteschleife while (FileIsExist("file.txt")==false && !IsStopped()) { Sleep(3000); } }