• 新浪微博:
  • 微信 :
按键精灵电脑版
立即下载

软件版本:2014.05
软件大小:21.6M
更新时间:07-04

按键精灵安卓版
立即下载

软件版本:3.3.1
软件大小:62.5M
更新时间:5-24

按键精灵iOS版
立即下载

软件版本:1.3.5
软件大小:29.2M
更新时间:06-14

最新企业版UiBot
立即下载

软件版本:2.5
软件大小:181M
更新时间:05-20

快捷导航

登录 后使用快捷导航
没有帐号? 注册

登录 注册
发新话题 回复该主题

[已解决] 连续取三个随机数,怎么让三个随机数不重复? [复制链接]

1#

t1 = time
Do
a = Int((6 - 1 + 1) * Rnd + 1)
TracePrint a
Loop Until DateDiff("s",t1,time)>1
If a = 1 Then
Call a1
ElseIf a = 2 Then
Call a2
ElseIf a = 3 Then
Call a3
ElseIf a = 4 Then
Call a4
ElseIf a = 5 Then
Call a5
ElseIf a = 6 Then
Call a6
End If
Sub a1
MoveTo 1548,327
Delay 1000
KeyPress "Num 1", 1

//脚本1
End Sub
Sub a2
MoveTo 1548,327
Delay 1000
KeyPress "Num 2", 1
//脚本2
End Sub
Sub a3
MoveTo 1548,327
Delay 1000
KeyPress "Num 3", 1
//脚本3
End Sub
Sub a4
MoveTo 1548,327
Delay 1000
KeyPress "Num 4", 1
//脚本4
End Sub
Sub a5
MoveTo 1548,327
Delay 1000
KeyPress "Num 5", 1
//脚本5
End Sub
Sub a6
MoveTo 1548,327
Delay 1000
KeyPress "Num 6", 1
//脚本6
End Sub

t1 = time
Do
b = Int((6 - 1 + 1) * Rnd + 1)
TracePrint b
Loop Until DateDiff("s",t1,time)>1
If b = 1 Then
Call b1
ElseIf b = 2 Then
Call b2
ElseIf b = 3 Then
Call b3
ElseIf b = 4 Then
Call b4
ElseIf b = 5 Then
Call b5
ElseIf b = 6 Then
Call b6
End If
Sub b1
MoveTo 1548,327
Delay 1000
KeyPress "Num 1", 1

//脚本1
End Sub
Sub b2
MoveTo 1548,327
Delay 1000
KeyPress "Num 2", 1
//脚本2
End Sub
Sub b3
MoveTo 1548,327
Delay 1000
KeyPress "Num 3", 1
//脚本3
End Sub
Sub b4
MoveTo 1548,327
Delay 1000
KeyPress "Num 4", 1
//脚本4
End Sub
Sub b5
MoveTo 1548,327
Delay 1000
KeyPress "Num 5", 1
//脚本5
End Sub
Sub b6
MoveTo 1548,327
Delay 1000
KeyPress "Num 6", 1
//脚本6
End Sub

t1 = time
Do
c = Int((6 - 1 + 1) * Rnd + 1)
TracePrint c
Loop Until DateDiff("s",t1,time)>1
If c = 1 Then
Call c1
ElseIf c = 2 Then
Call c2
ElseIf c = 3 Then
Call c3
ElseIf c = 4 Then
Call c4
ElseIf c = 5 Then
Call c5
ElseIf c = 6 Then
Call c6
End If
Sub c1
MoveTo 1548,327
Delay 1000
KeyPress "Num 1", 1

//脚本1
End Sub
Sub c2
MoveTo 1548,327
Delay 1000
KeyPress "Num 2", 1
//脚本2
End Sub
Sub c3
MoveTo 1548,327
Delay 1000
KeyPress "Num 3", 1
//脚本3
End Sub
Sub c4
MoveTo 1548,327
Delay 1000
KeyPress "Num 4", 1
//脚本4
End Sub
Sub c5
MoveTo 1548,327
Delay 1000
KeyPress "Num 5", 1
//脚本5
End Sub
Sub c6
MoveTo 1548,327
Delay 1000
KeyPress "Num 6", 1
//脚本6
End Sub

本主题由 超级版主 n15976906190 于 2019/1/10 17:33:13 执行 主题分类 操作
2#

回复 1楼cc215634488的帖子
  1. 返回值 = Lib.算法.洗牌("123456")
  2. a = Mid(返回值, 1, 1)
  3. b = Mid(返回值, 2, 1)
  4. c = Mid(返回值, 3, 1)
  5. TracePrint a
  6. TracePrint b
  7. TracePrint c
复制代码

收徒索引
----将满
个人QQ:1223116618
发新话题 回复该主题