按键精灵里面的else if循环
'==========以下是战斗关闭==========IfColor740,485,"E06B56",0Then'==========以下是失败退出==========...
'==========以下是战斗关闭==========
IfColor 740,485,"E06B56",0 Then
'==========以下是失败退出==========
MoveTo 679, 576
Delay 1368
LeftClick 1
MoveTo 600, 481
Delay 1696
LeftDown 1
Delay 1000
LeftUp 1
Delay 1000
Delay 1000
MoveTo 673, 541
Delay 2552
LeftClick 1
MoveTo 471, 476
Delay 2000
LeftClick 1
MoveTo 1083, 151
Delay 4488
LeftClick 1
MoveTo 533, 395
Delay 1912
LeftClick 1
MoveTo 449, 492
Delay 3968
LeftClick 1
MoveTo 534, 485
Delay 1219
LeftClick 1
MoveTo 464, 245
Delay 3463
LeftClick 1
Delay 1006
LeftClick 1
MoveTo 290, 278
Delay 1781
LeftClick 1
MoveTo 544, 467
Delay 1289
LeftDown 1
MoveTo 497, 467
Delay 288
LeftUp 1
MoveTo 496, 469
Delay 1575
KeyDown "Num 6", 1
Delay 2
MoveTo 500, 469
Delay 136
KeyUp "Num 6", 1
Delay 2
MoveTo 525, 509
Delay 311
KeyDown "Num 0", 1
Delay 2
MoveTo 525, 512
Delay 135
KeyUp "Num 0", 1
Delay 1
MoveTo 522, 519
Delay 668
LeftClick 1
MoveTo 291, 304
Delay 1441
LeftClick 1
MoveTo 544, 461
Delay 836
LeftDown 1
MoveTo 489, 461
Delay 256
LeftUp 1
MoveTo 491, 458
Delay 1008
KeyDown "Num 9", 1
Delay 2
Delay 149
KeyUp "Num 9", 1
Delay 1
MoveTo 508, 470
Delay 297
KeyDown "Num 0", 1
Delay 2
MoveTo 507, 472
Delay 154
KeyUp "Num 0", 1
MoveTo 506, 472
Delay 2
KeyUp "Num 0", 1
MoveTo 522, 520
Delay 3706
LeftClick 1
MoveTo 1083, 152
Delay 3816
LeftClick 1
MoveTo 585, 319
Delay 1335
LeftClick 1
MoveTo 547, 540
Delay 3520
LeftClick 1
MoveTo 551, 481
Delay 2192
LeftClick 1
MoveTo 551, 502
Delay 2543
LeftClick 1
MoveTo 487, 465
Delay 1857
LeftClick 1
'==========以下是关闭战斗==========
ElseIfColor 727,485,"18128F",0 Then (这句按键精灵提示错误,具体要求见下)
MoveTo 684, 577
Delay 1464
LeftClick 1
'==========以下是10层BOSS选项==========
MoveTo 600, 481
Delay 1696
LeftDown 1
Delay 1000
LeftUp 1
Delay 1000
LeftUp 1
End If
这里一共有2个判定颜色是否满足条件,我想设置为,满足第一个条件时候,执行XXX,然后结束脚本;满足第二个条件的时候(就是提示错误的那个颜色条件)执行YYY,如果都不满足,则返回第一个判定进行重新判定。
因为我是用辅助做的,没有赋值,求大大指教
还想学学按键精灵设置固定坐标(我现在都是用电脑直接坐标)和后台,如果有余力的话给我讲解一下(这个额外追分咯)邮箱同ID的QQ邮箱 展开
IfColor 740,485,"E06B56",0 Then
'==========以下是失败退出==========
MoveTo 679, 576
Delay 1368
LeftClick 1
MoveTo 600, 481
Delay 1696
LeftDown 1
Delay 1000
LeftUp 1
Delay 1000
Delay 1000
MoveTo 673, 541
Delay 2552
LeftClick 1
MoveTo 471, 476
Delay 2000
LeftClick 1
MoveTo 1083, 151
Delay 4488
LeftClick 1
MoveTo 533, 395
Delay 1912
LeftClick 1
MoveTo 449, 492
Delay 3968
LeftClick 1
MoveTo 534, 485
Delay 1219
LeftClick 1
MoveTo 464, 245
Delay 3463
LeftClick 1
Delay 1006
LeftClick 1
MoveTo 290, 278
Delay 1781
LeftClick 1
MoveTo 544, 467
Delay 1289
LeftDown 1
MoveTo 497, 467
Delay 288
LeftUp 1
MoveTo 496, 469
Delay 1575
KeyDown "Num 6", 1
Delay 2
MoveTo 500, 469
Delay 136
KeyUp "Num 6", 1
Delay 2
MoveTo 525, 509
Delay 311
KeyDown "Num 0", 1
Delay 2
MoveTo 525, 512
Delay 135
KeyUp "Num 0", 1
Delay 1
MoveTo 522, 519
Delay 668
LeftClick 1
MoveTo 291, 304
Delay 1441
LeftClick 1
MoveTo 544, 461
Delay 836
LeftDown 1
MoveTo 489, 461
Delay 256
LeftUp 1
MoveTo 491, 458
Delay 1008
KeyDown "Num 9", 1
Delay 2
Delay 149
KeyUp "Num 9", 1
Delay 1
MoveTo 508, 470
Delay 297
KeyDown "Num 0", 1
Delay 2
MoveTo 507, 472
Delay 154
KeyUp "Num 0", 1
MoveTo 506, 472
Delay 2
KeyUp "Num 0", 1
MoveTo 522, 520
Delay 3706
LeftClick 1
MoveTo 1083, 152
Delay 3816
LeftClick 1
MoveTo 585, 319
Delay 1335
LeftClick 1
MoveTo 547, 540
Delay 3520
LeftClick 1
MoveTo 551, 481
Delay 2192
LeftClick 1
MoveTo 551, 502
Delay 2543
LeftClick 1
MoveTo 487, 465
Delay 1857
LeftClick 1
'==========以下是关闭战斗==========
ElseIfColor 727,485,"18128F",0 Then (这句按键精灵提示错误,具体要求见下)
MoveTo 684, 577
Delay 1464
LeftClick 1
'==========以下是10层BOSS选项==========
MoveTo 600, 481
Delay 1696
LeftDown 1
Delay 1000
LeftUp 1
Delay 1000
LeftUp 1
End If
这里一共有2个判定颜色是否满足条件,我想设置为,满足第一个条件时候,执行XXX,然后结束脚本;满足第二个条件的时候(就是提示错误的那个颜色条件)执行YYY,如果都不满足,则返回第一个判定进行重新判定。
因为我是用辅助做的,没有赋值,求大大指教
还想学学按键精灵设置固定坐标(我现在都是用电脑直接坐标)和后台,如果有余力的话给我讲解一下(这个额外追分咯)邮箱同ID的QQ邮箱 展开
展开全部
//b为体力
// 当前窗口句柄
Plugin lm=Window.MousePoint()
Plugin lm=Window.Foreground()
//获取当前屏幕坐标点
//转换为窗口坐标点
//体力判断
Plugin b = BkgndColor.GetPixelColor(lm,95,62)
If b="202420"
MessageBox b
Else
MessageBox "no"
EndIf
这里取得的存在b里的颜色值是一个字符串,所以用if判断时要加双引号
// 当前窗口句柄
Plugin lm=Window.MousePoint()
Plugin lm=Window.Foreground()
//获取当前屏幕坐标点
//转换为窗口坐标点
//体力判断
Plugin b = BkgndColor.GetPixelColor(lm,95,62)
If b="202420"
MessageBox b
Else
MessageBox "no"
EndIf
这里取得的存在b里的颜色值是一个字符串,所以用if判断时要加双引号
追问
我想设置为,满足第一个条件时候,执行XXX,然后结束脚本;满足第二个条件的时候(就是提示错误的那个颜色条件)执行YYY,如果都不满足,则返回第一个判定进行重新判定。
主要是循环不会,问题我已经解决了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Else If Color 727,485,"18128F",0 Then
要用空格隔开,不能连在一起的!
Else(空格隔开) If(空格隔开) Color 727,485,"18128F",0 Then
要用空格隔开,不能连在一起的!
Else(空格隔开) If(空格隔开) Color 727,485,"18128F",0 Then
追问
我想设置为,满足第一个条件时候,执行XXX,然后结束脚本;满足第二个条件的时候(就是提示错误的那个颜色条件)执行YYY,如果都不满足,则返回第一个判定进行重新判定。
主要是循环不会,问题我已经解决了
追答
Dim a
a = 1
Rem 标记1
If a = 1 Then
//执行XXX
MessageBox "a = " & a
EndScript
End If
If a 1 Then
//执行YYY
MsgBox "跳转到 标记1 继续判断"
Goto 标记1
End If
这个是用标记做的跳转
-----------------------------------------------------
你也可以用while 循环来判断
有需要再说,也不知道用啥来做例子
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询