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 464123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:14:37+00:00 2026-05-12T23:14:37+00:00

im trying to make a automated tool for poulating textboxes with usernames for a

  • 0

im trying to make a automated tool for poulating textboxes with usernames for a dispatcher application at work.

Im having some problems trying to simultate key press, if the inputArrayX[i] array contains a,b,c

the keyboardsim will press abc, but if the Array contains a,b,b,c,c it still only types out abc, and not abbcc like i want it to do.

anyone have a clue what im doing wrong here?

    private void MouseMacroChangeUser()
    {

        //move form to 0,0
        this.Location = new Point(0, 0);
        //set xy to mouse current pos
        userMousePos();
        //inputBlocker();
        xX = int.Parse(this.Location.X.ToString());
        yY = int.Parse(this.Location.Y.ToString());
        defaultMousePos();
        //Thread.Sleep(600);

        Cursor.Position = new Point(Cursor.Position.X + 739, Cursor.Position.Y + 162);
        //Thread.Sleep(100);
        MouseSimulator.DoubleClick(MouseButton.Left);
        for (int i = 0; i < inputArrayX.Length; i++)
        {
            string tempX = inputArrayX[i].ToString();
            Keys keys = mapToKeyboardMacro(tempX);
            KeyboardSimulator.KeyDown(keys);
        }
        KeyboardSimulator.KeyPress(Keys.Enter);
        MouseSimulator.Click(MouseButton.Left);

        //reset mouse to user pos.
        Cursor.Position = new Point(x, y);

        needUnblock = true;

        //inputBlocker();
    }

    private Keys mapToKeyboardMacro(string key)
    {
        if (key == "space")
        {
            return Keys.Space;
        }
        else if (key == "a")
        {
            return Keys.A;
        }
        else if (key == "b")
        {
            return Keys.B;
        }
        else if (key == "c")
        {
            return Keys.C;
        }
        else if (key == "d")
        {
            return Keys.D;
        }
    }
  • 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-05-12T23:14:37+00:00Added an answer on May 12, 2026 at 11:14 pm

    You are never firing the KeyUp command from your KeyboardSimulator. When the key is down it cannot be pressed again. You have to let the KeyUp in order to fire a new KeyDown event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 238k
  • Answers 238k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If null is a possible expected value, then test for… May 13, 2026 at 6:53 am
  • Editorial Team
    Editorial Team added an answer When you double-click in Firefox, you get two click events… May 13, 2026 at 6:53 am
  • Editorial Team
    Editorial Team added an answer After reading this post. I decided to use the following… May 13, 2026 at 6:53 am

Related Questions

I'm laying the groundwork for an automated build process and am trying to make
I'm trying to make a case against automated checkins to version control. My group
Is there an easy way to make a code TextBox? I'm trying to make
I'm not sure whether to post it here or at ServerFault. Anyway, I'm trying

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.