prss.net
当前位置:首页 >> 按键精灵9怎么设置后台多线程? >>

按键精灵9怎么设置后台多线程?

环境变量没有赋值. 你分拆到数组后要赋值给环境变量.其实有更简单的写法. Dimenv HwndEx,shu HwndEx = Plugin.Window.Search("天涯明月刀") for shu=0 to 4 BeginThread xiancheng next sub xiancheng Hwnd = Split(HwndEx, "|") jb=hwnd(shu) C...

BeginThread a : BeginThread b : BeginThread c BeginThread d : BeginThread e : BeginThread f //声明线程数量,从a-f一共六个 Sub a // a线程运行程序 End Sub Sub b // b线程运行程序 End Sub Sub c // c线程运行程序 End Sub Sub d // d线...

//下面这个例子会打开一个记事本,用2个线程向其中模拟按键 Call RunApp("notepad") Delay 1000 DimEnv Key Key=65 BeginThread Thread1 While True Call PressKey() key=key+1 If (key>90) key=65 EndIf Wend EndScript Sub Thread1() For 10 C...

Rem Bkey = WaitKey()If key = 66 Then KeyDown "Shift", 1 Delay 10 KeyDown "a", 1 Delay 100 KeyPress 74, 1 Delay 10 KeyUp "Shift", 1 Delay 10 KeyUp "a", 1 Delay 10ElseIf key = 78 Then Delay 10 KeyDown "Shift", 1 Delay 10 KeyDown ...

BeginThread a //开启线程调用aBeginThread b //开启线程调用bSub a //子程序aEnd SubSub b //子程序aEnd Subab就同时运行了,明白?

sub theard1() //创建子程序 //这里加入绑定大漠插件的语句 set dm = createobject("dm.dmsoft") hwnd = Plugin.Window.MousePoint()//获取鼠标指向窗口的句柄,存入变量 Hwnd dm_ret = dm.BindWindowEx "dx", "dx", "dx","",0) //这里已经多加载...

IDA=BeginThread(A) //这样调用错了,应该改为IDA=BeginThread(A()) If Edown = -1 Then BeginThread //这里没有目标进程,语法有错。Call 子程序A() //不知道你为什么加“子程序”,你下面并没有定义,应该是Call A()DimEnv IDA,IDB,IDC //所定义...

多线程写法也很简单,而且容易看懂,修改参数比较简单 BeginThread A Delay 10 BeginThread B Delay 10 BeginThread C Sub A() While true KeyPress "A", 1 For 10 Delay 1000 Next Wend End Sub Sub B() While true KeyPress "B", 1 For 3 Dela...

因为你的总循环设置在了获取窗口句柄那句的前面,你获取窗口并且无限循环,那么等你开了新窗口的时候循环到了获取句柄的时候获取的当然就是新句柄了,所以发言到了新窗口。 总循环应该设置在获取句柄之下。 要对多个窗口后台操作要用到多线程: ...

网站首页 | 网站地图
All rights reserved Powered by www.prss.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com