today i wanted to try and make an WPF application that after i click a button it selects an open notepad and sends keys to it...
i googled and found this:

and if i just copy paste that into my app, it gives me errors
can anyone please explain me how this works and how i can make my button select the already oppened notepad and send the keys to it (A,enter,B,enter,C)
this is what i have so far:
Code:
private void button1_Click(object sender, RoutedEventArgs e)
{
SendKeys.Send("{A}");
SendKeys.Send("{ENTER}");
SendKeys.Send("{B}");
SendKeys.Send("{ENTER}");
SendKeys.Send("{C}");
}






