Author Topic: Click on cmd.exe running.  (Read 1355 times)

Greenhorn

  • Member
  • ***
  • Posts: 493
Re: Click on cmd.exe running.
« Reply #15 on: June 06, 2022, 11:32:42 PM »
You must zero-out the whole structure(s) once before filling it.
I would send it as an array of structures. And you should send the key strokes only if the console window you are looking for is activated and has the keyboard focus, so check the return value of SetForegroundWindow.

Didn't my example work for you ?
Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.

Fraile

  • Member
  • **
  • Posts: 81
Re: Click on cmd.exe running.
« Reply #16 on: June 07, 2022, 01:24:45 AM »
Sorry, I didn't get to test it, because I already got the sendinput function working. But I try what you're telling me.

Thank you very much.