按键精灵中关于if...then语句

2025-05-23 01:50:42
推荐回答(3个)
回答1:

UserVar WJ1=1 "设置内容" //按键8必须要加上变量注释名
Delay 6547
FindPic 683,436,1023,767,"D:\按键精灵8\screen\进入部队.bmp",0.9,intX,intY
If intX>0 and intY>0 Then
MoveTo intX,intY
End If
LeftClick 1
Delay 5000
Rem 第一个武将
If WJ1 = 0 Then
Goto 结束训练
Else
FindPic 186,228,833,645,"D:\按键精灵8\screen\训练-武将列表.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX,intY
End If
MoveR 0,22
MessageBox "已经停到所在位置"
End IfSub OnScriptExit()
Call Plugin.Web.Tips("脚本停止运行")
End Sub
Rem 结束训练
FindPic 186,228,833,645,"D:\按键精灵8\screen\关闭界面.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX,intY
End If
LeftClick 1
Delay 2000
关于您无论设置0还是1都直接执行“结束训练”的问题,可能是您在调试前没有保存设置。

回答2:

因为UserVar不是那么用的
删掉UserVar改成WJ1=1试试吧

回答3:

UserVar 改为 dim