DotNet-Flemmotron/NibblePoker.Flemmotron.Commons/Utils/SendKeys.cs

36 lines
894 B
C#
Raw Permalink Normal View History

namespace NibblePoker.Flemmotron.Commons.Utils;
public class SendKeys {
/*public static async Task Main(string[] args) {
// Simulate a left mouse button click
var input = new INPUT[2];
// Mouse down
input[0] = new INPUT {
type = INPUT_MOUSE,
U = new InputUnion {
mi = new MOUSEINPUT {
dwFlags = MOUSEEVENTF_LEFTDOWN,
}
}
};
// Mouse up
input[1] = new INPUT {
type = INPUT_MOUSE,
U = new InputUnion {
mi = new MOUSEINPUT {
dwFlags = MOUSEEVENTF_LEFTUP,
}
}
};
// Send the input
Imports.SendInput((uint)input.Length, input, Marshal.SizeOf(typeof(INPUT)));
// Optional delay
await Task.Delay(300);
}*/
}