CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Posts
    1

    Creating an application bot

    Hello,

    I have written a bot for the web-browser game (Gladiatus), but it seems application bots to be more different. I am trying to load the game in my Form, so it would be easier for handling. Here is my unsuccessful code:

    Code:
    [DllImport("user32.dll")]
            static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
    
            private void button1_Click(object sender, EventArgs e)
            {
                var clientApplication = Process.Start("C:\\Program Files\\Diablo III\\Diablo III Launcher.exe");         
                var gameForm = new GameWindow();
                gameForm.Show();
                SetParent(clientApplication.MainWindowHandle, gameForm.Handle);
            }

    So I am asking you for help. I want this game to load into my form, or if it would be easier how to make my application to manage the game (as you can see it will be Diablo 3).

    Thank you for your help!

  2. #2
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    Re: Creating an application bot

    (Just a note to say I'm making a personal decision NOT to help out with this, because I don't agree with the [lack of] principles behind creating automated players for games that are designed to be enjoyed by a wide selection of people)
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured