Jump to content

press start bot programmaticaly


zzzar

Recommended Posts

Hello, i make own lightweight lame logger/relogger and stuck at press "Start" button of bot.

at first SetForegroundWindow(p.MainWindowHandle); // focus bot window

then i try various ways

1) SendKeys.SendWait("%(c)");

2)         keybd_event(0x12, 0, 0x02, UIntPtr.Zero); // press alt
            Thread.Sleep(1000);
            keybd_event(0x43, 0, 0x02, UIntPtr.Zero);  // press c
            Thread.Sleep(400);
            keybd_event(0x12, 0, 0x00, UIntPtr.Zero); // unpress alt
            keybd_event(0x43, 0, 0x00, UIntPtr.Zero);  // unpress c

3) even try to tab between bot window elements

but none work, like keys not send to window, but tested on notepad and it works . Is there way to press start button?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...