效果一览:源码一览:- Dim 线程ID= Thread.Start(日志)
- Thread.SetShareVar "环境变量", "脚本开始..."
- Delay 1000
- Thread.SetShareVar "环境变量", "打怪操作"
- Delay 1000
- For i = 0 To 10
- Thread.SetShareVar "环境变量", "打怪"&i
- Delay 1000
- Next
- Sub 日志()
- Dim 主内容(11)
- Dim 环境变量,暂存变量,是否有空
- 暂存变量=""
- FW.NewFWindow "日志", 20, 60, 200, 300
- FW.SetBackColor("日志", "000000")
- FW.AddTextView("日志", "内容", "开始脚本goto~~~",0,0,200, 300)
- FW.SetTextColor "内容", "78E848"
- FW.SetTextSize "内容", 10
- FW.Opacity "日志", 30
- FW.IsTouchMove "日志", 1
- FW.Show ("日志")
- Do
- 环境变量 = Thread.GetShareVar("环境变量")
- If 暂存变量 <> 环境变量 Then
- 是否有空=False
- For i = 0 To 11
- If 主内容(i) = null Then
- TracePrint i
- 主内容(i) = "【"&DateTime.Format("%H:%M:%S")&"】"&环境变量
- 暂存变量 = 环境变量
- 是否有空 = True
- Exit For
- End If
- Next
- If 是否有空 = False Then
- For i = 0 To 10
- TracePrint i
- 主内容(i) = 主内容(i+1)
- Next
- 主内容(11) = "【"&DateTime.Format("%H:%M:%S")&"】"&环境变量
- 暂存变量 = 环境变量
- End If
- End If
- TracePrint join(主内容,"\n")
- FW.SetTextView "内容", join(主内容,"\n") , 0, 0, 500, 300
- Delay 1000
- Loop
- End Sub
复制代码 效果一览:源码一览:'笑脸为P'按键qq群891058946
showDialog "停"
Dim 开关=1,id
Thread.SetShareVar "开关", 1
Do
开关=Thread.GetShareVar("开关")
dim AJ = FW.GetValue("
K_Status")
TracePrint AJ["Text"]
Delay 1000
If AJ["Text"] = "攻" and 开关 = 1 Then
TracePrint "启动多线程"
id =Thread.Start(多线程)
Thread.SetShareVar "开关", 0
Delay 1000
End If
If AJ["Text"] = "停" and 开关 = 0 Then
TracePrint "停止多线程"
Thread.Stop(id)
Thread.SetShareVar "开关", 1
End If
Loop
Sub 多线程()
Do
TracePrint "运行中...."&now()
Delay 1000
Loop
End Sub
Function showDialog(状态)
//创建悬浮窗
FW.NewFWindow("
K控制", 10, 250, 160, 50)
//创建按钮控件
FW.AddButton("
K控制", "按键停", "停", 0, 0, 50, 50)
FW.AddButton "
K控制", "按键攻", "攻", 110, 0, 50, 50
FW.AddTextView("
K控制", "PK_Status", 状态, 65, 5, 50, 50)
//设置按钮背景色为红色
FW.SetBackColor "按键停", "0000FF"
FW.SetBackColor "按键攻", "0000FF"
FW.SetOnClick("按键停", EndPK)
FW.SetOnClick("按键攻", StartPK)
//显示悬浮窗
FW.Show("PK控制")
//无限循环等待,脚本停止后,浮窗自动消失
End Function
//无限循环等待,脚本停止后,浮窗自动消失
Dim s
Do
Delay 1000
s = Thread.GetShareVar("s")
TracePrint s
Loop
Function StartPK
TracePrint "攻"
showDialog "攻"
End Function
Function EndPK
TracePrint "停"
showDialog "停"
End Function