我用C#程序写一个程序能自动输入。。问题是锁定整个电脑的屏幕。。而且不能做其他事情。。能不能写锁定上某个软件自动输入。。而且我还可以做其他事情呢
int cg = 0;
int sb = 0;
foreach (DataRow dr in ds.Tables[0].Rows)
{
try
{
string dm = dr[0].ToString();
if (dm.Length > 6)
{
dm = dm.Substring(2, 6);
for (int i = 0; i < dm.Length; i++)
{
SendKeys.Send(dm.Substring(i, 1));
Thread.Sleep(1000);
SendKeys.Flush();
}
int b = 13;
char MyChar = (char)b;
SendKeys.Send(MyChar.ToString());
Thread.Sleep(1000);
SendKeys.Flush();
cg = cg + 1;
}
}
catch
{
sb = sb + 1;
}
}
这是我写的程序代码