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

  • SEARCH
  • Home
  • 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

Related Questions

I am trying to create an automated clicker program in C# to make some
I am having some issues trying to get my automated builds to compile projects
I'm trying to make a case against automated checkins to version control. My group
I'm trying to create an automated error reporting tool for our Java desktop app.
I'm laying the groundwork for an automated build process and am trying to make
I'm trying to implement some automated getter and setter for php objects. My target
I am trying to make an automated database entry generation with Django, whenever I
I'm writing some kind of automated test suite and I want to make sure
I'm trying to write an automated deployment application that runs on one box but
I am trying to make an automated test/load test on a Silverlight based webapp.

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.