这个是引入大漠插件注册的
[C#] 纯文本查看 复制代码 static string AutoRegCom(string strCmd)
{
string rInfo;
try
{
Process myProcess = new Process();
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("cmd.exe");
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.CreateNoWindow = true;
myProcessStartInfo.RedirectStandardOutput = true;
myProcess.StartInfo = myProcessStartInfo;
myProcessStartInfo.Arguments = "/c " + strCmd;
myProcess.Start();
StreamReader myStreamReader = myProcess.StandardOutput;
rInfo = myStreamReader.ReadToEnd();
myProcess.Close();
rInfo = strCmd + "\r\n" + rInfo;
return rInfo;
}
catch (Exception ex)
{
return ex.Message;
}
}
这个是大漠插件找图的部分代码:
[C#] 纯文本查看 复制代码 Dm.dmsoft dm = new Dm.dmsoft();
int hwnd;
hwnd = dm.FindWindow("", "BlueStacks App Player for Windows (beta-1)");
int flag;
flag = dm.BindWindow(hwnd, "normal", "windows3", "windows", 0);
int fi;
object intX = 0;
object intY = 0;
Delay(500);
dm.SetWindowState(hwnd, 1);
fi = dm.FindPic(0, 0, 2000, 2000, @"D:\weixin\weixin.bmp", "000000", 0.8, 0, out intX, out intY);
if (fi != -1)
{
int mx, my;
mx = int.Parse(intX.ToString());
my = int.Parse(intY.ToString());
dm.MoveTo(mx, my - 10);
Delay(500);
dm.LeftClick();
}
|