level 3
hk2000
楼主
//请教下怎么同时运行多线程。
//假设:
'主线循环
Delay 1000
Thread.Start(xuanze1,xuanze3)
Sub xuanze1
TracePrint "选择1"
Delay 2000
Call xuanze2()
End Sub
Sub xuanze2
TracePrint "选择2"
Delay 2000
Call xuanze1()
End Sub
Sub xuanze3
TracePrint "选择3"
Dim intX, intY
FindColor 100,200, 200,300, "ffffff", 0, 1, intX, intY
If intX > 0 Then
Delay 500
TracePrint "条件满足"
TracePrint "怎么样单独停止xuanze1,2 ?"
Else
Delay 5000
TracePrint "条件不满足,继续监控"
End If
End Sub
'我想同时启用1,2,1是正常流程一直循环,用xuanze3来当监控,当出现指定条件的时候关闭xuanze1的sub,在启用xuanze3。
'这个怎么调整了?
2016年05月16日 07点05分
1
//假设:
'主线循环
Delay 1000
Thread.Start(xuanze1,xuanze3)
Sub xuanze1
TracePrint "选择1"
Delay 2000
Call xuanze2()
End Sub
Sub xuanze2
TracePrint "选择2"
Delay 2000
Call xuanze1()
End Sub
Sub xuanze3
TracePrint "选择3"
Dim intX, intY
FindColor 100,200, 200,300, "ffffff", 0, 1, intX, intY
If intX > 0 Then
Delay 500
TracePrint "条件满足"
TracePrint "怎么样单独停止xuanze1,2 ?"
Else
Delay 5000
TracePrint "条件不满足,继续监控"
End If
End Sub
'我想同时启用1,2,1是正常流程一直循环,用xuanze3来当监控,当出现指定条件的时候关闭xuanze1的sub,在启用xuanze3。
'这个怎么调整了?