Forgive me, I'm a newbie and I'm completing a task for an interview where I'm encouraged to ask for help online (hence why the request is weird).
I have a form that is saved externally that looks like this: https://i.stack.imgur.com/gCnTY.jpg
The task is calling for a console application to input numbers into the form and then copy the label value (see the #2 by the equals button) and save it to memory for output in the console.
Here is the code that I have now - I'm completely unaware of how to even reference the label and was looking for ideas!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
namespace ConsoleApplication19
{
class Program
{
static void Main(string[] args)
{
System.Diagnostics.Process.Start(@"C:\Users\Jenna\Documents\Visual Studio 2013\Projects\WindowsFormsApplication4\WindowsFormsApplication4\bin\Release\WindowsFormsApplication4.exe");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("6");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{TAB}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("0");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{TAB}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{DOWN}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{DOWN}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{DOWN}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{DOWN}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{TAB}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{ENTER}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{TAB}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{ENTER}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{TAB}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{TAB}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{BACKSPACE}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("3");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{TAB}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{TAB}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{ENTER}");
Thread.Sleep(500);
System.Windows.Forms.SendKeys.SendWait("{TAB}");
Thread.Sleep(500);
}
}
}