Hack Forums
Can someone code me a basic program for me (Involves controlling another program) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: Can someone code me a basic program for me (Involves controlling another program) (/showthread.php?tid=2333263)



Can someone code me a basic program for me (Involves controlling another program) - Automatic Coding - Mar 24, 2012

I have no idea how to control a different program from without yours, but, I need to do it. Either can you give me the source to an example, or can you code a bot which reads a list of serials off a .txt, then, injects into steam and tries them ALL? Preferably without keyboard presses, considering that'll render my PC useless till it's done.

Well... I tried to throw one together with keyboard inputs and it froze my whole PC... >.>

Code
private void button1_Click(object sender, EventArgs e)
  {
    System.Threading.Thread.Sleep(5000);
    System.IO.TextReader t = new System.IO.StreamReader("C:\\users\\nicholas\\desktop\\keys.txt");
    string currentLine;
    while((currentLine = t.ReadLine()) != null) {
    SendKeys.SendWait("{tab}{tab}{tab}{tab}+a{del}");
    System.Threading.Thread.Sleep(100);
    SendKeys.SendWait(currentLine);
    System.Threading.Thread.Sleep(100);
    SendKeys.SendWait("{enter}");
    System.Threading.Thread.Sleep(5000);
    SendKeys.SendWait("{enter}");
    System.Threading.Thread.Sleep(100);
    }
  }