按键精灵多线程,两个线程同时运行,线程2执行完跳转标记,标记执行完跳回来后,线程1不能运行是怎么回事
//主线程DimEnvA,BA=BeginThread(1)B=BeginThread(2)StopThreadA//线程1Sub1i=0Whilei=0IfColor2...
//主线程DimEnv A,BA = BeginThread(1)B = BeginThread(2)StopThread A//线程1Sub 1i=0While i=0IfColor 295,759,"D8", 0 Theni = 0Else MoveTo 1354, 649KeyPress "F1", 1Delay 6000i = 0End IfWendEnd Sub//线程2 线程2执行完命令跳转到标记1Sub 2i=0While i=0 XY=Plugin.Color.FindMultiColorEx(223,28,1376,812,"080810","4|0|080810,1|1|6262FF,4|1|6262FF,2|2|0000CB,4|2|0000CB,0|3|080810,4|3|080810",0.9,1)ZB = InStr(XY,"|")X = Clng(Left(XY, ZB - 1)): Y = Clng(Right(XY, Len(XY) - ZB))if X > 0 and Y>0 Then MoveTo X, YMoveR 15, 45Delay 100LeftClick 1Delay 10000i = 0Else //这里是执行完了跳到标记1Goto 标记1i = 1End IfWendEnd Sub//这里是标记1,执行后跳转到标记2Rem 标记1Delay 1000XY=Plugin.Color.FindMultiColor(223,28,1376,812,"FFFF00","5|0|FFFF00,1|3|FFFF00,5|3|FFFF00,7|3|FFFF00,2|5|FFFF00,3|6|FFFF00,7|6|FFFF00,0|7|FFFF00,5|7|FFFF00,10|7|FFFF00",1)ZB = InStr(XY,"|")X = Clng(Left(XY, ZB - 1)) : Y = Clng(Right(XY, Len(XY) - ZB))If X > 0 and Y > 0 Then MoveTo X, YMoveR 10, 19LeftClick 1Delay 800Goto 标记1ElseGoto 标记2End If//这里是标记2,找到执行标记3未找到调用执行完跳到线程2Rem 标记2XY=Plugin.Color.FindMultiColorEx(1296,30,1373,73,"FFFFFF","1|0|000000,7|0|FFFFFF,-22|1|000000,-21|1|FFFFFF,-17|1|FFFFFF,-7|1|000000,-3|1|FFFFFF,3|1|FFFFFF,-21|2|000000,-7|2|FFFFFF,3|2|000000,6|2|FFFFFF,-2|3|000000,0|3|FFFFFF,-21|5|000000,-22|6|000000,-17|6|FFFFFF,-7|6|000000,-3|6|FFFFFF,-21|7|000000,-7|7|FFFFFF,0|7|FFFFFF,1|7|000000,5|7|FFFFFF,6|7|000000,5|8|000000",0.9,1)ZB = InStr(XY,"|")X = Clng(Left(XY, ZB - 1)): Y = Clng(Right(XY, Len(XY) - ZB))If X > 0 and Y > 0 Then Goto 标记3Else Call 线程2End If//这里是标记3,找到执行标记2未找到调用执行完跳到线程2Rem 标记3XY=Plugin.Color.FindMultiColorEx(1296,30,1373,73,"FFFFFF","4|0|FFFFFF,2|2|FFFFFF,4|3|FFFFFF,0|5|FFFFFF,3|6|FFFFFF",0.9,0)ZB = InStr(XY,"|")X = Clng(Left(XY, ZB - 1)) : Y = Clng(Right(XY, Len(XY) - ZB))If X > 0 and Y > 0 Then Goto 标记2Else Call 线程2End If
两个线程同时运行
线程1一直运行
线程2 运行完执行 跳转标记 执行完跳转标记后再调用线程2,
结果线程2可以运行
线程1却停了,这是哪里出问题了
能不能把两个线程合并,然后可以直接跳转到这个合并 展开
两个线程同时运行
线程1一直运行
线程2 运行完执行 跳转标记 执行完跳转标记后再调用线程2,
结果线程2可以运行
线程1却停了,这是哪里出问题了
能不能把两个线程合并,然后可以直接跳转到这个合并 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询