static void Main(string[] args)
        {
            ScrapMessages   sm = new ScrapMessages();
            XboxNavigation  xn = new XboxNavigation();
            Halo5Navigation hn = new Halo5Navigation();

            sm.LoginWithRawCookie();

            Console.WriteLine("5 seconds to focus Xbox Streaming App");
            BringToFront("Xbox");
            Thread.Sleep(5000);

            Thread thread = new Thread(() => Scrapthread(sm));

            thread.Start();


            Stopwatch sw = new Stopwatch();

            xn.SelectGame();
            hn.SelectCustomGameOnLaunch();
            hn.SelectMapAlpine();
            hn.SelectModeFFARockets();
            hn.StartGame();
            sw.Restart();

            while (true)
            {
                if (gamertag != null && !gamertag.Equals(prevGamertag))
                {
                    prevGamertag = gamertag;
                    Console.WriteLine("Sending invite to " + gamertag);
                    xn.SendInvite(gamertag);
                }

                if (sw.Elapsed.Minutes >= 13)
                {
                    hn.SelectMapAlpine();
                    hn.SelectModeFFARockets();
                    hn.StartGame();
                    sw.Restart();
                }
                Thread.Sleep(500);
            }
        }
 public static void Scrapthread(ScrapMessages sm)
 {
     gamertag = sm.GetNextGamertagRequestedToJoin();
     Thread.Sleep(60000);
 }