Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8421427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:08:52+00:00 2026-06-10T03:08:52+00:00

I am looking to create an overlay to a strategy game called Dune 2000.

  • 0

I am looking to create an overlay to a strategy game called Dune 2000. It is annoying that to create 10 soldiers, you have to click the icon everytime one is completed. There is no queue.
So without interfering in how the game works, i would like to listen to the mouse movements, and when a click at position XY is made, i would like that to repeat for example ten times, with the right time inbetween. Is there any libary that allows me to do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:08:54+00:00Added an answer on June 10, 2026 at 3:08 am

    Below is a Autoclicker code for the right mousebutton. For the left mouse button use
    mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); and mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); .

    #include <windows.h>
    #include <iostream>
    #include <stdlib.h>
    #include <time.h>
    using namespace std;
    
    bool KeyIsPressed( unsigned char k )
    {
        USHORT status = GetAsyncKeyState( k );
        return (( ( status & 0x8000 ) >> 15 ) == 1) || (( status & 1 ) == 1);
    }
    
    int WINAPI WinMain( HINSTANCE hInst, HINSTANCE P, LPSTR CMD, int nShowCmd )
    {
    
        MessageBox( NULL, "[CTRL] + [SHIFT] + [HOME]: Start/Pause\n [CTRL] + [SHIFT] + [END]: Quit", "Instructions", NULL );
        HWND target = GetForegroundWindow();
    
        POINT pt;
        RECT wRect;
        int delay;
        bool paused = true;
    
        srand( time(NULL) );
    
        while ( 1 )
        {
            if ( KeyIsPressed( VK_CONTROL ) && KeyIsPressed( VK_SHIFT ) && KeyIsPressed( VK_HOME ) )
            {
                paused = !paused;
                if ( paused )
                {
                    MessageBox( NULL, "Paused.", "Notification", NULL );
                }
                else
                {
                    cout << "Unpaused.\n";
                    target = GetForegroundWindow();
                    cout << "Target window set.\n";
                }
                Sleep( 1000 );
            }
    
            // Shutdown.
            if ( KeyIsPressed( VK_CONTROL ) && KeyIsPressed( VK_SHIFT ) && KeyIsPressed( VK_END ) )
            {
                MessageBox( NULL, "AutoClicker Shutdown.", "Notification", NULL );
                break;
            }
    
            if ( paused == false && GetForegroundWindow() == target )
            {
                GetCursorPos( &pt );
                GetWindowRect( target, &wRect );
    
                // Make sure we are inside the target window.
                if ( pt.x > wRect.left && pt.x < wRect.right && pt.y > wRect.top && pt.y < wRect.bottom )
                {
                    mouse_event( MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0 );
                    mouse_event( MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0 );
                }
                delay = (rand() % 3 + 1) * 100;
                Sleep( delay );
            }
        }
    
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking to create a video using a set of png images that have
I looking to create a custom calender with Zend Framework, I am hoping that
Im looking to create a control that would look like comic baloon. In WPF
I'm looking to create something like in this image. Each block would have an
I am looking to create a reg ex in JS that obtains 2 values
I am looking to create something that resembles a table in Tkinter but it
I'm looking to create a windows program that doesn't require any environmental dependencies (like
I am trying to create a simple 3-D app for android that will have
I am looking to create a Nav Bar in my Android application that functions
I've got a list view in my content area. Looking to create a overlay

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.