#include <windows.h>
#include <cstdlib>
#include <iostream>

using namespace std;

BOOL WINAPI CtrlHandler(DWORD fdwCtrlType) {
   BOOL ret = FALSE;
   cout << "Control-C..." << endl;
   exit(0);
   return ret;
}

int
main(int argc, char* argv[]) 
{
   SetConsoleCtrlHandler(CtrlHandler, TRUE);
   while(true) {
      cout << "WAKE UP!" << endl;
      Beep(2600, 2600);
      system("type message.txt | tts.exe > Nul");
   } 
   return 0;
}
