title: SendKey.Send(variable) does not work on other computers
body: <p>Someone told me he needs a program to type names in a textbox from another application. I am not able to get an API from the application. He has to type names which are listed in an excel file. After each name he has to press <em>enter</em> to create something similar to tags in YouTube or stackoverflow.
  There is no other way than doing it like this unless if there is any sort of code I do not know about. That's why I am asking for help.
  I have considered taking a look at these but no answer was a solution.<br />
  <a href="https://stackoverflow.com/questions/7421840/why-does-sendkey-send-only-work-once-in-a-while">Why does SendKey.Send() only work once in a while?</a> --> The appsetting is added to the config file.<br />
  <a href="https://stackoverflow.com/questions/11402643/sendkey-send-not-working">SendKey.Send() Not working</a> --> I have to type variables<br /></p>
  
  <p>I succeeded in creating this application. I tested it on both my laptop and my desktop. It works on both.
  It also works on a laptop of a family member. This family member is a regular computer user who does not code anything.</p>
  
  <p><strong>Goal of program:</strong> <br />
  Type names which are listed in an excel file and separate them with any value into another application/site.</p>
  
  <p>For example:<br />
  Values:<br />
  Jones<br />
  Holmes<br />
  Jonhson<br />
  Potter<br /><br />
  Separation value = ";"<br /><br />
  Output:<br />
  Jones;Holmes;Jonhson;Potter</p>
  
  <p><strong>The problem is:</strong><br />
  The application does not work on random computers (laptops and deskops). The application works untill it has to execute the SendKey.Send command. But after a few seconds the application confirms that the entire process has been executed. This confirmation is hardcoded in my application with a messagebox. Right before the confirmation it only types the first character of the first name. </p>
  
  <p>All the mentioned computers are windows 10.
  I have tried it with both SendKeys.Send and SendKeys.SendWait.</p>
  
  <p>Thanks in advance for your help!</p>
  
  <p><br /><strong>The code:</strong> (triggered by a simple button click)</p>
  
  <pre><code>List&lt;string&gt; Values = new List&lt;string&gt;(); //These are set by another method --&gt; it's not empty and works fine
  string Split = string.Empty;
  switch (strSplitValue)
  {
      case "ENTER":
          Split = "";
      break;
      case "SPATIE":
          Split = " ";
      break;
      case ",":
          Split = ", ";
      break;
      case ";":
          Split = ";";
      break;
      case "/":
          Split = "/";
      break;
      case "\\":
          Split = "\\";
      break;
      default:
          Split = strSplitValue;
      break;
  }
  //A messagebox pops up here to clarify that the user has 8s to click with the mouse on the place where the application has to type its values. After pessed ok, it goes on.
  //This messagebox always works. The program fails from the moment it executes SendKeys.Send
  try {
          foreach (string x in Values)
          {
              string strSendkeys = x + Split;
              SendKeys.Send(strSendkeys);
          if (strSplitValue == "ENTER")
              {
                  Thread.Sleep(1200);
                  SendKeys.Send("{ENTER}");
                  Thread.Sleep(200);
              }
      }
      MessageBox.Show("Task succeeded!", "Succeeded!", MessageBoxButtons.OK, MessageBoxIcon.Information);
  }
  catch {
      MessageBox.Show("Something went wrong.");
  }
  </code></pre>