Beispiel #1
0
        static void Main(string[] args)
        {
            Tuple <IntPtr, Process> gameProcess = NativeMethodsHelper.ConnectAutoBotToProcess(null, "TicTacToe");

            Console.WriteLine($"Native Process Id = { gameProcess.Item1.ToInt32() }");
            Console.WriteLine($"Process Id = { gameProcess.Item2.Id }");
            Console.WriteLine($"Process Name = { gameProcess.Item2.ProcessName }");

            Console.ReadKey();
        }
Beispiel #2
0
        private void ConnectAutoBotToProcess()
        {
            Tuple <IntPtr, Process> process = NativeMethodsHelper.ConnectAutoBotToProcess(this, TttSettings.TIC_TAC_TOE);

            this.WindowPtr = process.Item1;
        }