Free registration desert Free - multi-threaded button

 
 

using System.Threading.Tasks;

using System.Windows;

using System.Runtime.InteropServices;

// Add Existing Item obj.cs 




. 1
[the DllImport ( " DmReg.dll " )] // Step 2 public static extern int SetDllPathA ( String path, int MODE); // Step . 3 Private void the Button_Click ( Object SENDER, the RoutedEventArgs E) . 4 { . 5 var dm_ret = SetDllPathA ( " dm.dll " , 0 ); // third step . 6 dmsoft DM = new 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 }

 

Guess you like

Origin www.cnblogs.com/xiongyunsheng/p/12465906.html