I am trying to make a little "cheat" for a typing website, I want the program to:
- Open the Webbrowser and to open the site (done).
- Simulate "F12"-Key to open the Browser Console (not working).
- And then I want the program to type my "cheat" in the Browser console (JavaScript Code).
This is how far I got so far, apparently I cant even open the Browser Console, could someone help me out? :)
using System;
using System.Web;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using WindowsInput.Native;
using WindowsInput;
namespace AutomatingProcess
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Press any key to continue...");
Console.ReadLine();
var prs = new ProcessStartInfo(@"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe");
prs.Arguments = "https://10fastfingers.com/typing-test/english";
Process.Start(prs);
Inject();
Console.WriteLine("Press any key to start the hack...");
}
public static void Inject()
{
InputSimulator sim = new InputSimulator();
sim.Keyboard.KeyPress(WindowsInput.Native.VirtualKeyCode.VK_F12);
}
}
}
My current error: 'VirtualKeyCode' does not contain a definition for 'VK_F12'. I really dont understand what im doing wrong.. for some weird reasons the other keys work like "VK_9" or "VK_SPACE".
Would greatly appreciate any help regarding the SimulateInput problem.