大漠免费版免注册-多线程按键
using System.Threading.Tasks;
using System.Windows;
using System.Runtime.InteropServices;
//添加现有项 obj.cs
1 [DllImport("DmReg.dll")] //第一步 2 public static extern int SetDllPathA(string path, int mode); //第二步 3 private void Button_Click(object sender, RoutedEventArgs e) 4 { 5 var dm_ret = SetDllPathA("dm.dll", 0);//第三步 6 dmsoft dm = new dmsoft(); // 创建对象 7 Task.Run(() => 8 { 9 System.Threading.Thread.Sleep(5000); 10 for (int i = 0; i < 1200; i++) 11 { 12 dm.LeftClick(); 13 System.Threading.Thread.Sleep(200); 14 } 15 }); 16 17 }
QQ:254595754
手机号:15074704856